Skip to content

Allow setting device_class "outlet" again through entity settings#12669

Merged
zsarnett merged 3 commits intohome-assistant:devfrom
spacegaier:switch_outlet_show_as
May 23, 2022
Merged

Allow setting device_class "outlet" again through entity settings#12669
zsarnett merged 3 commits intohome-assistant:devfrom
spacegaier:switch_outlet_show_as

Conversation

@spacegaier
Copy link
Copy Markdown
Member

Breaking change

Proposed change

For covers and binary sensors the "Show as" dropdown allows changing the device_class to whatever fits best. However, in the settings dialog of a switch entity the "Show as" dropdown controls the new switch_as_x behavior. That however means, that we lost the option to change the switch device_class.

With this PR this option is now back.

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:

@zsarnett
Copy link
Copy Markdown
Contributor

@spacegaier Would like to merge this before beta if you can look at the reviews. Ill merge tonight or tomorrow

@spacegaier spacegaier requested a review from zsarnett May 23, 2022 22:18
@zsarnett zsarnett merged commit 49c018c into home-assistant:dev May 23, 2022
@spacegaier spacegaier deleted the switch_outlet_show_as branch May 24, 2022 07:15
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2022
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.

5 participants