mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-10 18:00:12 +01:00
Fix setters (#407)
This commit is contained in:
parent
cf1e2c3a30
commit
086fd1cd75
@ -294,7 +294,7 @@ class device:
|
||||
packet = bytearray(4)
|
||||
packet += name.encode('utf-8')
|
||||
packet += bytearray(0x50 - len(packet))
|
||||
packet[0x43] = self.is_locked
|
||||
packet[0x43] = bool(self.is_locked)
|
||||
response = self.send_packet(0x6a, packet)
|
||||
check_error(response[0x22:0x24])
|
||||
self.name = name
|
||||
@ -303,7 +303,7 @@ class device:
|
||||
packet = bytearray(4)
|
||||
packet += self.name.encode('utf-8')
|
||||
packet += bytearray(0x50 - len(packet))
|
||||
packet[0x43] = state
|
||||
packet[0x43] = bool(state)
|
||||
response = self.send_packet(0x6a, packet)
|
||||
check_error(response[0x22:0x24])
|
||||
self.is_locked = bool(state)
|
||||
|
Loading…
Reference in New Issue
Block a user