Fix geniushub smart plug state at start-up (#102110)
* Smart plug did state wrong at start-up * Update docstring to reflect code
This commit is contained in:
parent
ca147060d9
commit
55bafc260d
1 changed files with 5 additions and 2 deletions
|
@ -68,9 +68,12 @@ class GeniusSwitch(GeniusZone, SwitchEntity):
|
|||
def is_on(self) -> bool:
|
||||
"""Return the current state of the on/off zone.
|
||||
|
||||
The zone is considered 'on' if & only if it is override/on (e.g. timer/on is 'off').
|
||||
The zone is considered 'on' if the mode is either 'override' or 'timer'.
|
||||
"""
|
||||
return self._zone.data["mode"] == "override" and self._zone.data["setpoint"]
|
||||
return (
|
||||
self._zone.data["mode"] in ["override", "timer"]
|
||||
and self._zone.data["setpoint"]
|
||||
)
|
||||
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Send the zone to Timer mode.
|
||||
|
|
Loading…
Add table
Reference in a new issue