mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use _attr_force_update in tellstick (#77899)
This commit is contained in:
parent
e3fb04e116
commit
bd84981ae0
@ -42,6 +42,8 @@ def setup_platform(
|
|||||||
class TellstickSwitch(TellstickDevice, SwitchEntity):
|
class TellstickSwitch(TellstickDevice, SwitchEntity):
|
||||||
"""Representation of a Tellstick switch."""
|
"""Representation of a Tellstick switch."""
|
||||||
|
|
||||||
|
_attr_force_update = True
|
||||||
|
|
||||||
def _parse_ha_data(self, kwargs):
|
def _parse_ha_data(self, kwargs):
|
||||||
"""Turn the value from HA into something useful."""
|
"""Turn the value from HA into something useful."""
|
||||||
|
|
||||||
@ -58,8 +60,3 @@ class TellstickSwitch(TellstickDevice, SwitchEntity):
|
|||||||
self._tellcore_device.turn_on()
|
self._tellcore_device.turn_on()
|
||||||
else:
|
else:
|
||||||
self._tellcore_device.turn_off()
|
self._tellcore_device.turn_off()
|
||||||
|
|
||||||
@property
|
|
||||||
def force_update(self) -> bool:
|
|
||||||
"""Will trigger anytime the state property is updated."""
|
|
||||||
return True
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user