Skip to content

Prevent YAML mode if no entity is set in card editor#8110

Merged
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:prevent-card-yaml-errors
Jan 8, 2021
Merged

Prevent YAML mode if no entity is set in card editor#8110
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:prevent-card-yaml-errors

Conversation

@spacegaier
Copy link
Copy Markdown
Member

Breaking change

Proposed change

A few card editors had the entity parameter that from a logical perspective is mandatory also defined as a technical requirement. That meant if you e.g. entered the editor of a thermostat card and cleared the entity input field, the editor would be forced into YAML mode, since entity was now undefined.

This PR now marks them as technically optional (as was already the case for most other editors). The cards themselves are already checking if no matching entity is provided and will render the appropriate error message directly to the card to inform the user anyway.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten bramkragten merged commit da07173 into home-assistant:dev Jan 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants