Closed ktnrg45 closed 3 years ago
@ktnrg45 sorry for taking so long to come back to you.
I gave your proposal some thoughts and I'm kind of split.
On the one hand, this change would fix quite some issues without introducing breaking changes.
On the other hand, I don't see any good reason to introduce a second state, that essentially has the same meaning and function as STATE_OFF. It's also make the code more complicated and there are more line to change, than turning the proposal on its head and remove STATE_STANDBY from the few known places. On the downside, that would be a breaking change, but the state for "device is off" would be STATE_OFF instead of depending on the implementation. Documentation in this regard is also rather scarce or non existant, so you user first has to figure that out.
Context
These media_player integrations currently use STATE_STANDBY:
Main issue is that STATE_STANDBY is mishandled when the PS4 integration is used in homekit and universal. STATE_STANDBY is interpreted as being not 'off'. See home-assistant/core#28891
Also turning on from frontend card is mishandled.
Proposal
Add handling of STATE_STANDBY in integrations:
Add/change handling of states in frontend media_player card.
Consequences
Basic use of universal and homekit integrations and frontend card will be restored.
Logic using STATE_OFF and STATE_STANDBY may conflict.