Fix switch state for Comelit (#142978)

This commit is contained in:
Simone Chemelli 2025-04-15 09:55:16 +02:00 committed by Franck Nijhof
parent 2d149dc746
commit 7c867852a9
No known key found for this signature in database
GPG Key ID: AB33ADACE7101952

View File

@ -81,4 +81,7 @@ class ComelitSwitchEntity(CoordinatorEntity[ComelitSerialBridge], 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
)