diff --git a/lib/extension/deviceBind.js b/lib/extension/deviceBind.js index 5fc2bf48b..6cace0530 100644 --- a/lib/extension/deviceBind.js +++ b/lib/extension/deviceBind.js @@ -11,10 +11,8 @@ const defaultBindGroup = {type: 'group_number', ID: 901}; class DeviceBind extends BaseExtension { onMQTTConnected() { - for (let step = 1; step < 20; step++) { - this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/bind${'/+'.repeat(step)}`); - this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/unbind${'/+'.repeat(step)}`); - } + this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/bind/#`); + this.mqtt.subscribe(`${settings.get().mqtt.base_topic}/bridge/unbind/#`); } async onMQTTMessage(topic, message) { diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index de740431e..81797fafc 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -1186,7 +1186,7 @@ const mapping = { 'F-APP-UK-V2': [cfg.switch, cfg.sensor_power], 'S9TSZGB_3': [cfg.sensor_action], 'S9TSZGB_1': [cfg.sensor_action], - 'SP-EUC01': [cfg.switch], + 'SP-EUC01': [cfg.switch, cfg.sensor_power], '511.012': [cfg.light_brightness], 'GL-S-008Z': [cfg.light_brightness_colortemp_colorxy], 'TZSW22FW-L4': [switchWithPostfix('top'), switchWithPostfix('bottom')], @@ -1307,6 +1307,13 @@ const mapping = { 'SM10ZW': [cfg.binary_sensor_contact, cfg.sensor_battery], 'ICZB-R11D': [cfg.light_brightness], 'SW2500ZB': [cfg.switch], + '4512703': [cfg.sensor_action, cfg.sensor_battery], + '4512702': [cfg.sensor_action, cfg.sensor_battery], + '4090331P9': [cfg.light_brightness_colortemp_colorxy], + 'HS1EB': [cfg.sensor_click], + 'HM-900SW_1': [cfg.switch], + 'HM-900SW_2': [switchWithPostfix('left'), switchWithPostfix('right')], + 'HM-900SW_3': [switchWithPostfix('left'), switchWithPostfix('right'), switchWithPostfix('center')], }; Object.keys(mapping).forEach((key) => { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index fc9c0e84c..c813a5ab2 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -14813,9 +14813,9 @@ } }, "zigbee-herdsman-converters": { - "version": "12.0.43", - "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.43.tgz", - "integrity": "sha512-NaU15sX105c3pfailoQYe9hYueRXzYRYkjbDZSPqWFSsgKaLOayIzBl79EV+HjOSSHD/jymM0CJeYOeLpTFWtg==", + "version": "12.0.44", + "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.44.tgz", + "integrity": "sha512-Xmuarn4vlRxnjgfmPJAauwbIHnpJi2UdSdmpRYEQd216Qk/17pBH6R+O0GO2iUhIgOh0bwmPNE0Jc+BVtUyyKw==", "requires": { "axios": "*", "tar-stream": "*" diff --git a/package.json b/package.json index 250d46c0f..364f65592 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "semver": "*", "winston": "*", "zigbee-herdsman": "0.12.62", - "zigbee-herdsman-converters": "12.0.43" + "zigbee-herdsman-converters": "12.0.44" }, "devDependencies": { "eslint": "*",