From 096891fc845568a914ac711f07e9e89471c47bf6 Mon Sep 17 00:00:00 2001 From: Taraman17 Date: Fri, 7 Feb 2025 14:34:58 +0000 Subject: [PATCH] revert is_on --- homeassistant/components/homee/switch.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homee/switch.py b/homeassistant/components/homee/switch.py index 11cbe0282de..f197c93db92 100644 --- a/homeassistant/components/homee/switch.py +++ b/homeassistant/components/homee/switch.py @@ -99,13 +99,17 @@ class HomeeSwitch(HomeeEntity, SwitchEntity): """Initialize a Homee switch entity.""" super().__init__(attribute, entry) self.entity_description = description - self._attr_is_on = bool(attribute.current_value) if not ((attribute.type == AttributeType.ON_OFF) and (attribute.instance == 0)): self._attr_translation_key = description.key if attribute.instance > 0: self._attr_translation_key = f"{description.key}_instance" self._attr_translation_placeholders = {"instance": str(attribute.instance)} + @property + def is_on(self) -> bool: + """Return True if entity is on.""" + return bool(self._attribute.current_value) + @property def device_class(self) -> SwitchDeviceClass: """Return the device class of the switch."""