From bd84981ae0b1a88beb00c200488fc9a8eb980332 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 6 Sep 2022 18:03:53 +0200 Subject: [PATCH] Use _attr_force_update in tellstick (#77899) --- homeassistant/components/tellstick/switch.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/tellstick/switch.py b/homeassistant/components/tellstick/switch.py index 5f88bab420b..966a3defd5e 100644 --- a/homeassistant/components/tellstick/switch.py +++ b/homeassistant/components/tellstick/switch.py @@ -42,6 +42,8 @@ def setup_platform( class TellstickSwitch(TellstickDevice, SwitchEntity): """Representation of a Tellstick switch.""" + _attr_force_update = True + def _parse_ha_data(self, kwargs): """Turn the value from HA into something useful.""" @@ -58,8 +60,3 @@ class TellstickSwitch(TellstickDevice, SwitchEntity): self._tellcore_device.turn_on() else: self._tellcore_device.turn_off() - - @property - def force_update(self) -> bool: - """Will trigger anytime the state property is updated.""" - return True