From c5218bbd313ca0da18b703e805cf4dcc01dbd548 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Sun, 22 Sep 2019 20:02:46 +0200 Subject: [PATCH] Update zigbee-herdsman. --- lib/extension/homeassistant.js | 792 ++++++++++++++++----------------- npm-shrinkwrap.json | 12 +- package.json | 2 +- test/stub/zigbeeHerdsman.js | 2 +- 4 files changed, 395 insertions(+), 413 deletions(-) diff --git a/lib/extension/homeassistant.js b/lib/extension/homeassistant.js index 1d1b9577..6668a08f 100644 --- a/lib/extension/homeassistant.js +++ b/lib/extension/homeassistant.js @@ -4,7 +4,7 @@ const logger = require('../util/logger'); const zigbee2mqttVersion = require('../../package.json').version; const BaseExtension = require('./baseExtension'); -const configurations = { +const cfg = { // Binary sensor 'binary_sensor_occupancy': { type: 'binary_sensor', @@ -414,441 +414,419 @@ const switchWithPostfix = (postfix) => { // Map homeassitant configurations to devices. const mapping = { - 'WXKG01LM': [configurations.sensor_click, configurations.sensor_battery], - 'WXKG11LM': [configurations.sensor_click, configurations.sensor_battery], - 'WXKG12LM': [configurations.sensor_click, configurations.sensor_battery, configurations.sensor_action], - // BREAKING_IMPROVEMENT: only use sensor_click for WXKG03LM (action hold -> click hold) - 'WXKG03LM': [configurations.sensor_click, configurations.sensor_battery, configurations.sensor_action], - 'WXKG02LM': [configurations.sensor_click, configurations.sensor_battery], - 'QBKG04LM': [configurations.switch, configurations.sensor_click, configurations.sensor_action], - 'QBKG03LM': [ - switchWithPostfix('left'), switchWithPostfix('right'), configurations.sensor_click, - configurations.sensor_temperature, - ], - 'WSDCGQ01LM': [configurations.sensor_temperature, configurations.sensor_humidity, configurations.sensor_battery], - 'WSDCGQ11LM': [ - configurations.sensor_temperature, configurations.sensor_humidity, configurations.sensor_pressure, - configurations.sensor_battery, - ], - 'RTCGQ01LM': [configurations.binary_sensor_occupancy, configurations.sensor_battery], - 'RTCGQ11LM': [ - configurations.binary_sensor_occupancy, configurations.sensor_illuminance, - configurations.sensor_battery, - ], - 'MCCGQ01LM': [configurations.binary_sensor_contact, configurations.sensor_battery], - 'MCCGQ11LM': [configurations.binary_sensor_contact, configurations.sensor_battery], - 'SJCGQ11LM': [configurations.binary_sensor_water_leak, configurations.sensor_battery], - 'MFKZQ01LM': [configurations.sensor_action, configurations.sensor_battery], - 'ZNCZ02LM': [configurations.switch, configurations.sensor_power], - 'QBCZ11LM': [configurations.switch, configurations.sensor_power], - 'LED1545G12': [configurations.light_brightness_colortemp], - 'LED1623G12': [configurations.light_brightness], - 'LED1622G12': [configurations.light_brightness], - 'LED1537R6': [configurations.light_brightness_colortemp], - 'LED1650R5': [configurations.light_brightness], - 'LED1536G5': [configurations.light_brightness_colortemp], - '7299760PH': [configurations.light_brightness_colorxy], - '7146060PH': [configurations.light_brightness_colortemp_colorxy], - '046677476816': [configurations.light_brightness], - 'F7C033': [configurations.light_brightness], - 'JTYJ-GD-01LM/BW': [configurations.binary_sensor_smoke, configurations.sensor_battery], - 'PLUG EDP RE:DY': [configurations.switch, configurations.sensor_power], - 'SWITCH EDP RE:DY': [configurations.switch], - 'CC2530.ROUTER': [configurations.binary_sensor_router], - 'AA70155': [configurations.light_brightness_colortemp], - '4058075816718': [configurations.light_brightness_colortemp_colorxy], - 'AA69697': [configurations.light_brightness_colortemp_colorxy], - 'HALIGHTDIMWWE27': [configurations.light_brightness], - 'HALIGHTDIMWWB22': [configurations.light_brightness], - 'AB3257001NJ': [configurations.switch], - 'AC10691': [configurations.switch], - '8718696449691': [configurations.light_brightness], - 'RB 185 C': [configurations.light_brightness_colortemp_colorxy], - 'BY 185 C': [configurations.light_brightness_colortemp_colorxy], - '9290012573A': [configurations.light_brightness_colortemp_colorxy], - 'LED1624G9': [configurations.light_brightness_colorxy], - 'LED1837R5': [configurations.light_brightness], - '73742': [configurations.light_brightness_colortemp], - '73740': [configurations.light_brightness_colortemp], - '73739': [configurations.light_brightness_colortemp_colorxy], - '22670': [configurations.light_brightness], - 'ICTC-G-1': [configurations.sensor_brightness, configurations.sensor_battery, configurations.sensor_action], - 'ICPSHC24-30EU-IL-1': [configurations.light_brightness], - '45852GE': [configurations.light_brightness], - 'E11-G13': [configurations.light_brightness], - 'LED1649C5': [configurations.light_brightness], - 'ICPSHC24-10EU-IL-1': [configurations.light_brightness], - 'LED1546G12': [configurations.light_brightness_colortemp], - 'L1527': [configurations.light_brightness_colortemp], - 'L1529': [configurations.light_brightness_colortemp], - 'L1528': [configurations.light_brightness_colortemp], - 'L1531': [configurations.light_brightness_colortemp], - 'RB 165': [configurations.light_brightness], - 'RB 175 W': [configurations.light_brightness], - 'RS 125': [configurations.light_brightness], - 'RS 225': [configurations.light_brightness], - 'RB 145': [configurations.light_brightness], - 'RB 245': [configurations.light_brightness], - 'PL 110': [configurations.light_brightness], - 'ST 110': [configurations.light_brightness], - 'UC 110': [configurations.light_brightness], - 'DL 110 N': [configurations.light_brightness], - 'DL 110 W': [configurations.light_brightness], - 'SL 110 N': [configurations.light_brightness], - 'SL 110 M': [configurations.light_brightness], - 'SL 110 W': [configurations.light_brightness], - 'AA68199': [configurations.light_brightness_colortemp], - 'QBKG11LM': [configurations.switch, configurations.sensor_power, configurations.sensor_click], - 'QBKG12LM': [ - switchWithPostfix('left'), switchWithPostfix('right'), configurations.sensor_power, - configurations.sensor_click, - ], - 'K2RGBW01': [configurations.light_brightness_colortemp_colorxy], - '9290011370': [configurations.light_brightness], - 'DNCKATSW001': [configurations.switch], - 'Z809A': [configurations.switch, configurations.sensor_power], - 'NL08-0800': [configurations.light_brightness], - '915005106701': [configurations.light_brightness_colortemp_colorxy], - 'AB32840': [configurations.light_brightness_colortemp], - '8718696485880': [configurations.light_brightness_colortemp_colorxy], - '8718696598283': [configurations.light_brightness_colortemp], - '8718696695203': [configurations.light_brightness_colortemp], - '73693': [configurations.light_brightness_colortemp_colorxy], - '324131092621': [configurations.sensor_action, configurations.sensor_battery], - '9290012607': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_illuminance, configurations.sensor_battery, - ], - 'GL-C-008': [configurations.light_brightness_colortemp_colorxy_white], - 'STSS-MULT-001': [configurations.binary_sensor_contact, configurations.sensor_battery], - 'E11-G23/E11-G33': [configurations.light_brightness], - 'E1ACA4ABE38A': [configurations.light_brightness], - 'AC03645': [configurations.light_brightness_colortemp_colorxy], - 'AC03641': [configurations.light_brightness], - 'AC03648': [configurations.light_brightness_colortemp], - 'FB56+ZSW05HG1.2': [configurations.switch], - '72922-A': [configurations.switch], - 'AC03642': [configurations.light_brightness_colortemp], - 'AC08560': [configurations.light_brightness], + 'WXKG01LM': [cfg.sensor_click, cfg.sensor_battery], + 'WXKG11LM': [cfg.sensor_click, cfg.sensor_battery], + 'WXKG12LM': [cfg.sensor_click, cfg.sensor_battery, cfg.sensor_action], + // DEPRECATED; BREAKING_IMPROVEMENT: only use sensor_click for WXKG03LM (action hold -> click hold) + 'WXKG03LM': [cfg.sensor_click, cfg.sensor_battery, cfg.sensor_action], + 'WXKG02LM': [cfg.sensor_click, cfg.sensor_battery], + 'QBKG04LM': [cfg.switch, cfg.sensor_click, cfg.sensor_action], + 'QBKG03LM': [switchWithPostfix('left'), switchWithPostfix('right'), cfg.sensor_click, cfg.sensor_temperature], + 'WSDCGQ01LM': [cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_battery], + 'WSDCGQ11LM': [cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_pressure, cfg.sensor_battery], + 'RTCGQ01LM': [cfg.binary_sensor_occupancy, cfg.sensor_battery], + 'RTCGQ11LM': [cfg.binary_sensor_occupancy, cfg.sensor_illuminance, cfg.sensor_battery], + 'MCCGQ01LM': [cfg.binary_sensor_contact, cfg.sensor_battery], + 'MCCGQ11LM': [cfg.binary_sensor_contact, cfg.sensor_battery], + 'SJCGQ11LM': [cfg.binary_sensor_water_leak, cfg.sensor_battery], + 'MFKZQ01LM': [cfg.sensor_action, cfg.sensor_battery], + 'ZNCZ02LM': [cfg.switch, cfg.sensor_power], + 'QBCZ11LM': [cfg.switch, cfg.sensor_power], + 'LED1545G12': [cfg.light_brightness_colortemp], + 'LED1623G12': [cfg.light_brightness], + 'LED1622G12': [cfg.light_brightness], + 'LED1537R6': [cfg.light_brightness_colortemp], + 'LED1650R5': [cfg.light_brightness], + 'LED1536G5': [cfg.light_brightness_colortemp], + '7299760PH': [cfg.light_brightness_colorxy], + '7146060PH': [cfg.light_brightness_colortemp_colorxy], + '046677476816': [cfg.light_brightness], + 'F7C033': [cfg.light_brightness], + 'JTYJ-GD-01LM/BW': [cfg.binary_sensor_smoke, cfg.sensor_battery], + 'PLUG EDP RE:DY': [cfg.switch, cfg.sensor_power], + 'SWITCH EDP RE:DY': [cfg.switch], + 'CC2530.ROUTER': [cfg.binary_sensor_router], + 'AA70155': [cfg.light_brightness_colortemp], + '4058075816718': [cfg.light_brightness_colortemp_colorxy], + 'AA69697': [cfg.light_brightness_colortemp_colorxy], + 'HALIGHTDIMWWE27': [cfg.light_brightness], + 'HALIGHTDIMWWB22': [cfg.light_brightness], + 'AB3257001NJ': [cfg.switch], + 'AC10691': [cfg.switch], + '8718696449691': [cfg.light_brightness], + 'RB 185 C': [cfg.light_brightness_colortemp_colorxy], + 'BY 185 C': [cfg.light_brightness_colortemp_colorxy], + '9290012573A': [cfg.light_brightness_colortemp_colorxy], + 'LED1624G9': [cfg.light_brightness_colorxy], + 'LED1837R5': [cfg.light_brightness], + '73742': [cfg.light_brightness_colortemp], + '73740': [cfg.light_brightness_colortemp], + '73739': [cfg.light_brightness_colortemp_colorxy], + '22670': [cfg.light_brightness], + 'ICTC-G-1': [cfg.sensor_brightness, cfg.sensor_battery, cfg.sensor_action], + 'ICPSHC24-30EU-IL-1': [cfg.light_brightness], + '45852GE': [cfg.light_brightness], + 'E11-G13': [cfg.light_brightness], + 'LED1649C5': [cfg.light_brightness], + 'ICPSHC24-10EU-IL-1': [cfg.light_brightness], + 'LED1546G12': [cfg.light_brightness_colortemp], + 'L1527': [cfg.light_brightness_colortemp], + 'L1529': [cfg.light_brightness_colortemp], + 'L1528': [cfg.light_brightness_colortemp], + 'L1531': [cfg.light_brightness_colortemp], + 'RB 165': [cfg.light_brightness], + 'RB 175 W': [cfg.light_brightness], + 'RS 125': [cfg.light_brightness], + 'RS 225': [cfg.light_brightness], + 'RB 145': [cfg.light_brightness], + 'RB 245': [cfg.light_brightness], + 'PL 110': [cfg.light_brightness], + 'ST 110': [cfg.light_brightness], + 'UC 110': [cfg.light_brightness], + 'DL 110 N': [cfg.light_brightness], + 'DL 110 W': [cfg.light_brightness], + 'SL 110 N': [cfg.light_brightness], + 'SL 110 M': [cfg.light_brightness], + 'SL 110 W': [cfg.light_brightness], + 'AA68199': [cfg.light_brightness_colortemp], + 'QBKG11LM': [cfg.switch, cfg.sensor_power, cfg.sensor_click], + 'QBKG12LM': [switchWithPostfix('left'), switchWithPostfix('right'), cfg.sensor_power, cfg.sensor_click], + 'K2RGBW01': [cfg.light_brightness_colortemp_colorxy], + '9290011370': [cfg.light_brightness], + 'DNCKATSW001': [cfg.switch], + 'Z809A': [cfg.switch, cfg.sensor_power], + 'NL08-0800': [cfg.light_brightness], + '915005106701': [cfg.light_brightness_colortemp_colorxy], + 'AB32840': [cfg.light_brightness_colortemp], + '8718696485880': [cfg.light_brightness_colortemp_colorxy], + '8718696598283': [cfg.light_brightness_colortemp], + '8718696695203': [cfg.light_brightness_colortemp], + '73693': [cfg.light_brightness_colortemp_colorxy], + '324131092621': [cfg.sensor_action, cfg.sensor_battery], + '9290012607': [cfg.binary_sensor_occupancy, cfg.sensor_temperature, cfg.sensor_illuminance, cfg.sensor_battery], + 'GL-C-008': [cfg.light_brightness_colortemp_colorxy_white], + 'STSS-MULT-001': [cfg.binary_sensor_contact, cfg.sensor_battery], + 'E11-G23/E11-G33': [cfg.light_brightness], + 'E1ACA4ABE38A': [cfg.light_brightness], + 'AC03645': [cfg.light_brightness_colortemp_colorxy], + 'AC03641': [cfg.light_brightness], + 'AC03648': [cfg.light_brightness_colortemp], + 'FB56+ZSW05HG1.2': [cfg.switch], + '72922-A': [cfg.switch], + 'AC03642': [cfg.light_brightness_colortemp], + 'AC08560': [cfg.light_brightness], 'DNCKATSW002': [switchWithPostfix('left'), switchWithPostfix('right')], 'DNCKATSW003': [switchWithPostfix('left'), switchWithPostfix('right'), switchWithPostfix('center')], 'DNCKATSW004': [ switchWithPostfix('bottom_left'), switchWithPostfix('bottom_right'), switchWithPostfix('top_left'), switchWithPostfix('top_right'), ], - 'BY 165': [configurations.light_brightness], - 'ZLED-2709': [configurations.light_brightness], - '8718696548738': [configurations.light_brightness_colortemp], - '915005587401': [configurations.light_brightness_colortemp], - '4052899926110': [configurations.light_brightness_colortemp_colorxy], - 'Z01-CIA19NAE26': [configurations.light_brightness], - 'E11-N1EA': [configurations.light_brightness_colortemp_colorxy], - '74283': [configurations.light_brightness], - 'JTQJ-BF-01LM/BW': [ - configurations.binary_sensor_gas, - configurations.sensor_gas_density, - ], - '50043': [configurations.switch], - '50045': [configurations.light_brightness], - 'AV2010/22': [configurations.binary_sensor_occupancy, configurations.sensor_battery], - '3210-L': [configurations.switch], - '3320-L': [configurations.binary_sensor_contact], - '3326-L': [configurations.binary_sensor_occupancy, configurations.sensor_temperature], - '7299355PH': [configurations.light_brightness_colorxy], - '45857GE': [configurations.light_brightness], - 'A6121': [configurations.sensor_lock], - '433714': [configurations.light_brightness], - '3261030P7': [configurations.light_brightness_colortemp], - '3216431P5': [configurations.light_brightness_colortemp], - 'DJT11LM': [configurations.sensor_action, configurations.sensor_battery], - 'E1603/E1702': [configurations.switch], - '7199960PH': [configurations.light_brightness_colorxy], - '74696': [configurations.light_brightness], - 'AB35996': [configurations.light_brightness_colortemp_colorxy], - 'AB401130055': [configurations.light_brightness_colortemp], - '74282': [configurations.light_brightness_colortemp], - 'RS 128 T': [configurations.light_brightness_colortemp], - '53170161': [configurations.light_brightness_colortemp], - '4058075036147': [configurations.light_brightness_colortemp_colorxy], - 'KS-SM001': [configurations.switch], + 'BY 165': [cfg.light_brightness], + 'ZLED-2709': [cfg.light_brightness], + '8718696548738': [cfg.light_brightness_colortemp], + '915005587401': [cfg.light_brightness_colortemp], + '4052899926110': [cfg.light_brightness_colortemp_colorxy], + 'Z01-CIA19NAE26': [cfg.light_brightness], + 'E11-N1EA': [cfg.light_brightness_colortemp_colorxy], + '74283': [cfg.light_brightness], + 'JTQJ-BF-01LM/BW': [cfg.binary_sensor_gas, cfg.sensor_gas_density], + '50043': [cfg.switch], + '50045': [cfg.light_brightness], + 'AV2010/22': [cfg.binary_sensor_occupancy, cfg.sensor_battery], + '3210-L': [cfg.switch], + '3320-L': [cfg.binary_sensor_contact], + '3326-L': [cfg.binary_sensor_occupancy, cfg.sensor_temperature], + '7299355PH': [cfg.light_brightness_colorxy], + '45857GE': [cfg.light_brightness], + 'A6121': [cfg.sensor_lock], + '433714': [cfg.light_brightness], + '3261030P7': [cfg.light_brightness_colortemp], + '3216431P5': [cfg.light_brightness_colortemp], + 'DJT11LM': [cfg.sensor_action, cfg.sensor_battery], + 'E1603/E1702': [cfg.switch], + '7199960PH': [cfg.light_brightness_colorxy], + '74696': [cfg.light_brightness], + 'AB35996': [cfg.light_brightness_colortemp_colorxy], + 'AB401130055': [cfg.light_brightness_colortemp], + '74282': [cfg.light_brightness_colortemp], + 'RS 128 T': [cfg.light_brightness_colortemp], + '53170161': [cfg.light_brightness_colortemp], + '4058075036147': [cfg.light_brightness_colortemp_colorxy], + 'KS-SM001': [cfg.switch], 'MG-AUWS01': [switchWithPostfix('left'), switchWithPostfix('right')], - '9290002579A': [configurations.light_brightness_colortemp_colorxy], - '4256251-RZHAC': [configurations.switch, configurations.sensor_power], - 'STS-PRS-251': [configurations.binary_sensor_presence, configurations.sensor_battery], - '4058075816794': [configurations.light_brightness_colortemp], - '4052899926158': [configurations.light_brightness], - '4058075036185': [configurations.light_brightness_colortemp_colorxy], - '50049': [configurations.light_brightness_colorxy], - '915005733701': [configurations.light_brightness_colortemp_colorxy], - 'RB 285 C': [configurations.light_brightness_colortemp_colorxy], - '3216331P5': [configurations.light_brightness_colortemp], - 'AC08562': [configurations.light_brightness], - '900008-WW': [configurations.light_brightness], - 'Mega23M12': [configurations.light_brightness_colortemp_colorxy], - 'PSS-23ZBS': [configurations.switch], - 'HS1SA': [configurations.binary_sensor_smoke, configurations.binary_sensor_battery_low], - 'Z01-A19NAE26': [configurations.light_brightness_colortemp], - 'Z01-A60EAE27': [configurations.light_brightness_colortemp], - 'AC01353010G': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.binary_sensor_battery_low, - ], - 'SP 120': [configurations.switch, configurations.sensor_power], - 'RB 248 T': [configurations.light_brightness_colortemp], - 'HS3SA': [configurations.binary_sensor_smoke, configurations.binary_sensor_battery_low], - 'HS1DS/HS3DS': [configurations.binary_sensor_contact], - 'HS1WL/HS3WL': [configurations.binary_sensor_water_leak], - 'HS1-WL-E': [configurations.binary_sensor_water_leak], - '421786': [configurations.light_brightness], - 'ICZB-IW11D': [configurations.light_brightness], - '3321-S': [configurations.binary_sensor_contact, configurations.sensor_temperature], - 'ZPIR-8000': [configurations.binary_sensor_occupancy], - 'ZCTS-808': [configurations.binary_sensor_contact, configurations.sensor_battery], - 'ZNLDP12LM': [configurations.light_brightness_colortemp], - 'D1821': [configurations.light_brightness_colortemp_colorxy], - 'ZNCLDJ11LM': [configurations.cover_position, configurations.sensor_cover], - 'LTFY004': [configurations.light_brightness_colorxy], - 'GL-S-007Z': [configurations.light_brightness_colortemp_colorxy], - '3325-S': [configurations.sensor_temperature, configurations.binary_sensor_occupancy], - '4713407': [configurations.light_brightness], - '464800': [configurations.light_brightness_colortemp], - '3261331P7': [configurations.light_brightness_colortemp], - '4033930P7': [configurations.light_brightness_colortemp], - 'GL-B-008Z': [configurations.light_brightness_colortemp_colorxy], - 'AV2010/25': [configurations.switch, configurations.sensor_power], - 'E12-N14': [configurations.light_brightness], - '1TST-EU': [configurations.thermostat, configurations.sensor_battery], - 'RB 178 T': [configurations.light_brightness_colortemp], - '45856GE': [configurations.switch], - 'GL-D-003Z': [configurations.light_brightness_colortemp_colorxy], - 'GD-CZ-006': [configurations.light_brightness], + '9290002579A': [cfg.light_brightness_colortemp_colorxy], + '4256251-RZHAC': [cfg.switch, cfg.sensor_power], + 'STS-PRS-251': [cfg.binary_sensor_presence, cfg.sensor_battery], + '4058075816794': [cfg.light_brightness_colortemp], + '4052899926158': [cfg.light_brightness], + '4058075036185': [cfg.light_brightness_colortemp_colorxy], + '50049': [cfg.light_brightness_colorxy], + '915005733701': [cfg.light_brightness_colortemp_colorxy], + 'RB 285 C': [cfg.light_brightness_colortemp_colorxy], + '3216331P5': [cfg.light_brightness_colortemp], + 'AC08562': [cfg.light_brightness], + '900008-WW': [cfg.light_brightness], + 'Mega23M12': [cfg.light_brightness_colortemp_colorxy], + 'PSS-23ZBS': [cfg.switch], + 'HS1SA': [cfg.binary_sensor_smoke, cfg.binary_sensor_battery_low], + 'Z01-A19NAE26': [cfg.light_brightness_colortemp], + 'Z01-A60EAE27': [cfg.light_brightness_colortemp], + 'AC01353010G': [cfg.binary_sensor_occupancy, cfg.sensor_temperature, cfg.binary_sensor_battery_low], + 'SP 120': [cfg.switch, cfg.sensor_power], + 'RB 248 T': [cfg.light_brightness_colortemp], + 'HS3SA': [cfg.binary_sensor_smoke, cfg.binary_sensor_battery_low], + 'HS1DS/HS3DS': [cfg.binary_sensor_contact], + 'HS1WL/HS3WL': [cfg.binary_sensor_water_leak], + 'HS1-WL-E': [cfg.binary_sensor_water_leak], + '421786': [cfg.light_brightness], + 'ICZB-IW11D': [cfg.light_brightness], + '3321-S': [cfg.binary_sensor_contact, cfg.sensor_temperature], + 'ZPIR-8000': [cfg.binary_sensor_occupancy], + 'ZCTS-808': [cfg.binary_sensor_contact, cfg.sensor_battery], + 'ZNLDP12LM': [cfg.light_brightness_colortemp], + 'D1821': [cfg.light_brightness_colortemp_colorxy], + 'ZNCLDJ11LM': [cfg.cover_position, cfg.sensor_cover], + 'LTFY004': [cfg.light_brightness_colorxy], + 'GL-S-007Z': [cfg.light_brightness_colortemp_colorxy], + '3325-S': [cfg.sensor_temperature, cfg.binary_sensor_occupancy], + '4713407': [cfg.light_brightness], + '464800': [cfg.light_brightness_colortemp], + '3261331P7': [cfg.light_brightness_colortemp], + '4033930P7': [cfg.light_brightness_colortemp], + 'GL-B-008Z': [cfg.light_brightness_colortemp_colorxy], + 'AV2010/25': [cfg.switch, cfg.sensor_power], + 'E12-N14': [cfg.light_brightness], + '1TST-EU': [cfg.thermostat, cfg.sensor_battery], + 'RB 178 T': [cfg.light_brightness_colortemp], + '45856GE': [cfg.switch], + 'GL-D-003Z': [cfg.light_brightness_colortemp_colorxy], + 'GD-CZ-006': [cfg.light_brightness], 'AIRAM-CTR.U': [], - 'HGZB-20-DE': [configurations.switch], - 'D1531': [configurations.light_brightness], - 'D1532': [configurations.light_brightness], + 'HGZB-20-DE': [cfg.switch], + 'D1531': [cfg.light_brightness], + 'D1532': [cfg.light_brightness], 'AV2010/32': [], - 'HGZB-07A': [configurations.light_brightness_colortemp_colorxy], - 'E1524/E1810': [configurations.sensor_action, configurations.sensor_battery], - 'GL-C-006/GL-C-009': [configurations.light_brightness_colortemp], - '100.424.11': [configurations.light_brightness_colortemp], - 'AC0251100NJ': [configurations.sensor_action, configurations.sensor_battery], - '71831': [configurations.light_brightness_colortemp], - '404000/404005/404012': [configurations.light_brightness_colortemp_colorxy], - '404006/404008/404004': [configurations.light_brightness_colortemp], - 'MLI-404011': [configurations.sensor_action], - 'GL-S-003Z': [configurations.light_brightness_colortemp_colorxy], - 'HS1DS-E': [configurations.binary_sensor_contact], - 'SP600': [configurations.switch, configurations.sensor_power], - '1613V': [configurations.switch, configurations.sensor_power], - 'XVV-Mega23M12': [configurations.light_brightness_colortemp], - 'GL-B-007Z': [configurations.light_brightness_colortemp_colorxy], - '81809': [configurations.light_brightness_colortemp_colorxy], - '4090130P7': [configurations.light_brightness_colortemp_colorxy], - '100.110.39': [configurations.light_brightness_colortemp_colorxy], + 'HGZB-07A': [cfg.light_brightness_colortemp_colorxy], + 'E1524/E1810': [cfg.sensor_action, cfg.sensor_battery], + 'GL-C-006/GL-C-009': [cfg.light_brightness_colortemp], + '100.424.11': [cfg.light_brightness_colortemp], + 'AC0251100NJ': [cfg.sensor_action, cfg.sensor_battery], + '71831': [cfg.light_brightness_colortemp], + '404000/404005/404012': [cfg.light_brightness_colortemp_colorxy], + '404006/404008/404004': [cfg.light_brightness_colortemp], + 'MLI-404011': [cfg.sensor_action], + 'GL-S-003Z': [cfg.light_brightness_colortemp_colorxy], + 'HS1DS-E': [cfg.binary_sensor_contact], + 'SP600': [cfg.switch, cfg.sensor_power], + '1613V': [cfg.switch, cfg.sensor_power], + 'XVV-Mega23M12': [cfg.light_brightness_colortemp], + 'GL-B-007Z': [cfg.light_brightness_colortemp_colorxy], + '81809': [cfg.light_brightness_colortemp_colorxy], + '4090130P7': [cfg.light_brightness_colortemp_colorxy], + '100.110.39': [cfg.light_brightness_colortemp_colorxy], 'TI0001': [switchWithPostfix('left'), switchWithPostfix('right')], 'SPZB0001': [], - 'HS3CG': [configurations.binary_sensor_gas], - '81825': [configurations.sensor_action], - 'Z809AF': [configurations.switch, configurations.sensor_power], + 'HS3CG': [cfg.binary_sensor_gas], + '81825': [cfg.sensor_action], + 'Z809AF': [cfg.switch, cfg.sensor_power], 'RADON TriTech ZB': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, cfg.sensor_battery, cfg.binary_sensor_battery_low, ], - 'IM-Z3.0-DIM': [configurations.light_brightness], + 'IM-Z3.0-DIM': [cfg.light_brightness], 'E1746': [], - 'YRD426NRSC': [configurations.lock, configurations.sensor_battery], - 'E1743': [configurations.sensor_click, configurations.sensor_battery], - 'LED1732G11': [configurations.light_brightness_colortemp], - 'LED1736G9': [configurations.light_brightness_colortemp], - 'RB 265': [configurations.light_brightness], + 'YRD426NRSC': [cfg.lock, cfg.sensor_battery], + 'E1743': [cfg.sensor_click, cfg.sensor_battery], + 'LED1732G11': [cfg.light_brightness_colortemp], + 'LED1736G9': [cfg.light_brightness_colortemp], + 'RB 265': [cfg.light_brightness], '9290019758': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_illuminance, configurations.sensor_battery, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_illuminance, cfg.sensor_battery, ], 'HGZB-042': [switchWithPostfix('top'), switchWithPostfix('bottom')], 'HGZB-42': [switchWithPostfix('top'), switchWithPostfix('bottom')], - 'GL-FL-004TZ': [configurations.light_brightness_colortemp_colorxy], - 'IM6001-OTP05': [configurations.switch], + 'GL-FL-004TZ': [cfg.light_brightness_colortemp_colorxy], + 'IM6001-OTP05': [cfg.switch], 'SV01': [ - configurations.cover_position, configurations.sensor_temperature, configurations.sensor_pressure, - configurations.sensor_battery, + cfg.cover_position, cfg.sensor_temperature, cfg.sensor_pressure, + cfg.sensor_battery, ], 'SV02': [ - configurations.cover_position, configurations.sensor_temperature, configurations.sensor_pressure, - configurations.sensor_battery, + cfg.cover_position, cfg.sensor_temperature, cfg.sensor_pressure, + cfg.sensor_battery, ], - '316GLEDRF': [configurations.light_brightness], - 'LVS-ZB500D': [configurations.light_brightness], + '316GLEDRF': [cfg.light_brightness], + 'LVS-ZB500D': [cfg.light_brightness], 'ST218': [], - 'E1525': [configurations.binary_sensor_occupancy, configurations.sensor_battery], - 'ZYCT-202': [configurations.sensor_action], - 'GR-ZB01-W': [configurations.cover_position], - '4090531P7': [configurations.light_brightness_colortemp_colorxy], - 'HGZB-42-UK / HGZB-41': [configurations.switch], + 'E1525': [cfg.binary_sensor_occupancy, cfg.sensor_battery], + 'ZYCT-202': [cfg.sensor_action], + 'GR-ZB01-W': [cfg.cover_position], + '4090531P7': [cfg.light_brightness_colortemp_colorxy], + 'HGZB-42-UK / HGZB-41': [cfg.switch], 'ISW-ZPR1-WP13': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], - '9290018195': [configurations.light_brightness], - 'HGZB-04D': [configurations.light_brightness], + '9290018195': [cfg.light_brightness], + 'HGZB-04D': [cfg.light_brightness], 'HGZB-043': [switchWithPostfix('top'), switchWithPostfix('bottom'), switchWithPostfix('center')], 'NCZ-3043-HA': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], 'NCZ-3041-HA': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], 'NCZ-3045-HA': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], 'STS-IRM-250': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], '3305-S': [ - configurations.binary_sensor_occupancy, configurations.sensor_temperature, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.binary_sensor_occupancy, cfg.sensor_temperature, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], '3300-S': [ - configurations.sensor_temperature, configurations.binary_sensor_contact, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.sensor_temperature, cfg.binary_sensor_contact, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], - 'IM6001-BTP01': [configurations.sensor_click, configurations.sensor_temperature], - 'AV2010/34': [configurations.sensor_click], + 'IM6001-BTP01': [cfg.sensor_click, cfg.sensor_temperature], + 'AV2010/34': [cfg.sensor_click], 'PP-WHT-US': [ - configurations.switch, configurations.sensor_power, - configurations.sensor_current, configurations.sensor_voltage, + cfg.switch, cfg.sensor_power, + cfg.sensor_current, cfg.sensor_voltage, ], 'CR701-YZ': [ - configurations.binary_sensor_battery_low, configurations.binary_sensor_carbon_monoxide, - configurations.binary_sensor_gas, + cfg.binary_sensor_battery_low, cfg.binary_sensor_carbon_monoxide, + cfg.binary_sensor_gas, ], - 'HGZB-1S': [configurations.switch, configurations.sensor_click], - 'HGZB-045': [configurations.switch, configurations.sensor_click], + 'HGZB-1S': [cfg.switch, cfg.sensor_click], + 'HGZB-045': [cfg.switch, cfg.sensor_click], 'HGZB-43': [switchWithPostfix('top'), switchWithPostfix('bottom'), switchWithPostfix('center')], - 'HGZB-01A': [configurations.switch], - 'HGZB-02A': [configurations.light_brightness], - 'MCT-350 SMA': [configurations.binary_sensor_contact], - '3310-S': [configurations.sensor_temperature, configurations.sensor_battery], + 'HGZB-01A': [cfg.switch], + 'HGZB-02A': [cfg.light_brightness], + 'MCT-350 SMA': [cfg.binary_sensor_contact], + '3310-S': [cfg.sensor_temperature, cfg.sensor_battery], 'IM6001-WLP01': [ - configurations.sensor_temperature, configurations.binary_sensor_water_leak, - configurations.sensor_battery, + cfg.sensor_temperature, cfg.binary_sensor_water_leak, + cfg.sensor_battery, ], '3315-S': [ - configurations.sensor_temperature, configurations.binary_sensor_water_leak, - configurations.sensor_battery, + cfg.sensor_temperature, cfg.binary_sensor_water_leak, + cfg.sensor_battery, ], 'F-MLT-US-2': [ - configurations.sensor_temperature, configurations.binary_sensor_contact, - configurations.sensor_battery, configurations.binary_sensor_battery_low, + cfg.sensor_temperature, cfg.binary_sensor_contact, + cfg.sensor_battery, cfg.binary_sensor_battery_low, ], - 'SWO-KEF1PA': [configurations.sensor_action], - 'HGZB-02S': [configurations.sensor_click, configurations.switch], - 'HGZB-41': [configurations.switch], - 'ZG9101SAC-HP': [configurations.light_brightness], - 'RS 122': [configurations.light_brightness], - 'GL-B-001Z': [configurations.light_brightness_colortemp_colorxy], + 'SWO-KEF1PA': [cfg.sensor_action], + 'HGZB-02S': [cfg.sensor_click, cfg.switch], + 'HGZB-41': [cfg.switch], + 'ZG9101SAC-HP': [cfg.light_brightness], + 'RS 122': [cfg.light_brightness], + 'GL-B-001Z': [cfg.light_brightness_colortemp_colorxy], 'IM6001-MTP01': [ - configurations.sensor_temperature, configurations.sensor_battery, - configurations.binary_sensor_occupancy, + cfg.sensor_temperature, cfg.sensor_battery, + cfg.binary_sensor_occupancy, ], 'U86K31ND6': [switchWithPostfix('left'), switchWithPostfix('right'), switchWithPostfix('center')], - 'HLD812-Z-SC': [configurations.light_brightness], - 'HLC610-Z': [configurations.light_brightness], - 'BY 285 C': [configurations.light_brightness_colortemp_colorxy], - 'HS1RC-M': [configurations.sensor_action, configurations.sensor_battery], - 'SWO-WDS1PA': [configurations.binary_sensor_contact], + 'HLD812-Z-SC': [cfg.light_brightness], + 'HLC610-Z': [cfg.light_brightness], + 'BY 285 C': [cfg.light_brightness_colortemp_colorxy], + 'HS1RC-M': [cfg.sensor_action, cfg.sensor_battery], + 'SWO-WDS1PA': [cfg.binary_sensor_contact], 'LLKZMK11LM': [switchWithPostfix('l1'), switchWithPostfix('l2')], - 'LVS-SM10ZW': [configurations.binary_sensor_contact, configurations.binary_sensor_battery_low], - 'HS2SK': [configurations.switch, configurations.sensor_power], - '45853GE': [configurations.switch, configurations.sensor_power], - '50064': [configurations.light_brightness_colortemp], - '9290011998B': [configurations.light_brightness_colortemp], - '9290022167': [configurations.light_brightness_colortemp], - '4096730U7': [configurations.light_brightness_colortemp], - 'RB 278 T': [configurations.light_brightness], + 'LVS-SM10ZW': [cfg.binary_sensor_contact, cfg.binary_sensor_battery_low], + 'HS2SK': [cfg.switch, cfg.sensor_power], + '45853GE': [cfg.switch, cfg.sensor_power], + '50064': [cfg.light_brightness_colortemp], + '9290011998B': [cfg.light_brightness_colortemp], + '9290022167': [cfg.light_brightness_colortemp], + '4096730U7': [cfg.light_brightness_colortemp], + 'RB 278 T': [cfg.light_brightness], '3315-G': [ - configurations.sensor_temperature, configurations.sensor_battery, configurations.binary_sensor_water_leak, + cfg.sensor_temperature, cfg.sensor_battery, cfg.binary_sensor_water_leak, ], - 'N2G-SP': [configurations.sensor_power, configurations.switch], - 'AC0363900NJ': [configurations.light_brightness_colortemp_colorxy], - 'LXZB-02A': [configurations.light_brightness], - 'GL-S-004Z': [configurations.light_brightness_colortemp], - 'SCM-5ZBS': [configurations.cover_position], - 'YRD226HA2619': [configurations.sensor_battery, configurations.lock], - 'YMF40': [configurations.lock], - 'V3-BTZB': [configurations.lock], - '3RSS008Z': [configurations.switch, configurations.sensor_battery], - '99432': [configurations.fan, configurations.light_brightness], - '511.10': [configurations.light_brightness], + 'N2G-SP': [cfg.sensor_power, cfg.switch], + 'AC0363900NJ': [cfg.light_brightness_colortemp_colorxy], + 'LXZB-02A': [cfg.light_brightness], + 'GL-S-004Z': [cfg.light_brightness_colortemp], + 'SCM-5ZBS': [cfg.cover_position], + 'YRD226HA2619': [cfg.sensor_battery, cfg.lock], + 'YMF40': [cfg.lock], + 'V3-BTZB': [cfg.lock], + '3RSS008Z': [cfg.switch, cfg.sensor_battery], + '99432': [cfg.fan, cfg.light_brightness], + '511.10': [cfg.light_brightness], 'IM6001-MPP01': [ - configurations.sensor_temperature, configurations.binary_sensor_contact, configurations.sensor_battery, + cfg.sensor_temperature, cfg.binary_sensor_contact, cfg.sensor_battery, ], - 'HLC821-Z-SC': [configurations.light_brightness], - 'RS 228 T': [configurations.light_brightness_colortemp], - '67200BL': [configurations.switch], - '2430-100': [configurations.sensor_action], - '100.425.90': [configurations.switch], - '74580': [configurations.light_brightness], + 'HLC821-Z-SC': [cfg.light_brightness], + 'RS 228 T': [cfg.light_brightness_colortemp], + '67200BL': [cfg.switch], + '2430-100': [cfg.sensor_action], + '100.425.90': [cfg.switch], + '74580': [cfg.light_brightness], 'HS1CA-E': [ - configurations.binary_sensor_carbon_monoxide, configurations.binary_sensor_battery_low, - configurations.sensor_battery, + cfg.binary_sensor_carbon_monoxide, cfg.binary_sensor_battery_low, + cfg.sensor_battery, ], - 'MCT-340 E': [configurations.binary_sensor_contact], - 'D1542': [configurations.light_brightness_colortemp], - 'ZGRC-KEY-013': [configurations.sensor_click], - 'ZigUP': [configurations.switch], - 'YRD256HA20BP': [configurations.sensor_battery, configurations.lock], - 'SZ-ESW01-AU': [configurations.sensor_power, configurations.switch], - 'PSM-29ZBSR': [configurations.switch], - 'ZM350STW1TCF': [configurations.light_brightness_colortemp], - 'M350STW1': [configurations.light_brightness], - 'A806S-Q1R': [configurations.light_brightness], - 'XY12S-15': [configurations.light_brightness_colortemp_colorxy], - 'B07KG5KF5R': [configurations.light_brightness_colortemp], - 'SCM-S1': [configurations.cover_position], - 'HEIMAN-M1': [configurations.binary_sensor_contact], - '3216131P5': [configurations.light_brightness_colortemp], - 'ST8AU-CON': [configurations.light_brightness], - 'HS3MS': [configurations.binary_sensor_occupancy], + 'MCT-340 E': [cfg.binary_sensor_contact], + 'D1542': [cfg.light_brightness_colortemp], + 'ZGRC-KEY-013': [cfg.sensor_click], + 'ZigUP': [cfg.switch], + 'YRD256HA20BP': [cfg.sensor_battery, cfg.lock], + 'SZ-ESW01-AU': [cfg.sensor_power, cfg.switch], + 'PSM-29ZBSR': [cfg.switch], + 'ZM350STW1TCF': [cfg.light_brightness_colortemp], + 'M350STW1': [cfg.light_brightness], + 'A806S-Q1R': [cfg.light_brightness], + 'XY12S-15': [cfg.light_brightness_colortemp_colorxy], + 'B07KG5KF5R': [cfg.light_brightness_colortemp], + 'SCM-S1': [cfg.cover_position], + 'HEIMAN-M1': [cfg.binary_sensor_contact], + '3216131P5': [cfg.light_brightness_colortemp], + 'ST8AU-CON': [cfg.light_brightness], + 'HS3MS': [cfg.binary_sensor_occupancy], 'DIYRUZ_R4_5': [ switchWithPostfix('bottom_left'), switchWithPostfix('bottom_right'), switchWithPostfix('center'), switchWithPostfix('top_left'), switchWithPostfix('top_right'), ], 'NCZ-3011-HA': [ - configurations.binary_sensor_occupancy, configurations.sensor_humidity, configurations.sensor_temperature, + cfg.binary_sensor_occupancy, cfg.sensor_humidity, cfg.sensor_temperature, ], - 'MEAZON_BIZY_PLUG': [configurations.sensor_power, configurations.switch, configurations.sensor_temperature], - 'MEAZON_DINRAIL': [configurations.sensor_power, configurations.switch, configurations.sensor_temperature], - 'HS1CA-M': [configurations.binary_sensor_carbon_monoxide, configurations.binary_sensor_battery_low], - '7099860PH': [configurations.light_brightness_colorxy], - 'HV-GSCXZB269': [configurations.light_brightness_colortemp], - '3216231P5': [configurations.light_brightness_colortemp], - 'AC03647': [configurations.light_brightness_colortemp_colorxy], - '12031': [configurations.cover_position], - '421792': [configurations.light_brightness_colortemp_colorxy], - 'HGZB-06A': [configurations.light_brightness_colortemp_colorxy], - 'LED1733G7': [configurations.light_brightness_colortemp], - '9290011370B': [configurations.light_brightness], - 'RB 250 C': [configurations.light_brightness_colortemp_colorxy], - '8718696170625': [configurations.light_brightness], - 'GL-G-001Z': [configurations.light_brightness_colortemp_colorxy], - 'HV-GSCXZB279_HV-GSCXZB229': [configurations.light_brightness_colortemp], - 'HS2WD-E': [configurations.sensor_battery], + 'MEAZON_BIZY_PLUG': [cfg.sensor_power, cfg.switch, cfg.sensor_temperature], + 'MEAZON_DINRAIL': [cfg.sensor_power, cfg.switch, cfg.sensor_temperature], + 'HS1CA-M': [cfg.binary_sensor_carbon_monoxide, cfg.binary_sensor_battery_low], + '7099860PH': [cfg.light_brightness_colorxy], + 'HV-GSCXZB269': [cfg.light_brightness_colortemp], + '3216231P5': [cfg.light_brightness_colortemp], + 'AC03647': [cfg.light_brightness_colortemp_colorxy], + '12031': [cfg.cover_position], + '421792': [cfg.light_brightness_colortemp_colorxy], + 'HGZB-06A': [cfg.light_brightness_colortemp_colorxy], + 'LED1733G7': [cfg.light_brightness_colortemp], + '9290011370B': [cfg.light_brightness], + 'RB 250 C': [cfg.light_brightness_colortemp_colorxy], + '8718696170625': [cfg.light_brightness], + 'GL-G-001Z': [cfg.light_brightness_colortemp_colorxy], + 'HV-GSCXZB279_HV-GSCXZB229': [cfg.light_brightness_colortemp], + 'HS2WD-E': [cfg.sensor_battery], 'ZNMS12LM': [ - configurations.sensor_action, configurations.binary_sensor_lock, configurations.binary_sensor_lock_reverse, + cfg.sensor_action, cfg.binary_sensor_lock, cfg.binary_sensor_lock_reverse, ], 'ZNMS13LM': [ - configurations.sensor_action, configurations.binary_sensor_lock, configurations.binary_sensor_lock_reverse, + cfg.sensor_action, cfg.binary_sensor_lock, cfg.binary_sensor_lock_reverse, ], - '12050': [configurations.switch, configurations.sensor_power], - 'ROB_200-004-0': [configurations.light_brightness], - 'RH3040': [configurations.sensor_battery, configurations.binary_sensor_occupancy], - 'DZ4743-00B': [configurations.switch], - 'GLSK3ZB-1711': [configurations.switch], + '12050': [cfg.switch, cfg.sensor_power], + 'ROB_200-004-0': [cfg.light_brightness], + 'RH3040': [cfg.sensor_battery, cfg.binary_sensor_occupancy], + 'DZ4743-00B': [cfg.switch], + 'GLSK3ZB-1711': [cfg.switch], 'GLSK3ZB-1712': [switchWithPostfix('top'), switchWithPostfix('bottom')], 'GLSK3ZB-1713': [switchWithPostfix('top'), switchWithPostfix('center'), switchWithPostfix('bottom')], 'GLSK6ZB-1714': [ @@ -863,20 +841,20 @@ const mapping = { switchWithPostfix('top_left'), switchWithPostfix('center_left'), switchWithPostfix('bottom_left'), switchWithPostfix('top_right'), switchWithPostfix('center_right'), switchWithPostfix('bottom_right'), ], - '3306431P7': [configurations.light_brightness_colortemp], - 'AC08559': [configurations.light_brightness_colortemp], - 'LVS-ZB15S': [configurations.switch], - 'LZL4BWHL01': [configurations.sensor_action], - '2AJZ4KPKEY': [configurations.sensor_click, configurations.sensor_battery], - '2AJZ4KPFT': [configurations.sensor_temperature, configurations.sensor_humidity, configurations.sensor_battery], - 'TT001ZAV20': [configurations.sensor_temperature, configurations.sensor_humidity, configurations.sensor_battery], - 'ZM-CSW002-D': [switchWithPostfix('l1'), switchWithPostfix('l2'), configurations.sensor_power], - 'LVS-SN10ZW': [configurations.sensor_battery, configurations.binary_sensor_occupancy], - 'LVS-ZB15R': [configurations.switch], - 'TH1123ZB': [configurations.thermostat], - 'Zen-01-W': [configurations.thermostat], - '9290022166': [configurations.light_brightness_colortemp_colorxy], - 'PM-C140-ZB': [configurations.sensor_power, configurations.switch], + '3306431P7': [cfg.light_brightness_colortemp], + 'AC08559': [cfg.light_brightness_colortemp], + 'LVS-ZB15S': [cfg.switch], + 'LZL4BWHL01': [cfg.sensor_action], + '2AJZ4KPKEY': [cfg.sensor_click, cfg.sensor_battery], + '2AJZ4KPFT': [cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_battery], + 'TT001ZAV20': [cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_battery], + 'ZM-CSW002-D': [switchWithPostfix('l1'), switchWithPostfix('l2'), cfg.sensor_power], + 'LVS-SN10ZW': [cfg.sensor_battery, cfg.binary_sensor_occupancy], + 'LVS-ZB15R': [cfg.switch], + 'TH1123ZB': [cfg.thermostat], + 'Zen-01-W': [cfg.thermostat], + '9290022166': [cfg.light_brightness_colortemp_colorxy], + 'PM-C140-ZB': [cfg.sensor_power, cfg.switch], 'ptvo.switch': [ switchWithPostfix('bottom_left'), switchWithPostfix('bottom_right'), switchWithPostfix('top_left'), switchWithPostfix('top_right'), switchWithPostfix('center'), @@ -887,36 +865,40 @@ const mapping = { ], 'DIYRuZ_KEYPAD20': [], 'DTB190502A1': [], - 'RF 263': [configurations.light_brightness], + 'RF 263': [cfg.light_brightness], 'F-WTR-UK-V2': [ - configurations.sensor_temperature, configurations.binary_sensor_water_leak, configurations.sensor_battery, + cfg.sensor_temperature, cfg.binary_sensor_water_leak, cfg.sensor_battery, ], - 'HS1CG-M': [configurations.binary_sensor_gas], - 'LVS-SN10ZW_SN11': [configurations.sensor_battery, configurations.binary_sensor_occupancy], - 'B00TN589ZG': [configurations.light_brightness], - 'PSB19-SW27': [configurations.light_brightness], - 'S1': [configurations.switch], + 'HS1CG-M': [cfg.binary_sensor_gas], + 'LVS-SN10ZW_SN11': [cfg.sensor_battery, cfg.binary_sensor_occupancy], + 'B00TN589ZG': [cfg.light_brightness], + 'PSB19-SW27': [cfg.light_brightness], + 'S1': [cfg.switch], 'S2': [switchWithPostfix('l1'), switchWithPostfix('l2')], - 'D1': [configurations.light_brightness], - 'J1': [configurations.cover_position_tilt], - '73741': [configurations.light_brightness_colortemp_colorxy], - 'ZA806SQ1TCF': [configurations.light_brightness_colortemp], - 'RF 265': [configurations.light_brightness], - 'ZNCZ03LM': [configurations.switch, configurations.sensor_power], - '17436/30/P7': [configurations.light_brightness], - '9290018187B': [configurations.light_brightness_colortemp_colorxy], - '1741830P7': [configurations.light_brightness_colortemp_colorxy], - 'Z3-1BRL': [configurations.sensor_action, configurations.sensor_brightness], - 'HSIO18008': [configurations.binary_sensor_gas, configurations.binary_sensor_battery_low], - 'LED1842G3': [configurations.light_brightness], - 'SR-ZG9001K4-DIM2': [configurations.sensor_battery, configurations.sensor_click], - 'ICZB-IW11SW': [configurations.switch], - 'HV-GUCXZB5': [configurations.light_brightness_colortemp], - 'HGZB-20A': [configurations.switch], + 'D1': [cfg.light_brightness], + 'J1': [cfg.cover_position_tilt], + '73741': [cfg.light_brightness_colortemp_colorxy], + 'ZA806SQ1TCF': [cfg.light_brightness_colortemp], + 'RF 265': [cfg.light_brightness], + 'ZNCZ03LM': [cfg.switch, cfg.sensor_power], + '17436/30/P7': [cfg.light_brightness], + '9290018187B': [cfg.light_brightness_colortemp_colorxy], + '1741830P7': [cfg.light_brightness_colortemp_colorxy], + 'Z3-1BRL': [cfg.sensor_action, cfg.sensor_brightness], + 'HSIO18008': [cfg.binary_sensor_gas, cfg.binary_sensor_battery_low], + 'LED1842G3': [cfg.light_brightness], + 'SR-ZG9001K4-DIM2': [cfg.sensor_battery, cfg.sensor_click], + 'ICZB-IW11SW': [cfg.switch], + 'HV-GUCXZB5': [cfg.light_brightness_colortemp], + 'HGZB-20A': [cfg.switch], + 'SZ-ESW01': [cfg.switch, cfg.sensor_power], + 'LXZB-12A': [cfg.light_brightness_colortemp_colorxy], + '2AJZ4KPBS': [cfg.sensor_battery, cfg.binary_sensor_occupancy, cfg.binary_sensor_battery_low], + '2AJZ4KPDR': [cfg.sensor_battery, cfg.binary_sensor_contact, cfg.binary_sensor_battery_low], }; Object.keys(mapping).forEach((key) => { - mapping[key].push(configurations.sensor_linkquality); + mapping[key].push(cfg.sensor_linkquality); }); /** diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index ce9f9d78..4ca76a8d 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1545,9 +1545,9 @@ }, "dependencies": { "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -12974,9 +12974,9 @@ } }, "zigbee-herdsman-converters": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-11.1.1.tgz", - "integrity": "sha512-Ai8crY4rND5F8KbkNsF5KXUgqX64K7Ho/qxTYBjyxMT1HHTEiV8Hjd3bwUcltgb2sWTs/R+Tt3mff4lds3kzZg==", + "version": "11.1.3", + "resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-11.1.3.tgz", + "integrity": "sha512-DxtyhPokoMbzP6TmIRQYUhGQI7ezUCxFdRJj9PuKHuUh2G2VeRanJsNtGRKNZLWqwJo1FjS65Vy4w3n/SHYeEQ==", "requires": { "debounce": "^1.2.0" } diff --git a/package.json b/package.json index 8c895117..84ccfb75 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "semver": "*", "winston": "2.4.2", "zigbee-herdsman": "0.6.17", - "zigbee-herdsman-converters": "11.1.1" + "zigbee-herdsman-converters": "11.1.3" }, "devDependencies": { "eslint": "*", diff --git a/test/stub/zigbeeHerdsman.js b/test/stub/zigbeeHerdsman.js index 0b326446..fea612c2 100644 --- a/test/stub/zigbeeHerdsman.js +++ b/test/stub/zigbeeHerdsman.js @@ -123,7 +123,7 @@ const devices = { 'nomodel': new Device('Router', '0x0017880104e45535', 6536, 0, [new Endpoint(1, [0], [0,3,4,6,8,5])], true, "Mains (single phase)", undefined, true), 'unsupported_router': new Device('Router', '0x0017880104e45525', 6536, 0, [new Endpoint(1, [0], [0,3,4,6,8,5])], true, "Mains (single phase)", "notSupportedModelID", false, "Boef"), 'CC2530_ROUTER': new Device('Router', '0x0017880104e45559', 6540,4151, [new Endpoint(1, [0, 6], [])], true, "Mains (single phase)", 'lumi.router'), - 'LIVOLO': new Device('Router', '0x0017880104e45560', 6541,4152, [new Endpoint(1, [0, 6], [])], true, "Mains (single phase)", 'TI0001 '), + 'LIVOLO': new Device('Router', '0x0017880104e45560', 6541,4152, [new Endpoint(6, [0, 6], [])], true, "Mains (single phase)", 'TI0001 '), } const groups = {