-
Notifications
You must be signed in to change notification settings - Fork 64
Expose enums with "Standby" state as switches #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
It looks like the switch logic needs to be updated as well to support this. |
This is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, "standby" is not the same as "on" or "off" but you are making an assumption that it is equivilant to "off". This begs the questions why did HC use this ENUM value and not "off" which is also a supported value. Are you sure that whenever "standby" exists there isn't also an "off" option? I'm wondering how to test this.
Check out #471 which is about something else but mentions "I keep my dryer in off mode (not standby).", which seem to suggest that both "off" and "standby" are valid option for this person's dryer.
Just want to reply regarding Standby state. The power state select has only "On" and "Mains Off". |
I don't know if the display turning off on the appliance is the same as being in standby mode. All I know is that "standby" is a valid power state reported by the API and it may or may not be equivalent to "off". It still needs some supporting evidence, or at least a working assumption that can be verified from logs, of how those two state relate to each other. |
While being in the "standby" mode here are all entities visible in UI (and below an extract from developer tab): <style> </style>
|
So it seems that at least some entities are still available when the appliance is in standby mode. |
I noticed today that:
|
This is consistent with making the change because there is no case where all three options are available for the same appliance. The question is if there is no such case at all and the proposed change can be safely applied. |
Some devices have a Power State enum with "On" and "Standby" values only. This enum isn't populated as a switch in home assistant because the
is_boolean_enum
function only accepts enums which contain "On" and "Off". This PR changes the function to also allow enums of "On" and "Standby."This is a breaking change for people who have automations set up around the Power State being a "Select" type.
Examples of this are:
Oven Power State: Has values "On" and "Standby"
Coffee Machine Power State: Has values "On" and "Standby"