@@ -363,8 +363,8 @@ def get_device(cf):
363363 mqtt_subprefix = mqtt_multiple_prefix_format .format (
364364 type = device .type ,
365365 host = device .host [0 ],
366- mac = '_' .join (format (s , '02x' ) for s in device .mac [:: - 1 ] ),
367- mac_nic = '_' .join (format (s , '02x' ) for s in device .mac [2 :: - 1 ]))
366+ mac = '_' .join (format (s , '02x' ) for s in device .mac ),
367+ mac_nic = '_' .join (format (s , '02x' ) for s in device .mac [3 :: ]))
368368 device = configure_device (device , topic_prefix + mqtt_subprefix )
369369 devices_dict [mqtt_subprefix ] = device
370370 return devices_dict
@@ -397,8 +397,8 @@ def get_device(cf):
397397
398398def configure_device (device , mqtt_prefix ):
399399 device .auth ()
400- logging .debug ('Connected to \' %s\' Broadlink device at \' %s\' (MAC %s) and started listening for commands at MQTT topic having prefix \' %s\' '
401- % (device .type , device .host [0 ], ':' .join (format (s , '02x' ) for s in device .mac [:: - 1 ] ), mqtt_prefix ))
400+ logging .debug ('Connected to \' %s\' Broadlink device at \' %s\' (MAC %s) and started listening to MQTT commands at \' %s# \' '
401+ % (device .type , device .host [0 ], ':' .join (format (s , '02x' ) for s in device .mac ), mqtt_prefix ))
402402
403403 broadlink_rm_temperature_interval = cf .get ('broadlink_rm_temperature_interval' , 0 )
404404 if (device .type == 'RM2' or device .type == 'RM4' ) and broadlink_rm_temperature_interval > 0 :
0 commit comments