#Fan entity off
1 messages ยท Page 1 of 1 (latest)
So
So 1 concern is that we show the off button, while it can't be turned off. In reality this just sets the fan speed to 0, but that's not a possibility
I will check other integrations on how they do this, because TURN_OFF is a supported fan feature, so then the question becomes "if it doesn't support TURN_OFF, should it support setting the fan speed to 0?"
The main concern right now is that preset modes are said to be automatic control. So if you select a preset mode, that means the manual control doesn't apply, and when you then do manual control again, it disabled the preset mode
Hold up I now see something in the FanEntity class that might help
Speed = 0 = no rotation/activity? That feels like a turn off.
Why can't it turn off? In the sense, the power stays on a little, or there is still rotation/activity?
Probably mechanical ventilation, I had the same in my appartment
it just can't turn off
But that means there's always some activity/rotation? Or some sort of standby modus?
yes it's always on
Like in my apartment I couldn't open my windows, so if it stopped I wouldn't have fresh air
What's the insight? ๐
@property
def is_on(self) -> bool | None:
"""Return true if the entity is on."""
return (
self.percentage is not None and self.percentage > 0
) or self.preset_mode is not None
He overwrote is_on, but even if a preset mode is selected, it should stay on
I have an ESPhome one for controlling the ITHO in-house fans which just maps 0 back to 1 (or something like that)
hehe yea I know that one
Same thing, you can't turn it off - it will always minimally run at low speed
I ran into the 'can't turn off' as well, but just disregarded it ๐
I could think this should change in the model as it's quite common to have various fans with different speeds but off/0 isn't one of them
Yea I think so as well, but haven't looked at implementations and if a fan not supporting OFF means it does support fan speed -> 0
Sure, up to the product what it can support but the model should be 1-100 then