Fix telnet fast state update (#59681)

This commit is contained in:
József Kertész
2021-11-15 13:14:22 +01:00
committed by GitHub
parent acf58111c6
commit 1b5d32514f

View File

@@ -157,9 +157,11 @@ class TelnetSwitch(SwitchEntity):
self._telnet_command(self._command_on)
if self.assumed_state:
self._state = True
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the device off."""
self._telnet_command(self._command_off)
if self.assumed_state:
self._state = False
self.schedule_update_ha_state()