settings: fix bug in read method of action settings rw

This commit is contained in:
Peter F. Patel-Schneider 2022-01-24 19:20:39 -05:00
parent 13e4861043
commit fed9a26cb6
1 changed files with 1 additions and 1 deletions

View File

@ -1165,7 +1165,7 @@ class ActionSettingRW:
pass pass
def read(self, device): # need to return bytes, as if read from device def read(self, device): # need to return bytes, as if read from device
return _int2bytes(self.key, 2) if self.active else b'\x00\x00' return _int2bytes(self.key.key, 2) if self.active and self.key else b'\x00\x00'
def write(self, device, data_bytes): def write(self, device, data_bytes):
def handler(device, n): # Called on notification events from the device def handler(device, n): # Called on notification events from the device