Fix switch state for Comelit (#142978)

pull/142986/head
Simone Chemelli 2025-04-15 09:55:16 +02:00 committed by GitHub
parent 942bf2ef78
commit fa81a83893
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -75,4 +75,7 @@ class ComelitSwitchEntity(ComelitBridgeBaseEntity, SwitchEntity):
@property
def is_on(self) -> bool:
"""Return True if switch is on."""
return self.coordinator.data[OTHER][self._device.index].status == STATE_ON
return (
self.coordinator.data[self._device.type][self._device.index].status
== STATE_ON
)