From 7c867852a9c00400cea5c1969fcc017639b84247 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Tue, 15 Apr 2025 09:55:16 +0200 Subject: [PATCH] Fix switch state for Comelit (#142978) --- homeassistant/components/comelit/switch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/comelit/switch.py b/homeassistant/components/comelit/switch.py index 2c751cbe2cb..98f0894ca30 100644 --- a/homeassistant/components/comelit/switch.py +++ b/homeassistant/components/comelit/switch.py @@ -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 + )