Add Tuya cover state (#16709)

* add cover open and close state

* add tuya cover state

* fix pylint

* fix pylint problem
This commit is contained in:
huangyupeng 2018-09-23 16:36:33 +08:00 committed by Martin Hjelmare
parent 127395ae8d
commit 539b86e079

View File

@ -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):