Merge branch 'issue_554-simulate-hvac-action'

This commit is contained in:
Jean-Marc Collin
2024-10-14 17:01:01 +00:00

View File

@@ -550,14 +550,11 @@ class UnderlyingClimate(UnderlyingEntity):
def is_device_active(self): def is_device_active(self):
"""If the toggleable device is currently active.""" """If the toggleable device is currently active."""
if self.is_initialized: if self.is_initialized:
return ( return self.hvac_mode != HVACMode.OFF and self.hvac_action not in [
self._underlying_climate.hvac_mode != HVACMode.OFF HVACAction.IDLE,
and self.hvac_action HVACAction.OFF,
not in [ None,
HVACAction.IDLE, ]
HVACAction.OFF,
]
)
else: else:
return None return None