From 5676f6fb86abbbaa6d34784cede1bc8b618a6d24 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 29 Aug 2019 13:06:34 -0700 Subject: [PATCH] Bumped version to 0.98.1 --- homeassistant/components/tuya/switch.py | 7 ++++++- homeassistant/const.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tuya/switch.py b/homeassistant/components/tuya/switch.py index 9c021766637..a0d262aa085 100644 --- a/homeassistant/components/tuya/switch.py +++ b/homeassistant/components/tuya/switch.py @@ -26,11 +26,12 @@ 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.tuya.state() + return self._is_on def turn_on(self, **kwargs): """Turn the switch on.""" @@ -39,3 +40,7 @@ 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() diff --git a/homeassistant/const.py b/homeassistant/const.py index 9a9b098aabb..2f2546378db 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 98 -PATCH_VERSION = "0" +PATCH_VERSION = "1" __short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) __version__ = "{}.{}".format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 6, 0)