This commit is contained in:
Jean-Marc Collin
2024-10-14 16:58:18 +00:00
parent f29b2f9b81
commit 2ea5cf471b

View File

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