Skip to content

Commit

Permalink
updated to work with latest Broadlink library version (0.9)
Browse files Browse the repository at this point in the history
  • Loading branch information
eschava committed May 11, 2018
1 parent 993c3db commit 87c89dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mqtt.py
Expand Up @@ -247,15 +247,15 @@ def get_device(cf):
host = (cf.get('device_host'), 80)
mac = bytearray.fromhex(cf.get('device_mac').replace(':', ' '))
if device_type == 'rm':
device = broadlink.rm(host=host, mac=mac)
device = broadlink.rm(host=host, mac=mac, devtype=0x2712)
elif device_type == 'sp1':
device = broadlink.sp1(host=host, mac=mac)
device = broadlink.sp1(host=host, mac=mac, devtype=0)
elif device_type == 'sp2':
device = broadlink.sp2(host=host, mac=mac)
device = broadlink.sp2(host=host, mac=mac, devtype=0x2711)
elif device_type == 'a1':
device = broadlink.a1(host=host, mac=mac)
device = broadlink.a1(host=host, mac=mac, devtype=0x2714)
elif device_type == 'mp1':
device = broadlink.mp1(host=host, mac=mac)
device = broadlink.mp1(host=host, mac=mac, devtype=0x4EB5)
else:
logging.error('Incorrect device configured: ' + device_type)
sys.exit(2)
Expand Down

0 comments on commit 87c89dd

Please sign in to comment.