From 539b86e079a2436a03888d992c033196c2cf37b3 Mon Sep 17 00:00:00 2001 From: huangyupeng Date: Sun, 23 Sep 2018 16:36:33 +0800 Subject: [PATCH] Add Tuya cover state (#16709) * add cover open and close state * add tuya cover state * fix pylint * fix pylint problem --- homeassistant/components/cover/tuya.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/cover/tuya.py b/homeassistant/components/cover/tuya.py index 6ab8581602f..a3a3db972e9 100644 --- a/homeassistant/components/cover/tuya.py +++ b/homeassistant/components/cover/tuya.py @@ -45,6 +45,11 @@ class TuyaCover(TuyaDevice, CoverDevice): @property def is_closed(self): """Return if the cover is closed or not.""" + state = self.tuya.state() + if state == 1: + return False + if state == 2: + return True return None def open_cover(self, **kwargs):