1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-10 18:00:12 +01:00

Use the absolute position to read the lock status (#575)

This commit is contained in:
Felipe Martins Diel 2021-04-06 15:28:12 -03:00 committed by Felipe Martins Diel
parent 12fdf01631
commit fc5c33ee97

View File

@ -64,7 +64,7 @@ def scan(
discovered.append((host, mac, devtype))
name = resp[0x40:].split(b"\x00")[0].decode()
is_locked = bool(resp[-1])
is_locked = bool(resp[0x7F])
yield devtype, host, mac, name, is_locked
finally:
conn.close()