Fix telnet fast state update (#59681)

pull/59716/head
József Kertész 2021-11-15 13:14:22 +01:00 committed by GitHub
parent acf58111c6
commit 1b5d32514f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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()