mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Undo accidental Tuya change
This commit is contained in:
parent
b8f9319cb0
commit
79045f2da1
@ -26,12 +26,11 @@ class TuyaSwitch(TuyaDevice, SwitchDevice):
|
||||
"""Init Tuya switch device."""
|
||||
super().__init__(tuya)
|
||||
self.entity_id = ENTITY_ID_FORMAT.format(tuya.object_id())
|
||||
self._is_on = False
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return true if switch is on."""
|
||||
return self._is_on
|
||||
return self.tuya.state()
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the switch on."""
|
||||
@ -40,7 +39,3 @@ class TuyaSwitch(TuyaDevice, SwitchDevice):
|
||||
def turn_off(self, **kwargs):
|
||||
"""Turn the device off."""
|
||||
self.tuya.turn_off()
|
||||
|
||||
def update(self):
|
||||
"""Update switch device."""
|
||||
self._is_on = self.tuya.state()
|
||||
|
Loading…
x
Reference in New Issue
Block a user