fix lint issues

This commit is contained in:
Martín Villagra
2021-11-23 21:20:43 +00:00
parent 24152569e7
commit 47c4edc20d

View File

@@ -485,10 +485,11 @@ class TuyaProtocol(asyncio.Protocol, ContextualLogger):
async def updatedps(self):
"""
Request device to update index.
Args:
index(array): list of dps to update (ex. [4, 5, 6, 18, 19, 20])
"""
self.debug('updatedps() entry (dev_type is %s)', self.dev_type)
self.debug("updatedps() entry (dev_type is %s)", self.dev_type)
payload = self._generate_payload(UPDATEDPS)
self.transport.write(payload)
@@ -608,7 +609,7 @@ class TuyaProtocol(asyncio.Protocol, ContextualLogger):
if self.version == 3.3:
payload = self.cipher.encrypt(payload, False)
if command_hb != 0x0A and command_hb != 0x12:
if command_hb not in [0x0A, 0x12]:
# add the 3.3 header
payload = PROTOCOL_33_HEADER + payload
elif command == SET: