Use _attr_force_update in tellstick (#77899)

This commit is contained in:
epenet 2022-09-06 18:03:53 +02:00 committed by GitHub
parent e3fb04e116
commit bd84981ae0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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