Skip to content

Commit c808edb

Browse files
committed
RM4 device support
1 parent 123eb1b commit c808edb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mqtt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Type of device. Valid options are 'lookup', 'multiple_lookup', 'rm', 'sp1', 'sp2', 'a1', 'mp1', 'dooya', 'bg1'
1+
# Type of device. Valid options are 'lookup', 'multiple_lookup', 'rm', 'rm4', 'sp1', 'sp2', 'a1', 'mp1', 'dooya', 'bg1'
22
device_type = 'lookup' # use lookup
33

44
## lookup parameters

mqtt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ def get_device(cf):
367367
mac = bytearray.fromhex(cf.get('device_mac').replace(':', ' '))
368368
if device_type == 'rm':
369369
device = broadlink.rm(host=host, mac=mac, devtype=0x2712)
370+
elif device_type == 'rm4':
371+
device = broadlink.rm4(host=host, mac=mac, devtype=0x51da)
370372
elif device_type == 'sp1':
371373
device = broadlink.sp1(host=host, mac=mac, devtype=0)
372374
elif device_type == 'sp2':

0 commit comments

Comments
 (0)