mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
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:
parent
127395ae8d
commit
539b86e079
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user