mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-22 07:00:12 +01:00
Use the absolute position to read the lock status (#575)
This commit is contained in:
parent
12fdf01631
commit
fc5c33ee97
@ -64,7 +64,7 @@ def scan(
|
|||||||
discovered.append((host, mac, devtype))
|
discovered.append((host, mac, devtype))
|
||||||
|
|
||||||
name = resp[0x40:].split(b"\x00")[0].decode()
|
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
|
yield devtype, host, mac, name, is_locked
|
||||||
finally:
|
finally:
|
||||||
conn.close()
|
conn.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user