Add feature flags ClimateEntityFeature.TURN_OFF
+ ClimateEntityFeature.TURN_ON
#982
-
BackgroundCore PR home-assistant/core#25026 added services
ProblemCalling ProposalAdd feature flags
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
Is there any reason to deprecate setting those flags automatically? I mean the conditions for the base implementation seem pretty sensible - if the climate entity has |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@emontnemery there's another discussion related to this topic, which suggests adding a new Context: some climate entities only support being switched on and off (slave thermostats depending on their corresponding master thermostats) and, in order to support them, integration developers (advantage_air, airzone, airzone_cloud...) are forced to do weird stuff like replicating the modes of the master thermostat or misusing the |
Beta Was this translation helpful? Give feedback.
-
As per discussion in a video call on October 12, 2023; this proposal has been approved. ✅ |
Beta Was this translation helpful? Give feedback.
-
Sorry to be late on this... but, as I wrote somewhere else... I really thing that having a TURN_OFF feature for a HVAC entity is a terrible idea. Any HVAC device will either cool, heat, fan, dry, humidify, ... or none of the above, which essentially means off. So OFF, is never a feature, it is a mode. If an entity implements the turn_off method, it simply should be considered as a convenient shortcut for switching to the "off" mode, possibly saving the current mode, and can easily be handled through introspection. The TURN_ON feature is a bit more subtle. A fan device will not be "ON" it will simply be in "FAN" mode or "OFF" mode, A/C can be more complex. In that context, turn on may simply mean that we restore the state that existed prior switching to the "OFF" mode. But the semantic should be clear. This does not change the fact that TURN_OFF should never be a feature. Even in the unlikely case a device cannot be turned off, it simply means that device does not support the "off" mode. No need for a feature. A toggle feature might be a better option for those entities with only 2 states, like a fan ( fan, off) or a heater (heat, off)... |
Beta Was this translation helpful? Give feedback.
-
If I may. @frenck Sorry, but those electric heater are IMO in either "Heat" or "Off" mode. One advantage is that it makes very clear what the device actually does. @Noltari I see your point as long as the slave devices can be used whilst the master is "off". At the same time, I think that "Off" feature should only apply to the master device, slave would then have 2 modes, Off and the (dynamically set) mode selected by the master. Again this makes vary clear what the slave can do. Cheers, |
Beta Was this translation helpful? Give feedback.
As per discussion in a video call on October 12, 2023; this proposal has been approved. ✅