Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegJktu authored Dec 1, 2018
1 parent adc5ef7 commit 47f16f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ def send_command(mac, parsed_json):
return

#dev = next(bl for bl in devs if mac in (None, '') or bl.mac == mac)
# i try tp change this for mac 34:ea:34:70
## OlegJktu change original code. Delet MAC control. Because Beok have mac 34:ea:34:70
dev = devs[0]
for bl in devs:
#hex_data = binascii.hexlify(bl.mac)
strmac = ':'.join(format(s, '02x') for s in bl.mac[::-1])
if strmac == mac.lower():
print('Broadlink with mac ', strmac, ' found ', bl.host)
print('Broadlink with mac 02x', strmac, ' found ', bl.host)
dev = bl
else:
print('Broadlink with mac ', strmac, ' found ', bl.host)
print('Device with mac ', strmac, ' found ', bl.host)
dev = bl

dev.auth()
Expand Down

0 comments on commit 47f16f3

Please sign in to comment.