Add config flow support for cover

This commit is contained in:
Pierre Ståhl
2020-09-10 10:20:14 +02:00
parent ae64158da5
commit edc9debf83
4 changed files with 148 additions and 133 deletions

View File

@@ -442,7 +442,7 @@ class FanDevice(Device):
def __init__(self, dev_id, address, local_key=None):
super(FanDevice, self).__init__(dev_id, address, local_key)
class CoverEntity(Device):
class CoverDevice(Device):
DPS_INDEX_MOVE = '1'
DPS_INDEX_BL = '101'
@@ -460,7 +460,7 @@ class CoverEntity(Device):
else:
print('Using PyCrypto ', Crypto.version_info)
print('Using PyCrypto from ', Crypto.__file__)
super(CoverEntity, self).__init__(dev_id, address, local_key)
super(CoverDevice, self).__init__(dev_id, address, local_key)
def open_cover(self, switch=1):
"""Turn the device on"""