@zwave-js/config 15.20.1 → 15.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/_version.d.ts +1 -1
- package/build/cjs/_version.js +1 -1
- package/build/cjs/_version.js.map +1 -1
- package/build/cjs/configDir.node.js.map +1 -1
- package/build/cjs/devices/CompatConfig.d.ts +24 -0
- package/build/cjs/devices/CompatConfig.js +85 -0
- package/build/cjs/devices/CompatConfig.js.map +2 -2
- package/build/cjs/devices/DeviceConfig.d.ts +10 -5
- package/build/cjs/devices/DeviceConfig.js +59 -36
- package/build/cjs/devices/DeviceConfig.js.map +2 -2
- package/build/cjs/devices/ParamInformation.d.ts +3 -2
- package/build/cjs/devices/ParamInformation.js +8 -1
- package/build/cjs/devices/ParamInformation.js.map +2 -2
- package/build/esm/_version.d.ts +1 -1
- package/build/esm/_version.js +1 -1
- package/build/esm/devices/CompatConfig.d.ts +24 -0
- package/build/esm/devices/CompatConfig.d.ts.map +1 -1
- package/build/esm/devices/CompatConfig.js +86 -0
- package/build/esm/devices/CompatConfig.js.map +1 -1
- package/build/esm/devices/DeviceConfig.d.ts +10 -5
- package/build/esm/devices/DeviceConfig.d.ts.map +1 -1
- package/build/esm/devices/DeviceConfig.js +84 -42
- package/build/esm/devices/DeviceConfig.js.map +1 -1
- package/build/esm/devices/ParamInformation.d.ts +3 -2
- package/build/esm/devices/ParamInformation.d.ts.map +1 -1
- package/build/esm/devices/ParamInformation.js +8 -0
- package/build/esm/devices/ParamInformation.js.map +1 -1
- package/config/devices/0x000c/hs-fls100-g2.json +2 -0
- package/config/devices/0x000c/hs-hsm200.json +5 -6
- package/config/devices/0x000c/hs-ls100.json +1 -0
- package/config/devices/0x000c/hs-ms100.json +2 -0
- package/config/devices/0x000c/templates/homeseer_template.json +3 -0
- package/config/devices/0x001a/rf9501.json +2 -5
- package/config/devices/0x001a/rf9536-n.json +3 -5
- package/config/devices/0x001a/rf9537.json +3 -5
- package/config/devices/0x001a/rf9540-n_0.0_1.1.json +3 -5
- package/config/devices/0x001a/rf9540-n_1.2.json +3 -5
- package/config/devices/0x001a/rf9542.json +3 -5
- package/config/devices/0x001a/rf9642.json +1 -0
- package/config/devices/0x001a/rfldm.json +1 -0
- package/config/devices/0x001a/rftr9505.json +1 -0
- package/config/devices/0x001a/rftr9605-t.json +1 -0
- package/config/devices/0x001d/templates/leviton_template.json +6 -0
- package/config/devices/0x001e/ezmultipli.json +2 -6
- package/config/devices/0x0039/39336_39443_zw3104.json +1 -0
- package/config/devices/0x0039/39339_39346_zw3107.json +3 -0
- package/config/devices/0x0039/39351_39458_zw3005.json +3 -0
- package/config/devices/0x0039/39351_39458_zw3010.json +3 -0
- package/config/devices/0x0039/39357_39464_zw3011.json +3 -0
- package/config/devices/0x003b/fe599nx.json +3 -6
- package/config/devices/0x0059/bbk001-z00.json +2 -0
- package/config/devices/0x0059/max10y-376.json +1 -0
- package/config/devices/0x0059/ses_302.json +2 -0
- package/config/devices/0x0059/ses_303.json +4 -0
- package/config/devices/0x0059/sir-321.json +1 -0
- package/config/devices/0x0059/swm301.json +1 -0
- package/config/devices/0x0060/ac301.json +1 -0
- package/config/devices/0x0060/ad146.json +1 -2
- package/config/devices/0x0060/an179.json +2 -10
- package/config/devices/0x0060/an180.json +2 -10
- package/config/devices/0x0060/an184.json +7 -10
- package/config/devices/0x0060/an188.json +7 -10
- package/config/devices/0x0060/hsp02.json +2 -0
- package/config/devices/0x0060/sp814.json +2 -0
- package/config/devices/0x0060/sp815.json +1 -0
- package/config/devices/0x0060/sp816.json +2 -0
- package/config/devices/0x0060/sp817.json +2 -0
- package/config/devices/0x0060/st814.json +25 -15
- package/config/devices/0x0063/38957_zw6305.json +1 -0
- package/config/devices/0x0063/38959_zw6306.json +3 -0
- package/config/devices/0x0063/43973_zw6305.json +1 -0
- package/config/devices/0x0063/43985_zw6306.json +3 -0
- package/config/devices/0x0063/52247_zw6309.json +3 -0
- package/config/devices/0x0063/52251_zw6307.json +2 -0
- package/config/devices/0x0063/templates/jasco_template.json +6 -2
- package/config/devices/0x0064/duwi_z-wave_plugin_switch.json +1 -0
- package/config/devices/0x0068/td13010.json +8 -6
- package/config/devices/0x0068/tr1b120z1.json +4 -3
- package/config/devices/0x0077/smartdimmer.json +1 -0
- package/config/devices/0x0084/fts05p.json +6 -10
- package/config/devices/0x0086/templates/aeotec_template.json +42 -21
- package/config/devices/0x0086/zw062.json +7 -2
- package/config/devices/0x0086/zw074.json +8 -0
- package/config/devices/0x0086/zw097.json +1 -1
- package/config/devices/0x0086/zw098.json +7 -5
- package/config/devices/0x0086/zw100.json +12 -1
- package/config/devices/0x0086/zw112.json +1 -1
- package/config/devices/0x0086/zw120.json +1 -1
- package/config/devices/0x0086/zw121.json +7 -5
- package/config/devices/0x0086/zw122.json +2 -1
- package/config/devices/0x0086/zw129.json +1 -1
- package/config/devices/0x0086/zw130.json +1 -1
- package/config/devices/0x008a/doorsensor.json +1 -0
- package/config/devices/0x008a/molite.json +2 -0
- package/config/devices/0x008b/zw111.json +3 -0
- package/config/devices/0x0097/multisensor.json +2 -0
- package/config/devices/0x0098/ct100.json +2 -0
- package/config/devices/0x0098/ct101.json +2 -0
- package/config/devices/0x0098/ct200.json +2 -0
- package/config/devices/0x0098/ct200x.json +3 -0
- package/config/devices/0x0098/ct32.json +2 -0
- package/config/devices/0x0107/fibefgs-213.json +6 -0
- package/config/devices/0x0108/dch-z110.json +5 -0
- package/config/devices/0x0108/dch-z120.json +5 -0
- package/config/devices/0x0109/zd2201.json +3 -0
- package/config/devices/0x0109/zd2301eu-5.json +7 -3
- package/config/devices/0x0109/zp3102.json +1 -0
- package/config/devices/0x0109/zp3111-5.json +5 -0
- package/config/devices/0x0109/zp3113-7.json +14 -6
- package/config/devices/0x010f/fgbs001.json +1 -0
- package/config/devices/0x010f/fgbs222.json +4 -0
- package/config/devices/0x010f/fgcd001.json +1 -0
- package/config/devices/0x010f/fgd212.json +11 -2
- package/config/devices/0x010f/fgdw002.json +3 -0
- package/config/devices/0x010f/fgfs101.json +1 -0
- package/config/devices/0x010f/fgk101.json +4 -0
- package/config/devices/0x010f/fgms001.json +15 -0
- package/config/devices/0x010f/fgpb101.json +26 -20
- package/config/devices/0x010f/fgr-224.json +8 -6
- package/config/devices/0x010f/fgs213.json +6 -0
- package/config/devices/0x010f/fgs223.json +24 -4
- package/config/devices/0x010f/fgsd002.json +1 -0
- package/config/devices/0x010f/fgss001.json +1 -0
- package/config/devices/0x010f/fgwdeu.json +24 -4
- package/config/devices/0x010f/fgwdseu-221.json +66 -17
- package/config/devices/0x010f/fgwp102.json +4 -0
- package/config/devices/0x010f/fgwpb-111.json +1 -0
- package/config/devices/0x010f/fgwpb-121.json +6 -0
- package/config/devices/0x010f/fgwpg-111.json +4 -0
- package/config/devices/0x010f/fgwpg-121.json +4 -0
- package/config/devices/0x010f/fgwreu-111.json +24 -4
- package/config/devices/0x010f/templates/fibaro_template.json +2 -12
- package/config/devices/0x0116/itemp.json +1 -0
- package/config/devices/0x0118/tsm02.json +6 -6
- package/config/devices/0x0118/tz04.json +1 -0
- package/config/devices/0x0118/tz88.json +3 -0
- package/config/devices/0x011a/plug-in_smart_meter_dimmer_switch.json +2 -0
- package/config/devices/0x011a/zw20rm.json +1 -0
- package/config/devices/0x011a/zw500dm.json +2 -0
- package/config/devices/0x012a/iq_outlet.json +1 -0
- package/config/devices/0x012a/qz2140-840.json +2 -2
- package/config/devices/0x012a/qz2142-840.json +2 -0
- package/config/devices/0x0131/ah-nas-pd07u1.json +7 -0
- package/config/devices/0x0131/ah-neo-ds07z.json +4 -0
- package/config/devices/0x0131/mh-p220.json +3 -0
- package/config/devices/0x0131/ne-nas-ds01z.json +2 -15
- package/config/devices/0x0131/ne-nas-pd01z.json +1 -0
- package/config/devices/0x0131/psp02.json +8 -15
- package/config/devices/0x0131/vs-zd2301.json +7 -3
- package/config/devices/0x013c/nsg-ab-02.json +1 -0
- package/config/devices/0x013c/pad02.json +1 -0
- package/config/devices/0x013c/pad15.json +2 -0
- package/config/devices/0x013c/pan03.json +1 -0
- package/config/devices/0x013c/pan04.json +1 -0
- package/config/devices/0x013c/pan05-1b.json +1 -0
- package/config/devices/0x013c/pan11.json +1 -0
- package/config/devices/0x013c/pan15-1-nes.json +1 -0
- package/config/devices/0x013c/pan16.json +1 -0
- package/config/devices/0x013c/pan30.json +35 -33
- package/config/devices/0x013c/pan34.json +1 -0
- package/config/devices/0x013c/pat02-a.json +4 -0
- package/config/devices/0x013c/pat02-b.json +6 -0
- package/config/devices/0x013c/pse04.json +4 -3
- package/config/devices/0x013c/psm02.json +4 -0
- package/config/devices/0x013c/psp05.json +2 -0
- package/config/devices/0x013c/psr03-a.json +3 -1
- package/config/devices/0x013c/psr03-b.json +3 -1
- package/config/devices/0x013c/pst02-a-br.json +2 -0
- package/config/devices/0x013c/pst02a.json +8 -0
- package/config/devices/0x013c/pst02b.json +9 -6
- package/config/devices/0x013c/pst02c.json +5 -0
- package/config/devices/0x013c/templates/philio_template.json +5 -22
- package/config/devices/0x0140/sc428zw.json +2 -0
- package/config/devices/0x0148/cometz_700.json +1 -0
- package/config/devices/0x0148/eur_airquality.json +2 -0
- package/config/devices/0x0148/spirit.json +2 -0
- package/config/devices/0x0148/temp_humidity_sensor.json +2 -0
- package/config/devices/0x0149/c7.json +3 -0
- package/config/devices/0x0149/dry.json +9 -18
- package/config/devices/0x0149/ums2.json +12 -36
- package/config/devices/0x0149/wps104.json +6 -12
- package/config/devices/0x0149/wsp1.json +8 -24
- package/config/devices/0x0149/wte.json +5 -6
- package/config/devices/0x014a/iszw7-eco.json +1 -0
- package/config/devices/0x014a/tstat-tbz500.json +5 -0
- package/config/devices/0x014f/pir200.json +2 -0
- package/config/devices/0x014f/zwn-bpc.json +1 -0
- package/config/devices/0x0154/005107_0.0-1.4.json +1 -0
- package/config/devices/0x0154/05438.json +1 -0
- package/config/devices/0x0154/123580.json +2 -0
- package/config/devices/0x0159/smart_plug_16a.json +4 -0
- package/config/devices/0x0159/zmnhaa.json +2 -0
- package/config/devices/0x0159/zmnhad.json +6 -1
- package/config/devices/0x0159/zmnhba.json +2 -0
- package/config/devices/0x0159/zmnhbd.json +8 -1
- package/config/devices/0x0159/zmnhca.json +2 -0
- package/config/devices/0x0159/zmnhcd.json +7 -2
- package/config/devices/0x0159/zmnhda.json +4 -0
- package/config/devices/0x0159/zmnhdd.json +11 -2
- package/config/devices/0x0159/zmnhhd.json +6 -0
- package/config/devices/0x0159/zmnhia.json +2 -0
- package/config/devices/0x0159/zmnhkd.json +4 -1
- package/config/devices/0x0159/zmnhla.json +3 -0
- package/config/devices/0x0159/zmnhld.json +6 -1
- package/config/devices/0x0159/zmnhnd.json +4 -1
- package/config/devices/0x0159/zmnhod.json +7 -1
- package/config/devices/0x0159/zmnhqd.json +2 -0
- package/config/devices/0x0159/zmnhsd.json +9 -2
- package/config/devices/0x0159/zmnhtd.json +6 -3
- package/config/devices/0x0159/zmnhvd.json +8 -1
- package/config/devices/0x0159/zmnkad1.json +14 -9
- package/config/devices/0x0159/zmnkid.json +6 -0
- package/config/devices/0x015d/nzw39.json +2 -0
- package/config/devices/0x015d/zen20.json +2 -0
- package/config/devices/0x015d/zw97.json +2 -0
- package/config/devices/0x015f/a8-9.json +45 -27
- package/config/devices/0x015f/mh-c221.json +2 -0
- package/config/devices/0x015f/mh-ds221.json +1 -0
- package/config/devices/0x015f/mh-dt311_411.json +3 -0
- package/config/devices/0x015f/mh-p220.json +3 -0
- package/config/devices/0x015f/mh-p311.json +1 -0
- package/config/devices/0x015f/mh-s220_3.2.json +1 -0
- package/config/devices/0x015f/mh10-pm2_5-wa_wd.json +15 -18
- package/config/devices/0x015f/mh9-co2.json +2 -0
- package/config/devices/0x015f/templates/mcohome_template.json +14 -3
- package/config/devices/0x016a/ft100.json +12 -1
- package/config/devices/0x016a/ft112.json +1 -1
- package/config/devices/0x016a/ft130-k.json +1 -0
- package/config/devices/0x016a/ft130.json +1 -0
- package/config/devices/0x016a/ufa01.json +2 -0
- package/config/devices/0x0175/mt02646.json +1 -0
- package/config/devices/0x0175/mt02647.json +6 -0
- package/config/devices/0x0175/mt02648.json +8 -6
- package/config/devices/0x0175/mt02755.json +6 -1
- package/config/devices/0x0175/mt02792.json +1 -0
- package/config/devices/0x0175/mt2759.json +3 -0
- package/config/devices/0x0175/mt2760.json +5 -0
- package/config/devices/0x0175/mt2761.json +4 -0
- package/config/devices/0x0175/pan11.json +1 -0
- package/config/devices/0x0175/pst02-1b.json +6 -6
- package/config/devices/0x0176/tzwp-102.json +22 -12
- package/config/devices/0x0178/ZSENS930.json +9 -0
- package/config/devices/0x0178/th100nx.json +11 -0
- package/config/devices/0x0179/ch-201.json +1 -0
- package/config/devices/0x017f/wink_d_w_sensor.json +2 -16
- package/config/devices/0x017f/wink_motion_sensor.json +5 -16
- package/config/devices/0x0184/ws-100.json +1 -0
- package/config/devices/0x0189/117001.json +7 -0
- package/config/devices/0x018c/pm-b400zw-n.json +1 -0
- package/config/devices/0x018c/ssd-105.json +2 -0
- package/config/devices/0x018c/ssd-205.json +2 -0
- package/config/devices/0x018c/ssd-305.json +2 -0
- package/config/devices/0x0190/adc-s2000-t-ra.json +7 -0
- package/config/devices/0x0190/adc-t_2000.json +45 -33
- package/config/devices/0x0190/adc-t_3000.json +63 -45
- package/config/devices/0x019a/11_02_022.json +19 -34
- package/config/devices/0x019a/11_04_21_22_28.json +3 -0
- package/config/devices/0x019b/heatit_z-trm_2_0.0_2.255.json +1 -0
- package/config/devices/0x019b/heatit_zdim.json +2 -0
- package/config/devices/0x019b/leakage-stopper.json +1 -0
- package/config/devices/0x019b/tf016_tf021.json +1 -0
- package/config/devices/0x019b/z-dim2.json +5 -0
- package/config/devices/0x019b/z-han2.json +1 -0
- package/config/devices/0x019b/z-temp2.json +12 -6
- package/config/devices/0x019b/z-temp3.json +6 -3
- package/config/devices/0x019b/z-trm2fx_3.0_255.255.json +1 -0
- package/config/devices/0x019b/z-trm3.json +1 -0
- package/config/devices/0x019b/z-trm6.json +1 -0
- package/config/devices/0x019b/z-trm6_dc.json +2 -0
- package/config/devices/0x019b/z-water2.json +1 -0
- package/config/devices/0x019b/zm_dimmer.json +6 -0
- package/config/devices/0x019b/zm_thermostat_16.json +1 -0
- package/config/devices/0x0208/hkzw-so01.json +2 -0
- package/config/devices/0x0208/hkzw-so05.json +2 -0
- package/config/devices/0x0208/hkzw-so08.json +6 -0
- package/config/devices/0x0208/hkzw_ms01.json +1 -0
- package/config/devices/0x0208/hkzw_ms02.json +1 -0
- package/config/devices/0x0208/hkzw_so03.json +6 -0
- package/config/devices/0x0208/pid15654.json +2 -0
- package/config/devices/0x0208/za-216001.json +6 -0
- package/config/devices/0x021d/ddl240x_15hzw.json +1 -0
- package/config/devices/0x021d/ddl240x_1hzw.json +1 -0
- package/config/devices/0x021d/ml2.json +1 -0
- package/config/devices/0x021f/dmdp1.json +1 -0
- package/config/devices/0x021f/dmms1.json +5 -1
- package/config/devices/0x021f/dmof1.json +1 -0
- package/config/devices/0x022c/osr-01.json +1 -0
- package/config/devices/0x022c/osr-02.json +1 -0
- package/config/devices/0x022c/sa08.json +1 -0
- package/config/devices/0x0233/sse-304.json +2 -0
- package/config/devices/0x0234/templates/logic_group_template.json +3 -0
- package/config/devices/0x024f/fms01.json +6 -0
- package/config/devices/0x024f/fwc01.json +6 -0
- package/config/devices/0x0258/nas-pd02z-2.json +5 -0
- package/config/devices/0x0258/nas-pd07u1.json +9 -0
- package/config/devices/0x0258/nas-pd07z.json +8 -0
- package/config/devices/0x0258/nas-rp01z1.json +3 -0
- package/config/devices/0x0258/nas-wr01z.json +1 -0
- package/config/devices/0x0258/nas-wr01ze.json +1 -0
- package/config/devices/0x0258/nas-wr02zu.json +3 -0
- package/config/devices/0x0258/neo-ds07z.json +4 -0
- package/config/devices/0x0258/templates/shenzhen_neo_template.json +5 -0
- package/config/devices/0x025d/da_vinci_switch_default.json +657 -130
- package/config/devices/0x0267/10002020-13x.json +3 -0
- package/config/devices/0x0267/10002041-130.json +2 -0
- package/config/devices/0x0267/10003041-13x.json +2 -0
- package/config/devices/0x0270/bvs-zwu.json +2 -0
- package/config/devices/0x0271/templates/steinel_template.json +16 -9
- package/config/devices/0x0273/osli-01.json +1 -0
- package/config/devices/0x027a/templates/zooz_template.json +81 -20
- package/config/devices/0x027a/zac36.json +1 -0
- package/config/devices/0x027a/zac38.json +1 -0
- package/config/devices/0x027a/zen04.json +10 -0
- package/config/devices/0x027a/zen06.json +6 -0
- package/config/devices/0x027a/zen07.json +2 -0
- package/config/devices/0x027a/zen14.json +1 -0
- package/config/devices/0x027a/zen15.json +15 -3
- package/config/devices/0x027a/zen20.json +15 -6
- package/config/devices/0x027a/zen22.json +1 -0
- package/config/devices/0x027a/zen24.json +1 -0
- package/config/devices/0x027a/zen25.json +5 -0
- package/config/devices/0x027a/zen26.json +1 -0
- package/config/devices/0x027a/zen31.json +4 -0
- package/config/devices/0x027a/zen32.json +21 -13
- package/config/devices/0x027a/zen37.json +1 -0
- package/config/devices/0x027a/zen54.json +2 -0
- package/config/devices/0x027a/zen56.json +238 -0
- package/config/devices/0x027a/zen71.json +13 -0
- package/config/devices/0x027a/zen72.json +18 -0
- package/config/devices/0x027a/zen77.json +34 -0
- package/config/devices/0x027a/zen78.json +9 -0
- package/config/devices/0x027a/zse09.json +4 -0
- package/config/devices/0x027a/zse11.json +11 -0
- package/config/devices/0x027a/zse29.json +3 -0
- package/config/devices/0x027a/zse40.json +10 -0
- package/config/devices/0x027a/zse42.json +32 -1
- package/config/devices/0x027a/zse44.json +8 -0
- package/config/devices/0x027a/zse50.json +1 -0
- package/config/devices/0x027a/zse70_800lr.json +10 -0
- package/config/devices/0x028c/pwly-7828-a1.json +1 -0
- package/config/devices/0x0299/1a90.json +1 -0
- package/config/devices/0x0299/1a91.json +1 -0
- package/config/devices/0x0299/1a92.json +9 -4
- package/config/devices/0x0299/1a93.json +1 -0
- package/config/devices/0x0300/7aa-ss-ve-a0.json +2 -0
- package/config/devices/0x0300/7ba-kp-v-b-a0.json +1 -0
- package/config/devices/0x0300/7ca-ss-ve-a0.json +3 -0
- package/config/devices/0x0307/86_102.json +1 -0
- package/config/devices/0x030f/ds100.json +1 -0
- package/config/devices/0x030f/mt-100.json +4 -12
- package/config/devices/0x0312/mse30z.json +4 -0
- package/config/devices/0x0312/templates/minoston_template.json +10 -0
- package/config/devices/0x0312/zw30.json +2 -0
- package/config/devices/0x0312/zw31.json +4 -0
- package/config/devices/0x0313/e0400z-ef.json +69 -30
- package/config/devices/0x0315/wd-100.json +1 -0
- package/config/devices/0x0315/ws-100.json +1 -0
- package/config/devices/0x0315/zl-ld-100.json +1 -0
- package/config/devices/0x0315/zl-pd-100.json +1 -0
- package/config/devices/0x031e/lzw30-sn.json +3 -0
- package/config/devices/0x031e/lzw30.json +1 -0
- package/config/devices/0x031e/lzw31-bsd.json +3 -0
- package/config/devices/0x031e/lzw31-sn.json +7 -0
- package/config/devices/0x031e/lzw40.json +1 -0
- package/config/devices/0x031e/lzw41.json +1 -0
- package/config/devices/0x031e/lzw42.json +1 -0
- package/config/devices/0x031e/lzw45.json +3 -0
- package/config/devices/0x031e/lzw60.json +11 -0
- package/config/devices/0x031e/vzw31-sn.json +8 -4
- package/config/devices/0x031e/vzw32-sn.json +11 -4
- package/config/devices/0x0329/lizy0005.json +1 -2
- package/config/devices/0x032e/dat-101.json +1 -0
- package/config/devices/0x0330/homemech-200X.json +8 -0
- package/config/devices/0x0330/sr-zv9021a.json +14 -6
- package/config/devices/0x0330/sr-zv9032a-eu.json +27 -35
- package/config/devices/0x0330/sr-zv9080a-a.json +9 -3
- package/config/devices/0x0330/sr-zv9092a.json +21 -12
- package/config/devices/0x0330/ves-zw-dim-001.json +8 -0
- package/config/devices/0x0330/ves-zw-hld-016.json +3 -0
- package/config/devices/0x0330/ves-zw-mot-018.json +3 -0
- package/config/devices/0x0330/ves-zw-swi-014.json +3 -0
- package/config/devices/0x0330/zv-9101.json +1 -0
- package/config/devices/0x0330/zv2400tac-sl-a.json +10 -0
- package/config/devices/0x0330/zv2835rac-nf.json +8 -0
- package/config/devices/0x0344/he-ft01.json +1 -0
- package/config/devices/0x0344/he-hls01.json +6 -0
- package/config/devices/0x0344/he-ht01.json +1 -0
- package/config/devices/0x0344/he-rs01.json +1 -0
- package/config/devices/0x0344/he-tps01.json +1 -0
- package/config/devices/0x0344/he-tps02.json +1 -0
- package/config/devices/0x0344/he-tps03.json +1 -0
- package/config/devices/0x0344/he-tps04.json +1 -0
- package/config/devices/0x0344/he-tps05.json +1 -0
- package/config/devices/0x0344/templates/heltun_template.json +1 -0
- package/config/devices/0x0345/templates/swidget_template.json +13 -0
- package/config/devices/0x0346/4aw1sz-0en0.json +1 -0
- package/config/devices/0x0346/alarm_keypad_gen1.json +1 -0
- package/config/devices/0x0346/contact_sensor_gen1.json +1 -0
- package/config/devices/0x0346/glass_break_sensor.json +1 -0
- package/config/devices/0x0346/keypad_v2.json +2 -1
- package/config/devices/0x0346/motion_sensor_gen1.json +1 -0
- package/config/devices/0x0346/motion_sensor_gen2.json +1 -0
- package/config/devices/0x0346/range_extender_gen1.json +1 -0
- package/config/devices/0x0346/ring_outdoor_siren.json +1 -0
- package/config/devices/0x0346/ring_smoke_co_listener.json +3 -0
- package/config/devices/0x0357/upowerswitch_1.json +2 -0
- package/config/devices/0x0357/upowerswitch_2.json +2 -0
- package/config/devices/0x0357/upowerswitch_3.json +2 -0
- package/config/devices/0x0371/zw175.json +5 -7
- package/config/devices/0x0371/zw187.json +1 -1
- package/config/devices/0x0371/zwa002.json +1 -0
- package/config/devices/0x0371/zwa003.json +1 -1
- package/config/devices/0x0371/zwa004.json +1 -1
- package/config/devices/0x0371/zwa005.json +7 -1
- package/config/devices/0x0371/zwa009_0.0_1.255.json +16 -30
- package/config/devices/0x0371/zwa009_11.0_255.255.json +16 -30
- package/config/devices/0x0371/zwa019.json +2 -0
- package/config/devices/0x0371/zwa021.json +6 -3
- package/config/devices/0x0371/zwa022.json +1 -0
- package/config/devices/0x0371/zwa023.json +9 -6
- package/config/devices/0x0371/zwa024.json +18 -5
- package/config/devices/0x0371/zwa039.json +16 -27
- package/config/devices/0x0371/zwa042.json +2 -0
- package/config/devices/0x0371/zwa045.json +13 -10
- package/config/devices/0x0371/zwa050.json +1 -1
- package/config/devices/0x0384/ha-zw-5sab.json +11 -0
- package/config/devices/0x0384/ha-zw-5sf.json +1 -0
- package/config/devices/0x039a/INT-SMDWD-01.json +1 -0
- package/config/devices/0x039a/INT-SMMD-N1.json +4 -0
- package/config/devices/0x039a/nas-wr01z.json +1 -0
- package/config/devices/0x0403/shbw10000.json +11 -1
- package/config/devices/0x0403/shha10000.json +3 -0
- package/config/devices/0x041b/39446_zw3107.json +2 -0
- package/config/devices/0x041b/39458_zw3010.json +2 -0
- package/config/devices/0x0431/ecodim.json +1 -0
- package/config/devices/0x0433/q-light_puck.json +3 -0
- package/config/devices/0x0433/q-light_zerodim.json +3 -0
- package/config/devices/0x0433/q-light_zerodim_2pol.json +3 -0
- package/config/devices/0x0438/4512725.json +26 -15
- package/config/devices/0x0438/4512744.json +17 -12
- package/config/devices/0x0438/4512745.json +17 -12
- package/config/devices/0x0438/4512746.json +4 -0
- package/config/devices/0x0438/4512757.json +35 -158
- package/config/devices/0x0438/dimmer-200w.json +2 -0
- package/config/devices/0x0438/dimmer-400w.json +1 -0
- package/config/devices/0x0438/dimmer2-400w.json +8 -0
- package/config/devices/0x0438/sr-zv9032a-eu.json +27 -35
- package/config/devices/0x045a/WB04V.json +3 -0
- package/config/devices/0x045a/WM25C.json +3 -0
- package/config/devices/0x045a/WM25L.json +3 -0
- package/config/devices/0x045a/Z-CM-V01.json +3 -0
- package/config/devices/0x045a/Z-DWS-V01.json +1 -0
- package/config/devices/0x045a/Z-TRV-V01.json +5 -0
- package/config/devices/0x0460/qnsh-001P10.json +9 -6
- package/config/devices/0x0460/templates/wave_template.json +21 -6
- package/config/devices/0x046a/WB04V.json +3 -0
- package/config/devices/0x046a/WM25L.json +3 -0
- package/config/devices/0x4118/tsm02.json +6 -6
- package/config/devices/0x5254/zdm-80.json +2 -0
- package/config/devices/0x5254/zds-210na.json +2 -0
- package/config/devices/0x5254/zts-110.json +1 -0
- package/config/devices/0x5254/zxt-800.json +3 -0
- package/config/devices/templates/honeywell_template.json +2 -0
- package/config/devices/templates/master_template.json +38 -0
- package/package.json +10 -9
package/build/cjs/_version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "15.
|
|
1
|
+
export declare const PACKAGE_VERSION = "15.22.0";
|
|
2
2
|
//# sourceMappingURL=_version.d.ts.map
|
package/build/cjs/_version.js
CHANGED
|
@@ -21,7 +21,7 @@ __export(version_exports, {
|
|
|
21
21
|
PACKAGE_VERSION: () => PACKAGE_VERSION
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(version_exports);
|
|
24
|
-
const PACKAGE_VERSION = "15.
|
|
24
|
+
const PACKAGE_VERSION = "15.22.0";
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
26
|
0 && (module.exports = {
|
|
27
27
|
PACKAGE_VERSION
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/_version.ts"],
|
|
4
|
-
"sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.
|
|
4
|
+
"sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.22.0\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;AACO,MAAM,kBAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/configDir.node.ts", "../../../../node_modules
|
|
3
|
+
"sources": ["../../src/configDir.node.ts", "../../../../node_modules/@alcalzone/esm2cjs/shims/import.meta.url/shim.js"],
|
|
4
4
|
"sourcesContent": ["import { fileURLToPath } from \"node:url\";\nimport path from \"pathe\";\n\n/** The absolute path of the embedded configuration directory */\nexport const configDir = import.meta.url.startsWith(\"file:\")\n\t? path.join(\n\t\tpath.dirname(fileURLToPath(import.meta.url)),\n\t\t/src\\/[^/\\\\]+\\.ts$/.test(import.meta.url)\n\t\t\t? \"..\"\n\t\t\t: \"../..\",\n\t\t\"config\",\n\t)\n\t: import.meta.resolve(\"/config\");\n", "export const __import_meta_url =\n typeof document === 'undefined' ? new (require('url'.replace('', '')).URL)('file:' + __filename).href :\n (document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href)\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;ACAO,IAAM,oBACX,OAAO,aAAa,cAAc,KAAK,QAAQ,MAAM,QAAQ,IAAI,EAAE,CAAC,GAAE,IAAK,UAAU,UAAU,EAAE,OAC9F,SAAS,iBAAiB,SAAS,cAAc,OAAO,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;ADFlG,sBAA8B;AAC9B,mBAAiB;AADjB;AAIO,MAAM,YAAY,kBAAgB,WAAW,OAAO,IACxD,aAAAA,QAAK,KACN,aAAAA,QAAK,YAAQ,+BAAc,iBAAe,CAAC,GAC3C,oBAAoB,KAAK,iBAAe,IACrC,OACA,SACH,QAAQ,IAEP,YAAY,QAAQ,SAAS;",
|
|
6
6
|
"names": ["path"]
|
|
@@ -6,6 +6,7 @@ export declare class ConditionalCompatConfig implements ConditionalItem<CompatCo
|
|
|
6
6
|
private valueIdRegex;
|
|
7
7
|
constructor(filename: string, definition: JSONObject);
|
|
8
8
|
readonly alarmMapping?: readonly CompatMapAlarm[];
|
|
9
|
+
readonly remapNotifications?: readonly CompatRemapNotification[];
|
|
9
10
|
readonly addCCs?: ReadonlyMap<CommandClasses, CompatAddCC>;
|
|
10
11
|
readonly removeCCs?: ReadonlyMap<CommandClasses, "*" | readonly number[]>;
|
|
11
12
|
readonly disableAutoRefresh?: boolean;
|
|
@@ -61,6 +62,29 @@ export declare class CompatMapAlarm {
|
|
|
61
62
|
readonly from: CompatMapAlarmFrom;
|
|
62
63
|
readonly to: CompatMapAlarmTo;
|
|
63
64
|
}
|
|
65
|
+
export interface CompatRemapNotificationFrom {
|
|
66
|
+
notificationType: number;
|
|
67
|
+
notificationEvent: number;
|
|
68
|
+
}
|
|
69
|
+
export interface CompatRemapNotificationTo {
|
|
70
|
+
notificationType: number;
|
|
71
|
+
notificationEvent: number;
|
|
72
|
+
}
|
|
73
|
+
export type CompatRemapNotificationAction = {
|
|
74
|
+
type: "remap";
|
|
75
|
+
to: CompatRemapNotificationTo;
|
|
76
|
+
} | {
|
|
77
|
+
type: "clear";
|
|
78
|
+
targets: CompatRemapNotificationTo[];
|
|
79
|
+
} | {
|
|
80
|
+
type: "idle";
|
|
81
|
+
targets: CompatRemapNotificationTo[];
|
|
82
|
+
};
|
|
83
|
+
export declare class CompatRemapNotification {
|
|
84
|
+
constructor(filename: string, definition: JSONObject, index: number);
|
|
85
|
+
readonly from: CompatRemapNotificationFrom;
|
|
86
|
+
readonly action: CompatRemapNotificationAction;
|
|
87
|
+
}
|
|
64
88
|
export declare class CompatOverrideQueries {
|
|
65
89
|
constructor(filename: string, definition: JSONObject);
|
|
66
90
|
private readonly overrides;
|
|
@@ -22,6 +22,7 @@ __export(CompatConfig_exports, {
|
|
|
22
22
|
CompatAddCC: () => CompatAddCC,
|
|
23
23
|
CompatMapAlarm: () => CompatMapAlarm,
|
|
24
24
|
CompatOverrideQueries: () => CompatOverrideQueries,
|
|
25
|
+
CompatRemapNotification: () => CompatRemapNotification,
|
|
25
26
|
ConditionalCompatConfig: () => ConditionalCompatConfig
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(CompatConfig_exports);
|
|
@@ -307,6 +308,13 @@ compat option alarmMapping must be an array where all items are objects!`);
|
|
|
307
308
|
}
|
|
308
309
|
this.alarmMapping = definition.alarmMapping.map((m, i) => new CompatMapAlarm(filename, m, i + 1));
|
|
309
310
|
}
|
|
311
|
+
if (definition.remapNotifications != void 0) {
|
|
312
|
+
if (!(0, import_typeguards.isArray)(definition.remapNotifications) || !definition.remapNotifications.every((m) => (0, import_typeguards.isObject)(m))) {
|
|
313
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
314
|
+
compat option remapNotifications must be an array where all items are objects!`);
|
|
315
|
+
}
|
|
316
|
+
this.remapNotifications = definition.remapNotifications.map((m, i) => new CompatRemapNotification(filename, m, i + 1));
|
|
317
|
+
}
|
|
310
318
|
if (definition.overrideQueries != void 0) {
|
|
311
319
|
if (!(0, import_typeguards.isObject)(definition.overrideQueries)) {
|
|
312
320
|
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
@@ -316,6 +324,7 @@ compat option overrideQueries must be an object!`);
|
|
|
316
324
|
}
|
|
317
325
|
}
|
|
318
326
|
alarmMapping;
|
|
327
|
+
remapNotifications;
|
|
319
328
|
addCCs;
|
|
320
329
|
removeCCs;
|
|
321
330
|
disableAutoRefresh;
|
|
@@ -348,6 +357,7 @@ compat option overrideQueries must be an object!`);
|
|
|
348
357
|
return;
|
|
349
358
|
const ret = (0, import_shared.pick)(this, [
|
|
350
359
|
"alarmMapping",
|
|
360
|
+
"remapNotifications",
|
|
351
361
|
"addCCs",
|
|
352
362
|
"removeCCs",
|
|
353
363
|
"disableAutoRefresh",
|
|
@@ -491,6 +501,80 @@ error in compat option alarmMapping, mapping #${index}: property "to.eventParame
|
|
|
491
501
|
from;
|
|
492
502
|
to;
|
|
493
503
|
}
|
|
504
|
+
class CompatRemapNotification {
|
|
505
|
+
static {
|
|
506
|
+
__name(this, "CompatRemapNotification");
|
|
507
|
+
}
|
|
508
|
+
constructor(filename, definition, index) {
|
|
509
|
+
if (!(0, import_typeguards.isObject)(definition.from)) {
|
|
510
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
511
|
+
error in compat option remapNotifications, mapping #${index}: property "from" must be an object!`);
|
|
512
|
+
} else {
|
|
513
|
+
if (typeof definition.from.notificationType !== "number") {
|
|
514
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
515
|
+
error in compat option remapNotifications, mapping #${index}: property "from.notificationType" must be a number!`);
|
|
516
|
+
}
|
|
517
|
+
if (typeof definition.from.notificationEvent !== "number") {
|
|
518
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
519
|
+
error in compat option remapNotifications, mapping #${index}: property "from.notificationEvent" must be a number!`);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
this.from = (0, import_shared.pick)(definition.from, [
|
|
523
|
+
"notificationType",
|
|
524
|
+
"notificationEvent"
|
|
525
|
+
]);
|
|
526
|
+
const validateToObject = /* @__PURE__ */ __name((obj, label) => {
|
|
527
|
+
if (!(0, import_typeguards.isObject)(obj)) {
|
|
528
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
529
|
+
error in compat option remapNotifications, mapping #${index}: ${label} must be an object!`);
|
|
530
|
+
}
|
|
531
|
+
if (typeof obj.notificationType !== "number") {
|
|
532
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
533
|
+
error in compat option remapNotifications, mapping #${index}: ${label} must have a numeric "notificationType"!`);
|
|
534
|
+
}
|
|
535
|
+
if (typeof obj.notificationEvent !== "number") {
|
|
536
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
537
|
+
error in compat option remapNotifications, mapping #${index}: ${label} must have a numeric "notificationEvent"!`);
|
|
538
|
+
}
|
|
539
|
+
}, "validateToObject");
|
|
540
|
+
const validateTargetArray = /* @__PURE__ */ __name((arr, label) => {
|
|
541
|
+
if (!(0, import_typeguards.isArray)(arr) || arr.length === 0) {
|
|
542
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
543
|
+
error in compat option remapNotifications, mapping #${index}: property "${label}" must be a non-empty array of objects!`);
|
|
544
|
+
}
|
|
545
|
+
for (let j = 0; j < arr.length; j++) {
|
|
546
|
+
validateToObject(arr[j], `"${label}[${j}]"`);
|
|
547
|
+
}
|
|
548
|
+
}, "validateTargetArray");
|
|
549
|
+
if (definition.to != void 0) {
|
|
550
|
+
validateToObject(definition.to, `property "to"`);
|
|
551
|
+
this.action = {
|
|
552
|
+
type: "remap",
|
|
553
|
+
to: (0, import_shared.pick)(definition.to, [
|
|
554
|
+
"notificationType",
|
|
555
|
+
"notificationEvent"
|
|
556
|
+
])
|
|
557
|
+
};
|
|
558
|
+
} else if (definition.clear != void 0) {
|
|
559
|
+
validateTargetArray(definition.clear, "clear");
|
|
560
|
+
this.action = {
|
|
561
|
+
type: "clear",
|
|
562
|
+
targets: definition.clear.map((target) => (0, import_shared.pick)(target, ["notificationType", "notificationEvent"]))
|
|
563
|
+
};
|
|
564
|
+
} else if (definition.idle != void 0) {
|
|
565
|
+
validateTargetArray(definition.idle, "idle");
|
|
566
|
+
this.action = {
|
|
567
|
+
type: "idle",
|
|
568
|
+
targets: definition.idle.map((target) => (0, import_shared.pick)(target, ["notificationType", "notificationEvent"]))
|
|
569
|
+
};
|
|
570
|
+
} else {
|
|
571
|
+
(0, import_utils_safe.throwInvalidConfig)("devices", `config/devices/${filename}:
|
|
572
|
+
error in compat option remapNotifications, mapping #${index}: exactly one of "to", "clear", or "idle" must be defined!`);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
from;
|
|
576
|
+
action;
|
|
577
|
+
}
|
|
494
578
|
class CompatOverrideQueries {
|
|
495
579
|
static {
|
|
496
580
|
__name(this, "CompatOverrideQueries");
|
|
@@ -594,6 +678,7 @@ __name(isBasicSetMapping, "isBasicSetMapping");
|
|
|
594
678
|
CompatAddCC,
|
|
595
679
|
CompatMapAlarm,
|
|
596
680
|
CompatOverrideQueries,
|
|
681
|
+
CompatRemapNotification,
|
|
597
682
|
ConditionalCompatConfig
|
|
598
683
|
});
|
|
599
684
|
//# sourceMappingURL=CompatConfig.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/devices/CompatConfig.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\ttype CommandClassInfo,\n\ttype CommandClasses,\n\ttype ValueID,\n\tgetCCName,\n\tstripUndefined,\n} from \"@zwave-js/core\";\nimport { type JSONObject, pick } from \"@zwave-js/shared\";\nimport { isArray, isObject } from \"alcalzone-shared/typeguards\";\nimport { throwInvalidConfig, tryParseCCId } from \"../utils_safe.js\";\nimport { type ConditionalItem, conditionApplies } from \"./ConditionalItem.js\";\nimport type { DeviceID } from \"./shared.js\";\n\nexport class ConditionalCompatConfig implements ConditionalItem<CompatConfig> {\n\tprivate valueIdRegex = /^\\$value\\$\\[.+\\]$/;\n\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tthis.condition = definition.$if;\n\n\t\tif (definition.queryOnWakeup != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.queryOnWakeup)\n\t\t\t\t|| !definition.queryOnWakeup.every(\n\t\t\t\t\t(cmd: unknown) =>\n\t\t\t\t\t\tisArray(cmd)\n\t\t\t\t\t\t&& cmd.length >= 2\n\t\t\t\t\t\t&& typeof cmd[0] === \"string\"\n\t\t\t\t\t\t&& typeof cmd[1] === \"string\"\n\t\t\t\t\t\t&& cmd\n\t\t\t\t\t\t\t.slice(2)\n\t\t\t\t\t\t\t.every(\n\t\t\t\t\t\t\t\t(arg) =>\n\t\t\t\t\t\t\t\t\ttypeof arg === \"string\"\n\t\t\t\t\t\t\t\t\t|| typeof arg === \"number\"\n\t\t\t\t\t\t\t\t\t|| typeof arg === \"boolean\",\n\t\t\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option queryOnWakeup`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Parse \"smart\" values into partial Value IDs\n\t\t\tthis.queryOnWakeup = (definition.queryOnWakeup as any[][]).map(\n\t\t\t\t(cmd) =>\n\t\t\t\t\tcmd.map((arg) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof arg === \"string\"\n\t\t\t\t\t\t\t&& this.valueIdRegex.test(arg)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst tuple = JSON.parse(\n\t\t\t\t\t\t\t\targ.slice(\"$value$\".length),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tproperty: tuple[0],\n\t\t\t\t\t\t\t\tpropertyKey: tuple[1],\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn arg;\n\t\t\t\t\t}),\n\t\t\t) as any;\n\t\t}\n\n\t\tif (definition.disableAutoRefresh != undefined) {\n\t\t\tif (definition.disableAutoRefresh !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option disableAutoRefresh must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.disableAutoRefresh = definition.disableAutoRefresh;\n\t\t}\n\n\t\tif (definition.disableCallbackFunctionTypeCheck != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.disableCallbackFunctionTypeCheck)\n\t\t\t\t|| !definition.disableCallbackFunctionTypeCheck.every(\n\t\t\t\t\t(d: any) => typeof d === \"number\" && d % 1 === 0 && d > 0,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nwhen present, compat option disableCallbackFunctionTypeCheck msut be an array of positive integers`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.disableCallbackFunctionTypeCheck =\n\t\t\t\tdefinition.disableCallbackFunctionTypeCheck;\n\t\t}\n\n\t\tif (definition.disableStrictEntryControlDataValidation != undefined) {\n\t\t\tif (definition.disableStrictEntryControlDataValidation !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option disableStrictEntryControlDataValidation must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.disableStrictEntryControlDataValidation =\n\t\t\t\tdefinition.disableStrictEntryControlDataValidation;\n\t\t}\n\n\t\tif (definition.disableStrictMeasurementValidation != undefined) {\n\t\t\tif (definition.disableStrictMeasurementValidation !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option disableStrictMeasurementValidation must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.disableStrictMeasurementValidation =\n\t\t\t\tdefinition.disableStrictMeasurementValidation;\n\t\t}\n\n\t\tif (definition.encodeCCsUsingTargetVersion != undefined) {\n\t\t\tif (definition.encodeCCsUsingTargetVersion !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option encodeCCsUsingTargetVersion must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.encodeCCsUsingTargetVersion =\n\t\t\t\tdefinition.encodeCCsUsingTargetVersion;\n\t\t}\n\n\t\tif (definition.forceNotificationIdleReset != undefined) {\n\t\t\tif (definition.forceNotificationIdleReset !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option forceNotificationIdleReset must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.forceNotificationIdleReset =\n\t\t\t\tdefinition.forceNotificationIdleReset;\n\t\t}\n\n\t\tif (definition.forceSceneControllerGroupCount != undefined) {\n\t\t\tif (typeof definition.forceSceneControllerGroupCount !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option forceSceneControllerGroupCount must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.forceSceneControllerGroupCount < 0\n\t\t\t\t|| definition.forceSceneControllerGroupCount > 255\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option forceSceneControllerGroupCount must be between 0 and 255!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.forceSceneControllerGroupCount =\n\t\t\t\tdefinition.forceSceneControllerGroupCount;\n\t\t}\n\n\t\tif (definition.mapBasicReport != undefined) {\n\t\t\tif (!isBasicReportMapping(definition.mapBasicReport)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapBasicReport contains an invalid value`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.mapBasicReport = definition.mapBasicReport;\n\t\t}\n\n\t\tif (definition.mapBasicSet != undefined) {\n\t\t\tif (!isBasicSetMapping(definition.mapBasicSet)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapBasicSet contains an invalid value`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.mapBasicSet = definition.mapBasicSet;\n\t\t}\n\n\t\tif (definition.preserveRootApplicationCCValueIDs != undefined) {\n\t\t\tif (definition.preserveRootApplicationCCValueIDs !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option preserveRootApplicationCCValueIDs`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.preserveRootApplicationCCValueIDs =\n\t\t\t\tdefinition.preserveRootApplicationCCValueIDs;\n\t\t}\n\n\t\tif (definition.preserveEndpoints != undefined) {\n\t\t\tif (\n\t\t\t\tdefinition.preserveEndpoints !== \"*\"\n\t\t\t\t&& !(\n\t\t\t\t\tisArray(definition.preserveEndpoints)\n\t\t\t\t\t&& definition.preserveEndpoints.every(\n\t\t\t\t\t\t(d: any) =>\n\t\t\t\t\t\t\ttypeof d === \"number\" && d % 1 === 0 && d > 0,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option preserveEndpoints must be \"*\" or an array of positive integers`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.preserveEndpoints = definition.preserveEndpoints;\n\t\t}\n\n\t\tif (definition.removeEndpoints != undefined) {\n\t\t\tif (\n\t\t\t\tdefinition.removeEndpoints !== \"*\"\n\t\t\t\t&& !(\n\t\t\t\t\tisArray(definition.removeEndpoints)\n\t\t\t\t\t&& definition.removeEndpoints.every(\n\t\t\t\t\t\t(d: any) =>\n\t\t\t\t\t\t\ttypeof d === \"number\" && d % 1 === 0 && d > 0,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option removeEndpoints must be \"*\" or an array of positive integers`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.removeEndpoints = definition.removeEndpoints;\n\t\t}\n\n\t\tif (definition.skipConfigurationNameQuery != undefined) {\n\t\t\tif (definition.skipConfigurationNameQuery !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option skipConfigurationNameQuery`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.skipConfigurationNameQuery =\n\t\t\t\tdefinition.skipConfigurationNameQuery;\n\t\t}\n\n\t\tif (definition.skipConfigurationInfoQuery != undefined) {\n\t\t\tif (definition.skipConfigurationInfoQuery !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option skipConfigurationInfoQuery`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.skipConfigurationInfoQuery =\n\t\t\t\tdefinition.skipConfigurationInfoQuery;\n\t\t}\n\n\t\tif (definition.treatMultilevelSwitchSetAsEvent != undefined) {\n\t\t\tif (definition.treatMultilevelSwitchSetAsEvent !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option treatMultilevelSwitchSetAsEvent`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.treatMultilevelSwitchSetAsEvent =\n\t\t\t\tdefinition.treatMultilevelSwitchSetAsEvent;\n\t\t}\n\n\t\tif (definition.treatSetAsReport != undefined) {\n\t\t\tif (\n\t\t\t\t!(isArray(definition.treatSetAsReport)\n\t\t\t\t\t&& definition.treatSetAsReport.every(\n\t\t\t\t\t\t(d: any) => typeof d === \"string\",\n\t\t\t\t\t))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option treatSetAsReport must be an array of strings`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.treatSetAsReport = new Set(definition.treatSetAsReport);\n\t\t}\n\n\t\tif (definition.treatDestinationEndpointAsSource != undefined) {\n\t\t\tif (definition.treatDestinationEndpointAsSource !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option treatDestinationEndpointAsSource`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.treatDestinationEndpointAsSource =\n\t\t\t\tdefinition.treatDestinationEndpointAsSource;\n\t\t}\n\n\t\tif (definition.useUTCInTimeParametersCC != undefined) {\n\t\t\tif (definition.useUTCInTimeParametersCC !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option useUTCInTimeParametersCC must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.useUTCInTimeParametersCC = definition.useUTCInTimeParametersCC;\n\t\t}\n\n\t\tif (definition.manualValueRefreshDelayMs != undefined) {\n\t\t\tif (typeof definition.manualValueRefreshDelayMs !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option manualValueRefreshDelayMs must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.manualValueRefreshDelayMs % 1 !== 0\n\t\t\t\t|| definition.manualValueRefreshDelayMs < 0\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option manualValueRefreshDelayMs must be a non-negative integer!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.manualValueRefreshDelayMs =\n\t\t\t\tdefinition.manualValueRefreshDelayMs;\n\t\t}\n\n\t\tif (definition.reportTimeout != undefined) {\n\t\t\tif (typeof definition.reportTimeout !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option reportTimeout must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.reportTimeout % 1 !== 0\n\t\t\t\t|| definition.reportTimeout < 1000\n\t\t\t\t|| definition.reportTimeout > 10000\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option reportTimeout must be an integer between 1000 and 10000!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.reportTimeout = definition.reportTimeout;\n\t\t}\n\n\t\tif (definition.mapRootReportsToEndpoint != undefined) {\n\t\t\tif (typeof definition.mapRootReportsToEndpoint !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapRootReportsToEndpoint must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.mapRootReportsToEndpoint % 1 !== 0\n\t\t\t\t|| definition.mapRootReportsToEndpoint < 1\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapRootReportsToEndpoint must be a positive integer!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.mapRootReportsToEndpoint = definition.mapRootReportsToEndpoint;\n\t\t}\n\n\t\tif (definition.overrideFloatEncoding != undefined) {\n\t\t\tif (!isObject(definition.overrideFloatEncoding)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option overrideFloatEncoding`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.overrideFloatEncoding = {};\n\t\t\tif (\"precision\" in definition.overrideFloatEncoding) {\n\t\t\t\tif (\n\t\t\t\t\ttypeof definition.overrideFloatEncoding.precision\n\t\t\t\t\t\t!= \"number\"\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.precision must be a number!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tdefinition.overrideFloatEncoding.precision % 1 !== 0\n\t\t\t\t\t|| definition.overrideFloatEncoding.precision < 0\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.precision must be a positive integer!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.overrideFloatEncoding.precision =\n\t\t\t\t\tdefinition.overrideFloatEncoding.precision;\n\t\t\t}\n\t\t\tif (\"size\" in definition.overrideFloatEncoding) {\n\t\t\t\tif (typeof definition.overrideFloatEncoding.size != \"number\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.size must be a number!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tdefinition.overrideFloatEncoding.size % 1 !== 0\n\t\t\t\t\t|| definition.overrideFloatEncoding.size < 1\n\t\t\t\t\t|| definition.overrideFloatEncoding.size > 4\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.size must be an integer between 1 and 4!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.overrideFloatEncoding.size =\n\t\t\t\t\tdefinition.overrideFloatEncoding.size;\n\t\t\t}\n\n\t\t\tif (Object.keys(this.overrideFloatEncoding).length === 0) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option overrideFloatEncoding: size and/or precision must be specified!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (definition.commandClasses != undefined) {\n\t\t\tif (!isObject(definition.commandClasses)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option commandClasses`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (definition.commandClasses.add != undefined) {\n\t\t\t\tif (!isObject(definition.commandClasses.add)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option commandClasses.add`,\n\t\t\t\t\t);\n\t\t\t\t} else if (\n\t\t\t\t\t!Object.values(definition.commandClasses.add).every((v) =>\n\t\t\t\t\t\tisObject(v)\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nAll values in compat option commandClasses.add must be objects`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst addCCs = new Map<CommandClasses, CompatAddCC>();\n\t\t\t\tfor (\n\t\t\t\t\tconst [key, info] of Object.entries(\n\t\t\t\t\t\tdefinition.commandClasses.add,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Parse the key into a CC ID\n\t\t\t\t\tconst cc = tryParseCCId(key);\n\t\t\t\t\tif (cc == undefined) {\n\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t`config/devices/${filename}:\nInvalid Command Class \"${key}\" specified in compat option commandClasses.add!`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\taddCCs.set(cc, new CompatAddCC(filename, info as any));\n\t\t\t\t}\n\t\t\t\tthis.addCCs = addCCs;\n\t\t\t}\n\n\t\t\tif (definition.commandClasses.remove != undefined) {\n\t\t\t\tif (!isObject(definition.commandClasses.remove)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option commandClasses.remove`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst removeCCs = new Map<\n\t\t\t\t\tCommandClasses,\n\t\t\t\t\t\"*\" | readonly number[]\n\t\t\t\t>();\n\t\t\t\tfor (\n\t\t\t\t\tconst [key, info] of Object.entries(\n\t\t\t\t\t\tdefinition.commandClasses.remove,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Parse the key into a CC ID\n\t\t\t\t\tconst cc = tryParseCCId(key);\n\t\t\t\t\tif (cc == undefined) {\n\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t`config/devices/${filename}:\nInvalid Command Class \"${key}\" specified in compat option commandClasses.remove!`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tif (isObject(info) && \"endpoints\" in info) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tinfo.endpoints === \"*\"\n\t\t\t\t\t\t\t|| (isArray(info.endpoints)\n\t\t\t\t\t\t\t\t&& info.endpoints.every(\n\t\t\t\t\t\t\t\t\t(i) => typeof i === \"number\",\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tremoveCCs.set(cc, info.endpoints as any);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t\t`config/devices/${filename}:\nCompat option commandClasses.remove has an invalid \"endpoints\" property. Only \"*\" and numeric arrays are allowed!`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t`config/devices/${filename}:\nAll values in compat option commandClasses.remove must be objects with an \"endpoints\" property!`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.removeCCs = removeCCs;\n\t\t\t}\n\t\t}\n\n\t\tif (definition.alarmMapping != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.alarmMapping)\n\t\t\t\t|| !definition.alarmMapping.every((m: any) => isObject(m))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option alarmMapping must be an array where all items are objects!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.alarmMapping = (definition.alarmMapping as any[]).map(\n\t\t\t\t(m, i) => new CompatMapAlarm(filename, m, i + 1),\n\t\t\t);\n\t\t}\n\n\t\tif (definition.overrideQueries != undefined) {\n\t\t\tif (!isObject(definition.overrideQueries)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideQueries must be an object!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.overrideQueries = new CompatOverrideQueries(\n\t\t\t\tfilename,\n\t\t\t\tdefinition.overrideQueries,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic readonly alarmMapping?: readonly CompatMapAlarm[];\n\tpublic readonly addCCs?: ReadonlyMap<CommandClasses, CompatAddCC>;\n\tpublic readonly removeCCs?: ReadonlyMap<\n\t\tCommandClasses,\n\t\t\"*\" | readonly number[]\n\t>;\n\tpublic readonly disableAutoRefresh?: boolean;\n\tpublic readonly disableStrictEntryControlDataValidation?: boolean;\n\tpublic readonly disableStrictMeasurementValidation?: boolean;\n\tpublic readonly disableCallbackFunctionTypeCheck?: number[];\n\tpublic readonly encodeCCsUsingTargetVersion?: boolean;\n\tpublic readonly forceNotificationIdleReset?: boolean;\n\tpublic readonly forceSceneControllerGroupCount?: number;\n\tpublic readonly manualValueRefreshDelayMs?: number;\n\tpublic readonly mapRootReportsToEndpoint?: number;\n\tpublic readonly mapBasicReport?: BasicReportMapping;\n\tpublic readonly mapBasicSet?: BasicSetMapping;\n\tpublic readonly overrideFloatEncoding?: {\n\t\tsize?: number;\n\t\tprecision?: number;\n\t};\n\tpublic readonly overrideQueries?: CompatOverrideQueries;\n\tpublic readonly preserveRootApplicationCCValueIDs?: boolean;\n\tpublic readonly preserveEndpoints?: \"*\" | readonly number[];\n\tpublic readonly removeEndpoints?: \"*\" | readonly number[];\n\tpublic readonly reportTimeout?: number;\n\tpublic readonly skipConfigurationNameQuery?: boolean;\n\tpublic readonly skipConfigurationInfoQuery?: boolean;\n\tpublic readonly treatMultilevelSwitchSetAsEvent?: boolean;\n\tpublic readonly treatSetAsReport?: ReadonlySet<string>;\n\tpublic readonly treatDestinationEndpointAsSource?: boolean;\n\tpublic readonly useUTCInTimeParametersCC?: boolean;\n\tpublic readonly queryOnWakeup?: readonly [\n\t\tstring,\n\t\tstring,\n\t\t...(\n\t\t\t| string\n\t\t\t| number\n\t\t\t| boolean\n\t\t\t| Pick<ValueID, \"property\" | \"propertyKey\">\n\t\t)[],\n\t][];\n\n\tpublic readonly condition?: string | undefined;\n\n\tpublic evaluateCondition(deviceId?: DeviceID): CompatConfig | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\t\tconst ret = pick(this, [\n\t\t\t\"alarmMapping\",\n\t\t\t\"addCCs\",\n\t\t\t\"removeCCs\",\n\t\t\t\"disableAutoRefresh\",\n\t\t\t\"disableCallbackFunctionTypeCheck\",\n\t\t\t\"disableStrictEntryControlDataValidation\",\n\t\t\t\"disableStrictMeasurementValidation\",\n\t\t\t\"encodeCCsUsingTargetVersion\",\n\t\t\t\"forceNotificationIdleReset\",\n\t\t\t\"forceSceneControllerGroupCount\",\n\t\t\t\"manualValueRefreshDelayMs\",\n\t\t\t\"mapBasicReport\",\n\t\t\t\"mapBasicSet\",\n\t\t\t\"mapRootReportsToEndpoint\",\n\t\t\t\"overrideFloatEncoding\",\n\t\t\t\"overrideQueries\",\n\t\t\t\"reportTimeout\",\n\t\t\t\"preserveRootApplicationCCValueIDs\",\n\t\t\t\"preserveEndpoints\",\n\t\t\t\"removeEndpoints\",\n\t\t\t\"skipConfigurationNameQuery\",\n\t\t\t\"skipConfigurationInfoQuery\",\n\t\t\t\"treatMultilevelSwitchSetAsEvent\",\n\t\t\t\"treatSetAsReport\",\n\t\t\t\"treatDestinationEndpointAsSource\",\n\t\t\t\"useUTCInTimeParametersCC\",\n\t\t\t\"queryOnWakeup\",\n\t\t]);\n\t\treturn stripUndefined(ret) as CompatConfig;\n\t}\n}\n\nexport type CompatConfig = Omit<\n\tConditionalCompatConfig,\n\t\"condition\" | \"evaluateCondition\"\n>;\n\nexport class CompatAddCC {\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tconst endpoints = new Map<number, Partial<CommandClassInfo>>();\n\t\tconst parseEndpointInfo = (endpoint: number, info: JSONObject) => {\n\t\t\tconst parsed: Partial<CommandClassInfo> = {};\n\t\t\tif (info.isSupported != undefined) {\n\t\t\t\tif (typeof info.isSupported !== \"boolean\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty isSupported in compat option commandClasses.add, endpoint ${endpoint} must be a boolean!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.isSupported = info.isSupported;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (info.isControlled != undefined) {\n\t\t\t\tif (typeof info.isControlled !== \"boolean\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty isControlled in compat option commandClasses.add, endpoint ${endpoint} must be a boolean!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.isControlled = info.isControlled;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (info.secure != undefined) {\n\t\t\t\tif (typeof info.secure !== \"boolean\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty secure in compat option commandClasses.add, endpoint ${endpoint} must be a boolean!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.secure = info.secure;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (info.version != undefined) {\n\t\t\t\tif (typeof info.version !== \"number\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty version in compat option commandClasses.add, endpoint ${endpoint} must be a number!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.version = info.version;\n\t\t\t\t}\n\t\t\t}\n\t\t\tendpoints.set(endpoint, parsed);\n\t\t};\n\t\t// Parse root endpoint info if given\n\t\tif (\n\t\t\tdefinition.isSupported != undefined\n\t\t\t|| definition.isControlled != undefined\n\t\t\t|| definition.version != undefined\n\t\t\t|| definition.secure != undefined\n\t\t) {\n\t\t\t// We have info for the root endpoint\n\t\t\tparseEndpointInfo(0, definition);\n\t\t}\n\t\t// Parse all other endpoints\n\t\tif (isObject(definition.endpoints)) {\n\t\t\tif (\n\t\t\t\t!Object.keys(definition.endpoints).every((k) => /^\\d+$/.test(k))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ninvalid endpoint index in compat option commandClasses.add`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tfor (const [ep, info] of Object.entries(definition.endpoints)) {\n\t\t\t\t\tparseEndpointInfo(parseInt(ep), info as any);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.endpoints = endpoints;\n\t}\n\n\tpublic readonly endpoints: ReadonlyMap<number, Partial<CommandClassInfo>>;\n}\n\nexport interface CompatMapAlarmFrom {\n\talarmType: number;\n\talarmLevel?: number;\n}\n\nexport interface CompatMapAlarmTo {\n\tnotificationType: number;\n\tnotificationEvent: number;\n\teventParameters?: Record<string, number | \"alarmLevel\">;\n}\n\nexport class CompatMapAlarm {\n\tpublic constructor(\n\t\tfilename: string,\n\t\tdefinition: JSONObject,\n\t\tindex: number,\n\t) {\n\t\tif (!isObject(definition.from)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"from\" must be an object!`,\n\t\t\t);\n\t\t} else {\n\t\t\tif (typeof definition.from.alarmType !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"from.alarmType\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (\n\t\t\t\tdefinition.from.alarmLevel != undefined\n\t\t\t\t&& typeof definition.from.alarmLevel !== \"number\"\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: if property \"from.alarmLevel\" is given, it must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!isObject(definition.to)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to\" must be an object!`,\n\t\t\t);\n\t\t} else {\n\t\t\tif (typeof definition.to.notificationType !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.notificationType\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof definition.to.notificationEvent !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.notificationEvent\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (definition.to.eventParameters != undefined) {\n\t\t\t\tif (!isObject(definition.to.eventParameters)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.eventParameters\" must be an object!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tfor (\n\t\t\t\t\t\tconst [key, val] of Object.entries(\n\t\t\t\t\t\t\tdefinition.to.eventParameters,\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (typeof val !== \"number\" && val !== \"alarmLevel\") {\n\t\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.eventParameters.${key}\" must be a number or the literal \"alarmLevel\"!`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.from = pick(definition.from, [\"alarmType\", \"alarmLevel\"]);\n\t\tthis.to = pick(definition.to, [\n\t\t\t\"notificationType\",\n\t\t\t\"notificationEvent\",\n\t\t\t\"eventParameters\",\n\t\t]);\n\t}\n\n\tpublic readonly from: CompatMapAlarmFrom;\n\tpublic readonly to: CompatMapAlarmTo;\n}\n\nexport class CompatOverrideQueries {\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tconst overrides = new Map();\n\n\t\tconst parseOverride = (\n\t\t\tcc: CommandClasses,\n\t\t\tinfo: JSONObject,\n\t\t): CompatOverrideQuery => {\n\t\t\tif (typeof info.method !== \"string\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"method\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be a string!`,\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tinfo.matchArgs != undefined\n\t\t\t\t&& !isArray(info.matchArgs)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"matchArgs\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be an array!`,\n\t\t\t\t);\n\t\t\t} else if (!(\"result\" in info)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"result\" is missing in in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t}!`,\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tinfo.endpoint != undefined\n\t\t\t\t&& typeof info.endpoint !== \"number\"\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"endpoint\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be a number!`,\n\t\t\t\t);\n\t\t\t} else if (info.persistValues && !isObject(info.persistValues)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"persistValues\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be an object!`,\n\t\t\t\t);\n\t\t\t} else if (info.extendMetadata && !isObject(info.extendMetadata)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"extendMetadata\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be an object!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tendpoint: info.endpoint,\n\t\t\t\tmethod: info.method,\n\t\t\t\tmatchArgs: info.matchArgs,\n\t\t\t\tresult: info.result,\n\t\t\t\tpersistValues: info.persistValues,\n\t\t\t\textendMetadata: info.extendMetadata,\n\t\t\t};\n\t\t};\n\n\t\tfor (const [key, value] of Object.entries(definition)) {\n\t\t\t// Parse the key into a CC ID\n\t\t\tconst cc = tryParseCCId(key);\n\t\t\tif (cc == undefined) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nInvalid Command Class \"${key}\" specified in compat option overrideQueries!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet overrideDefinitions: any;\n\t\t\tif (isObject(value)) {\n\t\t\t\toverrideDefinitions = [value];\n\t\t\t} else if (!isArray(value)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"${key}\" in compat option overrideQueries must be a single override object or an array thereof!`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toverrideDefinitions = value;\n\t\t\t}\n\n\t\t\toverrides.set(\n\t\t\t\tcc,\n\t\t\t\toverrideDefinitions.map((info: any) => parseOverride(cc, info)),\n\t\t\t);\n\t\t}\n\n\t\tthis.overrides = overrides;\n\t}\n\n\t// CC -> endpoint -> queries\n\tprivate readonly overrides: ReadonlyMap<\n\t\tCommandClasses,\n\t\tCompatOverrideQuery[]\n\t>;\n\n\tpublic hasOverride(ccId: CommandClasses): boolean {\n\t\treturn this.overrides.has(ccId);\n\t}\n\n\tpublic matchOverride(\n\t\tcc: CommandClasses,\n\t\tendpointIndex: number,\n\t\tmethod: string,\n\t\targs: any[],\n\t):\n\t\t| Pick<\n\t\t\tCompatOverrideQuery,\n\t\t\t\"result\" | \"persistValues\" | \"extendMetadata\"\n\t\t>\n\t\t| undefined\n\t{\n\t\tconst queries = this.overrides.get(cc);\n\t\tif (!queries) return undefined;\n\t\tfor (const query of queries) {\n\t\t\tif ((query.endpoint ?? 0) !== endpointIndex) continue;\n\t\t\tif (query.method !== method) continue;\n\t\t\tif (query.matchArgs) {\n\t\t\t\tif (query.matchArgs.length !== args.length) continue;\n\t\t\t\tif (!query.matchArgs.every((arg, i) => arg === args[i])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn pick(query, [\"result\", \"persistValues\", \"extendMetadata\"]);\n\t\t}\n\t}\n}\n\nexport interface CompatOverrideQuery {\n\t/** Which endpoint this override is for */\n\tendpoint?: number;\n\t/** For which API method this override is defined */\n\tmethod: string;\n\t/**\n\t * An array of method arguments that needs to match for this override to apply.\n\t * If `undefined`, no matching is performed.\n\t */\n\tmatchArgs?: any[];\n\t/** The result to return from the API call */\n\tresult: any;\n\t/**\n\t * An optional dictionary of values that will be persisted in the cache.\n\t * The keys are properties of the `...CCValues` objects that belong to this CC.\n\t */\n\tpersistValues?: Record<string, any>;\n\t/**\n\t * An optional dictionary of value metadata that will be persisted in the cache.\n\t * The keys are properties of the `...CCValues` objects that belong to this CC.\n\t * The given metadata will be merged with statically defined value metadata.\n\t */\n\textendMetadata?: Record<string, any>;\n}\n\nconst basicReportMappings = [\n\tfalse,\n\t\"auto\",\n\t\"Binary Sensor\",\n] as const;\n\n/**\n * Defines how to handle a received Basic CC Report:\n * - \"auto\": map it to a different CC based on the device type, with fallback to `false`\n * - false: treat the report verbatim without mapping\n * - \"Binary Sensor\": treat it as a Binary Sensor CC Report, regardless of device type\n */\nexport type BasicReportMapping = typeof basicReportMappings[number];\n\nfunction isBasicReportMapping(v: unknown): v is BasicReportMapping {\n\treturn basicReportMappings.includes(v as any);\n}\n\nconst basicSetMappings = [\n\t\"event\",\n\t\"report\",\n\t\"auto\",\n\t\"Binary Sensor\",\n] as const;\n\n/**\n * Defines how to handle a received Basic CC Set:\n * - \"event\": emit an event for the special `event` CC value\n * - \"report\": treat it as as a Basic CC Report (default)\n * - \"auto\": map it to a different CC based on the device type, with fallback to Basic CC report\n * - \"Binary Sensor\": treat it as a Binary Sensor CC Report, regardless of device type\n */\nexport type BasicSetMapping = typeof basicSetMappings[number];\n\nfunction isBasicSetMapping(v: unknown): v is BasicSetMapping {\n\treturn basicSetMappings.includes(v as any);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;AAAA,kBAMO;AACP,oBAAsC;AACtC,wBAAkC;AAClC,wBAAiD;AACjD,6BAAuD;AAGjD,MAAO,wBAAuB;EAbpC,OAaoC;;;EAC3B,eAAe;EAEvB,YAAmB,UAAkB,YAAsB;AAC1D,SAAK,YAAY,WAAW;AAE5B,QAAI,WAAW,iBAAiB,QAAW;AAC1C,UACC,KAAC,2BAAQ,WAAW,aAAa,KAC9B,CAAC,WAAW,cAAc,MAC5B,CAAC,YACA,2BAAQ,GAAG,KACR,IAAI,UAAU,KACd,OAAO,IAAI,CAAC,MAAM,YAClB,OAAO,IAAI,CAAC,MAAM,YAClB,IACD,MAAM,CAAC,EACP,MACA,CAAC,QACA,OAAO,QAAQ,YACZ,OAAO,QAAQ,YACf,OAAO,QAAQ,SAAS,CAC5B,GAEH;AACD,kDACC,WACA,kBAAkB,QAAQ;qCACM;MAElC;AAGA,WAAK,gBAAiB,WAAW,cAA0B,IAC1D,CAAC,QACA,IAAI,IAAI,CAAC,QAAO;AACf,YACC,OAAO,QAAQ,YACZ,KAAK,aAAa,KAAK,GAAG,GAC5B;AACD,gBAAM,QAAQ,KAAK,MAClB,IAAI,MAAM,UAAU,MAAM,CAAC;AAE5B,iBAAO;YACN,UAAU,MAAM,CAAC;YACjB,aAAa,MAAM,CAAC;;QAEtB;AACA,eAAO;MACR,CAAC,CAAC;IAEL;AAEA,QAAI,WAAW,sBAAsB,QAAW;AAC/C,UAAI,WAAW,uBAAuB,MAAM;AAC3C,kDACC,WACA,kBAAkB,QAAQ;yDAC0B;MAEtD;AAEA,WAAK,qBAAqB,WAAW;IACtC;AAEA,QAAI,WAAW,oCAAoC,QAAW;AAC7D,UACC,KAAC,2BAAQ,WAAW,g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AAU,IAAI,EAAE;AACrC,QAAI,CAAC;AAAS,aAAO;AACrB,eAAW,SAAS,SAAS;AAC5B,WAAK,MAAM,YAAY,OAAO;AAAe;AAC7C,UAAI,MAAM,WAAW;AAAQ;AAC7B,UAAI,MAAM,WAAW;AACpB,YAAI,MAAM,UAAU,WAAW,KAAK;AAAQ;AAC5C,YAAI,CAAC,MAAM,UAAU,MAAM,CAAC,KAAK,MAAM,QAAQ,KAAK,CAAC,CAAC,GAAG;AACxD;QACD;MACD;AACA,iBAAO,oBAAK,OAAO,CAAC,UAAU,iBAAiB,gBAAgB,CAAC;IACjE;EACD;;AA4BD,MAAM,sBAAsB;EAC3B;EACA;EACA;;AAWD,SAAS,qBAAqB,GAAU;AACvC,SAAO,oBAAoB,SAAS,CAAQ;AAC7C;AAFS;AAIT,MAAM,mBAAmB;EACxB;EACA;EACA;EACA;;AAYD,SAAS,kBAAkB,GAAU;AACpC,SAAO,iBAAiB,SAAS,CAAQ;AAC1C;AAFS;",
|
|
4
|
+
"sourcesContent": ["import {\n\ttype CommandClassInfo,\n\ttype CommandClasses,\n\ttype ValueID,\n\tgetCCName,\n\tstripUndefined,\n} from \"@zwave-js/core\";\nimport { type JSONObject, pick } from \"@zwave-js/shared\";\nimport { isArray, isObject } from \"alcalzone-shared/typeguards\";\nimport { throwInvalidConfig, tryParseCCId } from \"../utils_safe.js\";\nimport { type ConditionalItem, conditionApplies } from \"./ConditionalItem.js\";\nimport type { DeviceID } from \"./shared.js\";\n\nexport class ConditionalCompatConfig implements ConditionalItem<CompatConfig> {\n\tprivate valueIdRegex = /^\\$value\\$\\[.+\\]$/;\n\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tthis.condition = definition.$if;\n\n\t\tif (definition.queryOnWakeup != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.queryOnWakeup)\n\t\t\t\t|| !definition.queryOnWakeup.every(\n\t\t\t\t\t(cmd: unknown) =>\n\t\t\t\t\t\tisArray(cmd)\n\t\t\t\t\t\t&& cmd.length >= 2\n\t\t\t\t\t\t&& typeof cmd[0] === \"string\"\n\t\t\t\t\t\t&& typeof cmd[1] === \"string\"\n\t\t\t\t\t\t&& cmd\n\t\t\t\t\t\t\t.slice(2)\n\t\t\t\t\t\t\t.every(\n\t\t\t\t\t\t\t\t(arg) =>\n\t\t\t\t\t\t\t\t\ttypeof arg === \"string\"\n\t\t\t\t\t\t\t\t\t|| typeof arg === \"number\"\n\t\t\t\t\t\t\t\t\t|| typeof arg === \"boolean\",\n\t\t\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option queryOnWakeup`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Parse \"smart\" values into partial Value IDs\n\t\t\tthis.queryOnWakeup = (definition.queryOnWakeup as any[][]).map(\n\t\t\t\t(cmd) =>\n\t\t\t\t\tcmd.map((arg) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof arg === \"string\"\n\t\t\t\t\t\t\t&& this.valueIdRegex.test(arg)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconst tuple = JSON.parse(\n\t\t\t\t\t\t\t\targ.slice(\"$value$\".length),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tproperty: tuple[0],\n\t\t\t\t\t\t\t\tpropertyKey: tuple[1],\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn arg;\n\t\t\t\t\t}),\n\t\t\t) as any;\n\t\t}\n\n\t\tif (definition.disableAutoRefresh != undefined) {\n\t\t\tif (definition.disableAutoRefresh !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option disableAutoRefresh must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.disableAutoRefresh = definition.disableAutoRefresh;\n\t\t}\n\n\t\tif (definition.disableCallbackFunctionTypeCheck != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.disableCallbackFunctionTypeCheck)\n\t\t\t\t|| !definition.disableCallbackFunctionTypeCheck.every(\n\t\t\t\t\t(d: any) => typeof d === \"number\" && d % 1 === 0 && d > 0,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nwhen present, compat option disableCallbackFunctionTypeCheck msut be an array of positive integers`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.disableCallbackFunctionTypeCheck =\n\t\t\t\tdefinition.disableCallbackFunctionTypeCheck;\n\t\t}\n\n\t\tif (definition.disableStrictEntryControlDataValidation != undefined) {\n\t\t\tif (definition.disableStrictEntryControlDataValidation !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option disableStrictEntryControlDataValidation must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.disableStrictEntryControlDataValidation =\n\t\t\t\tdefinition.disableStrictEntryControlDataValidation;\n\t\t}\n\n\t\tif (definition.disableStrictMeasurementValidation != undefined) {\n\t\t\tif (definition.disableStrictMeasurementValidation !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option disableStrictMeasurementValidation must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.disableStrictMeasurementValidation =\n\t\t\t\tdefinition.disableStrictMeasurementValidation;\n\t\t}\n\n\t\tif (definition.encodeCCsUsingTargetVersion != undefined) {\n\t\t\tif (definition.encodeCCsUsingTargetVersion !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option encodeCCsUsingTargetVersion must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.encodeCCsUsingTargetVersion =\n\t\t\t\tdefinition.encodeCCsUsingTargetVersion;\n\t\t}\n\n\t\tif (definition.forceNotificationIdleReset != undefined) {\n\t\t\tif (definition.forceNotificationIdleReset !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option forceNotificationIdleReset must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.forceNotificationIdleReset =\n\t\t\t\tdefinition.forceNotificationIdleReset;\n\t\t}\n\n\t\tif (definition.forceSceneControllerGroupCount != undefined) {\n\t\t\tif (typeof definition.forceSceneControllerGroupCount !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option forceSceneControllerGroupCount must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.forceSceneControllerGroupCount < 0\n\t\t\t\t|| definition.forceSceneControllerGroupCount > 255\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option forceSceneControllerGroupCount must be between 0 and 255!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.forceSceneControllerGroupCount =\n\t\t\t\tdefinition.forceSceneControllerGroupCount;\n\t\t}\n\n\t\tif (definition.mapBasicReport != undefined) {\n\t\t\tif (!isBasicReportMapping(definition.mapBasicReport)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapBasicReport contains an invalid value`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.mapBasicReport = definition.mapBasicReport;\n\t\t}\n\n\t\tif (definition.mapBasicSet != undefined) {\n\t\t\tif (!isBasicSetMapping(definition.mapBasicSet)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapBasicSet contains an invalid value`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.mapBasicSet = definition.mapBasicSet;\n\t\t}\n\n\t\tif (definition.preserveRootApplicationCCValueIDs != undefined) {\n\t\t\tif (definition.preserveRootApplicationCCValueIDs !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option preserveRootApplicationCCValueIDs`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.preserveRootApplicationCCValueIDs =\n\t\t\t\tdefinition.preserveRootApplicationCCValueIDs;\n\t\t}\n\n\t\tif (definition.preserveEndpoints != undefined) {\n\t\t\tif (\n\t\t\t\tdefinition.preserveEndpoints !== \"*\"\n\t\t\t\t&& !(\n\t\t\t\t\tisArray(definition.preserveEndpoints)\n\t\t\t\t\t&& definition.preserveEndpoints.every(\n\t\t\t\t\t\t(d: any) =>\n\t\t\t\t\t\t\ttypeof d === \"number\" && d % 1 === 0 && d > 0,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option preserveEndpoints must be \"*\" or an array of positive integers`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.preserveEndpoints = definition.preserveEndpoints;\n\t\t}\n\n\t\tif (definition.removeEndpoints != undefined) {\n\t\t\tif (\n\t\t\t\tdefinition.removeEndpoints !== \"*\"\n\t\t\t\t&& !(\n\t\t\t\t\tisArray(definition.removeEndpoints)\n\t\t\t\t\t&& definition.removeEndpoints.every(\n\t\t\t\t\t\t(d: any) =>\n\t\t\t\t\t\t\ttypeof d === \"number\" && d % 1 === 0 && d > 0,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option removeEndpoints must be \"*\" or an array of positive integers`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.removeEndpoints = definition.removeEndpoints;\n\t\t}\n\n\t\tif (definition.skipConfigurationNameQuery != undefined) {\n\t\t\tif (definition.skipConfigurationNameQuery !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option skipConfigurationNameQuery`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.skipConfigurationNameQuery =\n\t\t\t\tdefinition.skipConfigurationNameQuery;\n\t\t}\n\n\t\tif (definition.skipConfigurationInfoQuery != undefined) {\n\t\t\tif (definition.skipConfigurationInfoQuery !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option skipConfigurationInfoQuery`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.skipConfigurationInfoQuery =\n\t\t\t\tdefinition.skipConfigurationInfoQuery;\n\t\t}\n\n\t\tif (definition.treatMultilevelSwitchSetAsEvent != undefined) {\n\t\t\tif (definition.treatMultilevelSwitchSetAsEvent !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option treatMultilevelSwitchSetAsEvent`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.treatMultilevelSwitchSetAsEvent =\n\t\t\t\tdefinition.treatMultilevelSwitchSetAsEvent;\n\t\t}\n\n\t\tif (definition.treatSetAsReport != undefined) {\n\t\t\tif (\n\t\t\t\t!(isArray(definition.treatSetAsReport)\n\t\t\t\t\t&& definition.treatSetAsReport.every(\n\t\t\t\t\t\t(d: any) => typeof d === \"string\",\n\t\t\t\t\t))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option treatSetAsReport must be an array of strings`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.treatSetAsReport = new Set(definition.treatSetAsReport);\n\t\t}\n\n\t\tif (definition.treatDestinationEndpointAsSource != undefined) {\n\t\t\tif (definition.treatDestinationEndpointAsSource !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option treatDestinationEndpointAsSource`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.treatDestinationEndpointAsSource =\n\t\t\t\tdefinition.treatDestinationEndpointAsSource;\n\t\t}\n\n\t\tif (definition.useUTCInTimeParametersCC != undefined) {\n\t\t\tif (definition.useUTCInTimeParametersCC !== true) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option useUTCInTimeParametersCC must be true or omitted`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.useUTCInTimeParametersCC = definition.useUTCInTimeParametersCC;\n\t\t}\n\n\t\tif (definition.manualValueRefreshDelayMs != undefined) {\n\t\t\tif (typeof definition.manualValueRefreshDelayMs !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option manualValueRefreshDelayMs must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.manualValueRefreshDelayMs % 1 !== 0\n\t\t\t\t|| definition.manualValueRefreshDelayMs < 0\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option manualValueRefreshDelayMs must be a non-negative integer!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.manualValueRefreshDelayMs =\n\t\t\t\tdefinition.manualValueRefreshDelayMs;\n\t\t}\n\n\t\tif (definition.reportTimeout != undefined) {\n\t\t\tif (typeof definition.reportTimeout !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option reportTimeout must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.reportTimeout % 1 !== 0\n\t\t\t\t|| definition.reportTimeout < 1000\n\t\t\t\t|| definition.reportTimeout > 10000\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option reportTimeout must be an integer between 1000 and 10000!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.reportTimeout = definition.reportTimeout;\n\t\t}\n\n\t\tif (definition.mapRootReportsToEndpoint != undefined) {\n\t\t\tif (typeof definition.mapRootReportsToEndpoint !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapRootReportsToEndpoint must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdefinition.mapRootReportsToEndpoint % 1 !== 0\n\t\t\t\t|| definition.mapRootReportsToEndpoint < 1\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option mapRootReportsToEndpoint must be a positive integer!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.mapRootReportsToEndpoint = definition.mapRootReportsToEndpoint;\n\t\t}\n\n\t\tif (definition.overrideFloatEncoding != undefined) {\n\t\t\tif (!isObject(definition.overrideFloatEncoding)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option overrideFloatEncoding`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.overrideFloatEncoding = {};\n\t\t\tif (\"precision\" in definition.overrideFloatEncoding) {\n\t\t\t\tif (\n\t\t\t\t\ttypeof definition.overrideFloatEncoding.precision\n\t\t\t\t\t\t!= \"number\"\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.precision must be a number!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tdefinition.overrideFloatEncoding.precision % 1 !== 0\n\t\t\t\t\t|| definition.overrideFloatEncoding.precision < 0\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.precision must be a positive integer!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.overrideFloatEncoding.precision =\n\t\t\t\t\tdefinition.overrideFloatEncoding.precision;\n\t\t\t}\n\t\t\tif (\"size\" in definition.overrideFloatEncoding) {\n\t\t\t\tif (typeof definition.overrideFloatEncoding.size != \"number\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.size must be a number!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tdefinition.overrideFloatEncoding.size % 1 !== 0\n\t\t\t\t\t|| definition.overrideFloatEncoding.size < 1\n\t\t\t\t\t|| definition.overrideFloatEncoding.size > 4\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideFloatEncoding.size must be an integer between 1 and 4!`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.overrideFloatEncoding.size =\n\t\t\t\t\tdefinition.overrideFloatEncoding.size;\n\t\t\t}\n\n\t\t\tif (Object.keys(this.overrideFloatEncoding).length === 0) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option overrideFloatEncoding: size and/or precision must be specified!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (definition.commandClasses != undefined) {\n\t\t\tif (!isObject(definition.commandClasses)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option commandClasses`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (definition.commandClasses.add != undefined) {\n\t\t\t\tif (!isObject(definition.commandClasses.add)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option commandClasses.add`,\n\t\t\t\t\t);\n\t\t\t\t} else if (\n\t\t\t\t\t!Object.values(definition.commandClasses.add).every((v) =>\n\t\t\t\t\t\tisObject(v)\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nAll values in compat option commandClasses.add must be objects`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst addCCs = new Map<CommandClasses, CompatAddCC>();\n\t\t\t\tfor (\n\t\t\t\t\tconst [key, info] of Object.entries(\n\t\t\t\t\t\tdefinition.commandClasses.add,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Parse the key into a CC ID\n\t\t\t\t\tconst cc = tryParseCCId(key);\n\t\t\t\t\tif (cc == undefined) {\n\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t`config/devices/${filename}:\nInvalid Command Class \"${key}\" specified in compat option commandClasses.add!`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\taddCCs.set(cc, new CompatAddCC(filename, info as any));\n\t\t\t\t}\n\t\t\t\tthis.addCCs = addCCs;\n\t\t\t}\n\n\t\t\tif (definition.commandClasses.remove != undefined) {\n\t\t\t\tif (!isObject(definition.commandClasses.remove)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option commandClasses.remove`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst removeCCs = new Map<\n\t\t\t\t\tCommandClasses,\n\t\t\t\t\t\"*\" | readonly number[]\n\t\t\t\t>();\n\t\t\t\tfor (\n\t\t\t\t\tconst [key, info] of Object.entries(\n\t\t\t\t\t\tdefinition.commandClasses.remove,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Parse the key into a CC ID\n\t\t\t\t\tconst cc = tryParseCCId(key);\n\t\t\t\t\tif (cc == undefined) {\n\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t`config/devices/${filename}:\nInvalid Command Class \"${key}\" specified in compat option commandClasses.remove!`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tif (isObject(info) && \"endpoints\" in info) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tinfo.endpoints === \"*\"\n\t\t\t\t\t\t\t|| (isArray(info.endpoints)\n\t\t\t\t\t\t\t\t&& info.endpoints.every(\n\t\t\t\t\t\t\t\t\t(i) => typeof i === \"number\",\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tremoveCCs.set(cc, info.endpoints as any);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t\t`config/devices/${filename}:\nCompat option commandClasses.remove has an invalid \"endpoints\" property. Only \"*\" and numeric arrays are allowed!`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t`config/devices/${filename}:\nAll values in compat option commandClasses.remove must be objects with an \"endpoints\" property!`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.removeCCs = removeCCs;\n\t\t\t}\n\t\t}\n\n\t\tif (definition.alarmMapping != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.alarmMapping)\n\t\t\t\t|| !definition.alarmMapping.every((m: any) => isObject(m))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option alarmMapping must be an array where all items are objects!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.alarmMapping = (definition.alarmMapping as any[]).map(\n\t\t\t\t(m, i) => new CompatMapAlarm(filename, m, i + 1),\n\t\t\t);\n\t\t}\n\n\t\tif (definition.remapNotifications != undefined) {\n\t\t\tif (\n\t\t\t\t!isArray(definition.remapNotifications)\n\t\t\t\t|| !definition.remapNotifications.every((m: any) => isObject(m))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option remapNotifications must be an array where all items are objects!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.remapNotifications = (definition.remapNotifications as any[])\n\t\t\t\t.map(\n\t\t\t\t\t(m, i) => new CompatRemapNotification(filename, m, i + 1),\n\t\t\t\t);\n\t\t}\n\n\t\tif (definition.overrideQueries != undefined) {\n\t\t\tif (!isObject(definition.overrideQueries)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ncompat option overrideQueries must be an object!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.overrideQueries = new CompatOverrideQueries(\n\t\t\t\tfilename,\n\t\t\t\tdefinition.overrideQueries,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic readonly alarmMapping?: readonly CompatMapAlarm[];\n\tpublic readonly remapNotifications?: readonly CompatRemapNotification[];\n\tpublic readonly addCCs?: ReadonlyMap<CommandClasses, CompatAddCC>;\n\tpublic readonly removeCCs?: ReadonlyMap<\n\t\tCommandClasses,\n\t\t\"*\" | readonly number[]\n\t>;\n\tpublic readonly disableAutoRefresh?: boolean;\n\tpublic readonly disableStrictEntryControlDataValidation?: boolean;\n\tpublic readonly disableStrictMeasurementValidation?: boolean;\n\tpublic readonly disableCallbackFunctionTypeCheck?: number[];\n\tpublic readonly encodeCCsUsingTargetVersion?: boolean;\n\tpublic readonly forceNotificationIdleReset?: boolean;\n\tpublic readonly forceSceneControllerGroupCount?: number;\n\tpublic readonly manualValueRefreshDelayMs?: number;\n\tpublic readonly mapRootReportsToEndpoint?: number;\n\tpublic readonly mapBasicReport?: BasicReportMapping;\n\tpublic readonly mapBasicSet?: BasicSetMapping;\n\tpublic readonly overrideFloatEncoding?: {\n\t\tsize?: number;\n\t\tprecision?: number;\n\t};\n\tpublic readonly overrideQueries?: CompatOverrideQueries;\n\tpublic readonly preserveRootApplicationCCValueIDs?: boolean;\n\tpublic readonly preserveEndpoints?: \"*\" | readonly number[];\n\tpublic readonly removeEndpoints?: \"*\" | readonly number[];\n\tpublic readonly reportTimeout?: number;\n\tpublic readonly skipConfigurationNameQuery?: boolean;\n\tpublic readonly skipConfigurationInfoQuery?: boolean;\n\tpublic readonly treatMultilevelSwitchSetAsEvent?: boolean;\n\tpublic readonly treatSetAsReport?: ReadonlySet<string>;\n\tpublic readonly treatDestinationEndpointAsSource?: boolean;\n\tpublic readonly useUTCInTimeParametersCC?: boolean;\n\tpublic readonly queryOnWakeup?: readonly [\n\t\tstring,\n\t\tstring,\n\t\t...(\n\t\t\t| string\n\t\t\t| number\n\t\t\t| boolean\n\t\t\t| Pick<ValueID, \"property\" | \"propertyKey\">\n\t\t)[],\n\t][];\n\n\tpublic readonly condition?: string | undefined;\n\n\tpublic evaluateCondition(deviceId?: DeviceID): CompatConfig | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\t\tconst ret = pick(this, [\n\t\t\t\"alarmMapping\",\n\t\t\t\"remapNotifications\",\n\t\t\t\"addCCs\",\n\t\t\t\"removeCCs\",\n\t\t\t\"disableAutoRefresh\",\n\t\t\t\"disableCallbackFunctionTypeCheck\",\n\t\t\t\"disableStrictEntryControlDataValidation\",\n\t\t\t\"disableStrictMeasurementValidation\",\n\t\t\t\"encodeCCsUsingTargetVersion\",\n\t\t\t\"forceNotificationIdleReset\",\n\t\t\t\"forceSceneControllerGroupCount\",\n\t\t\t\"manualValueRefreshDelayMs\",\n\t\t\t\"mapBasicReport\",\n\t\t\t\"mapBasicSet\",\n\t\t\t\"mapRootReportsToEndpoint\",\n\t\t\t\"overrideFloatEncoding\",\n\t\t\t\"overrideQueries\",\n\t\t\t\"reportTimeout\",\n\t\t\t\"preserveRootApplicationCCValueIDs\",\n\t\t\t\"preserveEndpoints\",\n\t\t\t\"removeEndpoints\",\n\t\t\t\"skipConfigurationNameQuery\",\n\t\t\t\"skipConfigurationInfoQuery\",\n\t\t\t\"treatMultilevelSwitchSetAsEvent\",\n\t\t\t\"treatSetAsReport\",\n\t\t\t\"treatDestinationEndpointAsSource\",\n\t\t\t\"useUTCInTimeParametersCC\",\n\t\t\t\"queryOnWakeup\",\n\t\t]);\n\t\treturn stripUndefined(ret) as CompatConfig;\n\t}\n}\n\nexport type CompatConfig = Omit<\n\tConditionalCompatConfig,\n\t\"condition\" | \"evaluateCondition\"\n>;\n\nexport class CompatAddCC {\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tconst endpoints = new Map<number, Partial<CommandClassInfo>>();\n\t\tconst parseEndpointInfo = (endpoint: number, info: JSONObject) => {\n\t\t\tconst parsed: Partial<CommandClassInfo> = {};\n\t\t\tif (info.isSupported != undefined) {\n\t\t\t\tif (typeof info.isSupported !== \"boolean\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty isSupported in compat option commandClasses.add, endpoint ${endpoint} must be a boolean!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.isSupported = info.isSupported;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (info.isControlled != undefined) {\n\t\t\t\tif (typeof info.isControlled !== \"boolean\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty isControlled in compat option commandClasses.add, endpoint ${endpoint} must be a boolean!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.isControlled = info.isControlled;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (info.secure != undefined) {\n\t\t\t\tif (typeof info.secure !== \"boolean\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty secure in compat option commandClasses.add, endpoint ${endpoint} must be a boolean!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.secure = info.secure;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (info.version != undefined) {\n\t\t\t\tif (typeof info.version !== \"number\") {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nProperty version in compat option commandClasses.add, endpoint ${endpoint} must be a number!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tparsed.version = info.version;\n\t\t\t\t}\n\t\t\t}\n\t\t\tendpoints.set(endpoint, parsed);\n\t\t};\n\t\t// Parse root endpoint info if given\n\t\tif (\n\t\t\tdefinition.isSupported != undefined\n\t\t\t|| definition.isControlled != undefined\n\t\t\t|| definition.version != undefined\n\t\t\t|| definition.secure != undefined\n\t\t) {\n\t\t\t// We have info for the root endpoint\n\t\t\tparseEndpointInfo(0, definition);\n\t\t}\n\t\t// Parse all other endpoints\n\t\tif (isObject(definition.endpoints)) {\n\t\t\tif (\n\t\t\t\t!Object.keys(definition.endpoints).every((k) => /^\\d+$/.test(k))\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\ninvalid endpoint index in compat option commandClasses.add`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tfor (const [ep, info] of Object.entries(definition.endpoints)) {\n\t\t\t\t\tparseEndpointInfo(parseInt(ep), info as any);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.endpoints = endpoints;\n\t}\n\n\tpublic readonly endpoints: ReadonlyMap<number, Partial<CommandClassInfo>>;\n}\n\nexport interface CompatMapAlarmFrom {\n\talarmType: number;\n\talarmLevel?: number;\n}\n\nexport interface CompatMapAlarmTo {\n\tnotificationType: number;\n\tnotificationEvent: number;\n\teventParameters?: Record<string, number | \"alarmLevel\">;\n}\n\nexport class CompatMapAlarm {\n\tpublic constructor(\n\t\tfilename: string,\n\t\tdefinition: JSONObject,\n\t\tindex: number,\n\t) {\n\t\tif (!isObject(definition.from)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"from\" must be an object!`,\n\t\t\t);\n\t\t} else {\n\t\t\tif (typeof definition.from.alarmType !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"from.alarmType\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (\n\t\t\t\tdefinition.from.alarmLevel != undefined\n\t\t\t\t&& typeof definition.from.alarmLevel !== \"number\"\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: if property \"from.alarmLevel\" is given, it must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!isObject(definition.to)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to\" must be an object!`,\n\t\t\t);\n\t\t} else {\n\t\t\tif (typeof definition.to.notificationType !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.notificationType\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof definition.to.notificationEvent !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.notificationEvent\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (definition.to.eventParameters != undefined) {\n\t\t\t\tif (!isObject(definition.to.eventParameters)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.eventParameters\" must be an object!`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tfor (\n\t\t\t\t\t\tconst [key, val] of Object.entries(\n\t\t\t\t\t\t\tdefinition.to.eventParameters,\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (typeof val !== \"number\" && val !== \"alarmLevel\") {\n\t\t\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t\t\t\"devices\",\n\t\t\t\t\t\t\t\t`config/devices/${filename}:\nerror in compat option alarmMapping, mapping #${index}: property \"to.eventParameters.${key}\" must be a number or the literal \"alarmLevel\"!`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.from = pick(definition.from, [\"alarmType\", \"alarmLevel\"]);\n\t\tthis.to = pick(definition.to, [\n\t\t\t\"notificationType\",\n\t\t\t\"notificationEvent\",\n\t\t\t\"eventParameters\",\n\t\t]);\n\t}\n\n\tpublic readonly from: CompatMapAlarmFrom;\n\tpublic readonly to: CompatMapAlarmTo;\n}\n\nexport interface CompatRemapNotificationFrom {\n\tnotificationType: number;\n\tnotificationEvent: number;\n}\n\nexport interface CompatRemapNotificationTo {\n\tnotificationType: number;\n\tnotificationEvent: number;\n}\n\nexport type CompatRemapNotificationAction =\n\t| { type: \"remap\"; to: CompatRemapNotificationTo }\n\t| { type: \"clear\"; targets: CompatRemapNotificationTo[] }\n\t| { type: \"idle\"; targets: CompatRemapNotificationTo[] };\n\nexport class CompatRemapNotification {\n\tpublic constructor(\n\t\tfilename: string,\n\t\tdefinition: JSONObject,\n\t\tindex: number,\n\t) {\n\t\tif (!isObject(definition.from)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: property \"from\" must be an object!`,\n\t\t\t);\n\t\t} else {\n\t\t\tif (typeof definition.from.notificationType !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: property \"from.notificationType\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof definition.from.notificationEvent !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: property \"from.notificationEvent\" must be a number!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.from = pick(definition.from, [\n\t\t\t\"notificationType\",\n\t\t\t\"notificationEvent\",\n\t\t]);\n\n\t\tconst validateToObject = (obj: any, label: string) => {\n\t\t\tif (!isObject(obj)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: ${label} must be an object!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof obj.notificationType !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: ${label} must have a numeric \"notificationType\"!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof obj.notificationEvent !== \"number\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: ${label} must have a numeric \"notificationEvent\"!`,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tconst validateTargetArray = (arr: any, label: string): void => {\n\t\t\tif (!isArray(arr) || arr.length === 0) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: property \"${label}\" must be a non-empty array of objects!`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tfor (let j = 0; j < arr.length; j++) {\n\t\t\t\tvalidateToObject(\n\t\t\t\t\tarr[j],\n\t\t\t\t\t`\"${label}[${j}]\"`,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tif (definition.to != undefined) {\n\t\t\tvalidateToObject(definition.to, `property \"to\"`);\n\t\t\tthis.action = {\n\t\t\t\ttype: \"remap\",\n\t\t\t\tto: pick(definition.to, [\n\t\t\t\t\t\"notificationType\",\n\t\t\t\t\t\"notificationEvent\",\n\t\t\t\t]),\n\t\t\t};\n\t\t} else if (definition.clear != undefined) {\n\t\t\tvalidateTargetArray(definition.clear, \"clear\");\n\t\t\tthis.action = {\n\t\t\t\ttype: \"clear\",\n\t\t\t\ttargets: (definition.clear as any[]).map((target) =>\n\t\t\t\t\tpick(target, [\"notificationType\", \"notificationEvent\"])\n\t\t\t\t),\n\t\t\t};\n\t\t} else if (definition.idle != undefined) {\n\t\t\tvalidateTargetArray(definition.idle, \"idle\");\n\t\t\tthis.action = {\n\t\t\t\ttype: \"idle\",\n\t\t\t\ttargets: (definition.idle as any[]).map((target) =>\n\t\t\t\t\tpick(target, [\"notificationType\", \"notificationEvent\"])\n\t\t\t\t),\n\t\t\t};\n\t\t} else {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`config/devices/${filename}:\nerror in compat option remapNotifications, mapping #${index}: exactly one of \"to\", \"clear\", or \"idle\" must be defined!`,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic readonly from: CompatRemapNotificationFrom;\n\tpublic readonly action: CompatRemapNotificationAction;\n}\n\nexport class CompatOverrideQueries {\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tconst overrides = new Map();\n\n\t\tconst parseOverride = (\n\t\t\tcc: CommandClasses,\n\t\t\tinfo: JSONObject,\n\t\t): CompatOverrideQuery => {\n\t\t\tif (typeof info.method !== \"string\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"method\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be a string!`,\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tinfo.matchArgs != undefined\n\t\t\t\t&& !isArray(info.matchArgs)\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"matchArgs\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be an array!`,\n\t\t\t\t);\n\t\t\t} else if (!(\"result\" in info)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"result\" is missing in in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t}!`,\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tinfo.endpoint != undefined\n\t\t\t\t&& typeof info.endpoint !== \"number\"\n\t\t\t) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"endpoint\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be a number!`,\n\t\t\t\t);\n\t\t\t} else if (info.persistValues && !isObject(info.persistValues)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"persistValues\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be an object!`,\n\t\t\t\t);\n\t\t\t} else if (info.extendMetadata && !isObject(info.extendMetadata)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"extendMetadata\" in compat option overrideQueries, CC ${\n\t\t\t\t\t\tgetCCName(\n\t\t\t\t\t\t\tcc,\n\t\t\t\t\t\t)\n\t\t\t\t\t} must be an object!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tendpoint: info.endpoint,\n\t\t\t\tmethod: info.method,\n\t\t\t\tmatchArgs: info.matchArgs,\n\t\t\t\tresult: info.result,\n\t\t\t\tpersistValues: info.persistValues,\n\t\t\t\textendMetadata: info.extendMetadata,\n\t\t\t};\n\t\t};\n\n\t\tfor (const [key, value] of Object.entries(definition)) {\n\t\t\t// Parse the key into a CC ID\n\t\t\tconst cc = tryParseCCId(key);\n\t\t\tif (cc == undefined) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nInvalid Command Class \"${key}\" specified in compat option overrideQueries!`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet overrideDefinitions: any;\n\t\t\tif (isObject(value)) {\n\t\t\t\toverrideDefinitions = [value];\n\t\t\t} else if (!isArray(value)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`config/devices/${filename}:\nProperty \"${key}\" in compat option overrideQueries must be a single override object or an array thereof!`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toverrideDefinitions = value;\n\t\t\t}\n\n\t\t\toverrides.set(\n\t\t\t\tcc,\n\t\t\t\toverrideDefinitions.map((info: any) => parseOverride(cc, info)),\n\t\t\t);\n\t\t}\n\n\t\tthis.overrides = overrides;\n\t}\n\n\t// CC -> endpoint -> queries\n\tprivate readonly overrides: ReadonlyMap<\n\t\tCommandClasses,\n\t\tCompatOverrideQuery[]\n\t>;\n\n\tpublic hasOverride(ccId: CommandClasses): boolean {\n\t\treturn this.overrides.has(ccId);\n\t}\n\n\tpublic matchOverride(\n\t\tcc: CommandClasses,\n\t\tendpointIndex: number,\n\t\tmethod: string,\n\t\targs: any[],\n\t):\n\t\t| Pick<\n\t\t\tCompatOverrideQuery,\n\t\t\t\"result\" | \"persistValues\" | \"extendMetadata\"\n\t\t>\n\t\t| undefined\n\t{\n\t\tconst queries = this.overrides.get(cc);\n\t\tif (!queries) return undefined;\n\t\tfor (const query of queries) {\n\t\t\tif ((query.endpoint ?? 0) !== endpointIndex) continue;\n\t\t\tif (query.method !== method) continue;\n\t\t\tif (query.matchArgs) {\n\t\t\t\tif (query.matchArgs.length !== args.length) continue;\n\t\t\t\tif (!query.matchArgs.every((arg, i) => arg === args[i])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn pick(query, [\"result\", \"persistValues\", \"extendMetadata\"]);\n\t\t}\n\t}\n}\n\nexport interface CompatOverrideQuery {\n\t/** Which endpoint this override is for */\n\tendpoint?: number;\n\t/** For which API method this override is defined */\n\tmethod: string;\n\t/**\n\t * An array of method arguments that needs to match for this override to apply.\n\t * If `undefined`, no matching is performed.\n\t */\n\tmatchArgs?: any[];\n\t/** The result to return from the API call */\n\tresult: any;\n\t/**\n\t * An optional dictionary of values that will be persisted in the cache.\n\t * The keys are properties of the `...CCValues` objects that belong to this CC.\n\t */\n\tpersistValues?: Record<string, any>;\n\t/**\n\t * An optional dictionary of value metadata that will be persisted in the cache.\n\t * The keys are properties of the `...CCValues` objects that belong to this CC.\n\t * The given metadata will be merged with statically defined value metadata.\n\t */\n\textendMetadata?: Record<string, any>;\n}\n\nconst basicReportMappings = [\n\tfalse,\n\t\"auto\",\n\t\"Binary Sensor\",\n] as const;\n\n/**\n * Defines how to handle a received Basic CC Report:\n * - \"auto\": map it to a different CC based on the device type, with fallback to `false`\n * - false: treat the report verbatim without mapping\n * - \"Binary Sensor\": treat it as a Binary Sensor CC Report, regardless of device type\n */\nexport type BasicReportMapping = typeof basicReportMappings[number];\n\nfunction isBasicReportMapping(v: unknown): v is BasicReportMapping {\n\treturn basicReportMappings.includes(v as any);\n}\n\nconst basicSetMappings = [\n\t\"event\",\n\t\"report\",\n\t\"auto\",\n\t\"Binary Sensor\",\n] as const;\n\n/**\n * Defines how to handle a received Basic CC Set:\n * - \"event\": emit an event for the special `event` CC value\n * - \"report\": treat it as as a Basic CC Report (default)\n * - \"auto\": map it to a different CC based on the device type, with fallback to Basic CC report\n * - \"Binary Sensor\": treat it as a Binary Sensor CC Report, regardless of device type\n */\nexport type BasicSetMapping = typeof basicSetMappings[number];\n\nfunction isBasicSetMapping(v: un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C7C;AAFS;AAIT,MAAM,mBAAmB;EACxB;EACA;EACA;EACA;;AAYD,SAAS,kBAAkB,GAAU;AACpC,SAAO,iBAAiB,SAAS,CAAQ;AAC1C;AAFS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -73,7 +73,7 @@ export declare class ConditionalDeviceConfig {
|
|
|
73
73
|
readonly isEmbedded: boolean;
|
|
74
74
|
evaluate(deviceId?: DeviceID): DeviceConfig;
|
|
75
75
|
}
|
|
76
|
-
export type DeviceConfigHashVersion = 0 | 1 | 2 | 3;
|
|
76
|
+
export type DeviceConfigHashVersion = 0 | 1 | 2 | 3 | 4;
|
|
77
77
|
export declare class DeviceConfig {
|
|
78
78
|
static from(fs: ReadFileSystemInfo & ReadFile, filename: string, isEmbedded: boolean, options: {
|
|
79
79
|
rootDir: string;
|
|
@@ -116,16 +116,21 @@ export declare class DeviceConfig {
|
|
|
116
116
|
getAssociationConfigForEndpoint(endpointIndex: number, group: number): AssociationConfig | undefined;
|
|
117
117
|
private getHashable;
|
|
118
118
|
/**
|
|
119
|
-
* Returns a hash code that can be used to check whether a device config
|
|
119
|
+
* Returns a hash code that can be used to check whether a device config
|
|
120
|
+
* has changed enough to require a re-interview.
|
|
120
121
|
*/
|
|
121
122
|
getHash(version?: DeviceConfigHashVersion): Promise<BytesView>;
|
|
122
|
-
static get maxHashVersion():
|
|
123
|
-
|
|
123
|
+
static get maxHashVersion(): 4;
|
|
124
|
+
/**
|
|
125
|
+
* Compares a cached device config hash against the current one.
|
|
126
|
+
* @param currentHash must be at the latest hash version
|
|
127
|
+
* @param cachedHash may be at any version and will be normalized for comparison
|
|
128
|
+
*/
|
|
129
|
+
static areHashesEqual(currentHash: BytesView, cachedHash: BytesView): boolean;
|
|
124
130
|
}
|
|
125
131
|
declare function parseHash(hash: BytesView): {
|
|
126
132
|
version: number;
|
|
127
133
|
hashData: BytesView;
|
|
128
134
|
} | undefined;
|
|
129
135
|
export { parseHash as parseDeviceConfigHash };
|
|
130
|
-
export declare function fixBrokenDeviceConfigHash(broken: BytesView): Promise<BytesView>;
|
|
131
136
|
//# sourceMappingURL=DeviceConfig.d.ts.map
|
|
@@ -32,7 +32,6 @@ __export(DeviceConfig_exports, {
|
|
|
32
32
|
ConditionalDeviceConfig: () => ConditionalDeviceConfig,
|
|
33
33
|
DeviceConfig: () => DeviceConfig,
|
|
34
34
|
embeddedDevicesDir: () => embeddedDevicesDir,
|
|
35
|
-
fixBrokenDeviceConfigHash: () => fixBrokenDeviceConfigHash,
|
|
36
35
|
generatePriorityDeviceIndex: () => generatePriorityDeviceIndex,
|
|
37
36
|
getDevicesPaths: () => getDevicesPaths,
|
|
38
37
|
loadDeviceIndexInternal: () => loadDeviceIndexInternal,
|
|
@@ -559,6 +558,7 @@ class DeviceConfig {
|
|
|
559
558
|
for (const param of ep.paramInformation ?? []) {
|
|
560
559
|
delete param.label;
|
|
561
560
|
delete param.description;
|
|
561
|
+
delete param.$purpose;
|
|
562
562
|
for (const opt of param.options ?? []) {
|
|
563
563
|
delete opt.label;
|
|
564
564
|
}
|
|
@@ -579,11 +579,25 @@ class DeviceConfig {
|
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
+
if (version >= 4) {
|
|
583
|
+
if (hashable.endpoints) {
|
|
584
|
+
for (const [key, ep] of Object.entries(hashable.endpoints)) {
|
|
585
|
+
delete ep.paramInformation;
|
|
586
|
+
if (Object.keys(ep).length === 0) {
|
|
587
|
+
delete hashable.endpoints[key];
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
if (Object.keys(hashable.endpoints).length === 0) {
|
|
591
|
+
delete hashable.endpoints;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
582
595
|
hashable = sortObject(hashable);
|
|
583
596
|
return hashable;
|
|
584
597
|
}
|
|
585
598
|
/**
|
|
586
|
-
* Returns a hash code that can be used to check whether a device config
|
|
599
|
+
* Returns a hash code that can be used to check whether a device config
|
|
600
|
+
* has changed enough to require a re-interview.
|
|
587
601
|
*/
|
|
588
602
|
async getHash(version = DeviceConfig.maxHashVersion) {
|
|
589
603
|
const hashable = this.getHashable(version);
|
|
@@ -605,23 +619,34 @@ class DeviceConfig {
|
|
|
605
619
|
return import_shared.Bytes.concat([prefixBytes, hash]);
|
|
606
620
|
}
|
|
607
621
|
static get maxHashVersion() {
|
|
608
|
-
return
|
|
622
|
+
return 4;
|
|
609
623
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
624
|
+
/**
|
|
625
|
+
* Compares a cached device config hash against the current one.
|
|
626
|
+
* @param currentHash must be at the latest hash version
|
|
627
|
+
* @param cachedHash may be at any version and will be normalized for comparison
|
|
628
|
+
*/
|
|
629
|
+
static areHashesEqual(currentHash, cachedHash) {
|
|
630
|
+
const current = parseHash(currentHash);
|
|
631
|
+
const cached = parseHash(cachedHash);
|
|
632
|
+
if (!current || !cached)
|
|
614
633
|
return false;
|
|
615
|
-
if (
|
|
616
|
-
return import_shared.Bytes.view(
|
|
634
|
+
if (current.version < 2 && cached.version < 2) {
|
|
635
|
+
return import_shared.Bytes.view(current.hashData).equals(cached.hashData);
|
|
617
636
|
}
|
|
618
|
-
if (
|
|
637
|
+
if (current.version < 2 || cached.version < 2) {
|
|
619
638
|
return false;
|
|
620
639
|
}
|
|
621
|
-
|
|
622
|
-
|
|
640
|
+
let hashable;
|
|
641
|
+
try {
|
|
642
|
+
hashable = JSON.parse(import_shared.Bytes.view((0, import_core.inflateSync)(import_shared.Bytes.view(cached.hashData), { dictionary: deflateDict })).toString("utf8"));
|
|
643
|
+
} catch {
|
|
644
|
+
return false;
|
|
623
645
|
}
|
|
624
|
-
|
|
646
|
+
fixBrokenV2Hashable(hashable, cached.version);
|
|
647
|
+
upgradeHashable(hashable, cached.version, current.version);
|
|
648
|
+
const normalizedData = (0, import_core.deflateSync)(import_shared.Bytes.from(JSON.stringify(hashable), "utf8"), { level: 9, dictionary: deflateDict });
|
|
649
|
+
return import_shared.Bytes.view(normalizedData).equals(current.hashData);
|
|
625
650
|
}
|
|
626
651
|
}
|
|
627
652
|
function parseHash(hash) {
|
|
@@ -654,19 +679,9 @@ function parseHash(hash) {
|
|
|
654
679
|
}
|
|
655
680
|
}
|
|
656
681
|
__name(parseHash, "parseHash");
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
return broken;
|
|
661
|
-
if (parsed.version !== 2) {
|
|
662
|
-
return broken;
|
|
663
|
-
}
|
|
664
|
-
let hashable;
|
|
665
|
-
try {
|
|
666
|
-
hashable = JSON.parse(import_shared.Bytes.view((0, import_core.inflateSync)(import_shared.Bytes.view(parsed.hashData), { dictionary: deflateDict })).toString("utf8"));
|
|
667
|
-
} catch {
|
|
668
|
-
return broken;
|
|
669
|
-
}
|
|
682
|
+
function fixBrokenV2Hashable(hashable, version) {
|
|
683
|
+
if (version !== 2)
|
|
684
|
+
return;
|
|
670
685
|
for (const ep of Object.values(hashable.endpoints ?? {})) {
|
|
671
686
|
for (const param of ep.paramInformation ?? []) {
|
|
672
687
|
if (param.hidden === false) {
|
|
@@ -674,22 +689,30 @@ async function fixBrokenDeviceConfigHash(broken) {
|
|
|
674
689
|
}
|
|
675
690
|
}
|
|
676
691
|
}
|
|
677
|
-
const buffer = import_shared.Bytes.from(JSON.stringify(hashable), "utf8");
|
|
678
|
-
const fixedHashData = (0, import_core.deflateSync)(
|
|
679
|
-
buffer,
|
|
680
|
-
// Try to make the hash as small as possible
|
|
681
|
-
{ level: 9, dictionary: deflateDict }
|
|
682
|
-
);
|
|
683
|
-
const prefixBytes = import_shared.Bytes.from(`$v2$`, "utf8");
|
|
684
|
-
return import_shared.Bytes.concat([prefixBytes, fixedHashData]);
|
|
685
692
|
}
|
|
686
|
-
__name(
|
|
693
|
+
__name(fixBrokenV2Hashable, "fixBrokenV2Hashable");
|
|
694
|
+
function upgradeHashable(hashable, fromVersion, targetVersion) {
|
|
695
|
+
if (fromVersion >= targetVersion)
|
|
696
|
+
return;
|
|
697
|
+
if (targetVersion >= 4 && fromVersion < 4 && hashable.endpoints) {
|
|
698
|
+
for (const [key, ep] of Object.entries(hashable.endpoints)) {
|
|
699
|
+
delete ep.paramInformation;
|
|
700
|
+
if (Object.keys(ep).length === 0) {
|
|
701
|
+
delete hashable.endpoints[key];
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
if (Object.keys(hashable.endpoints).length === 0) {
|
|
705
|
+
delete hashable.endpoints;
|
|
706
|
+
}
|
|
707
|
+
fromVersion = 4;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
__name(upgradeHashable, "upgradeHashable");
|
|
687
711
|
// Annotate the CommonJS export names for ESM import in node:
|
|
688
712
|
0 && (module.exports = {
|
|
689
713
|
ConditionalDeviceConfig,
|
|
690
714
|
DeviceConfig,
|
|
691
715
|
embeddedDevicesDir,
|
|
692
|
-
fixBrokenDeviceConfigHash,
|
|
693
716
|
generatePriorityDeviceIndex,
|
|
694
717
|
getDevicesPaths,
|
|
695
718
|
loadDeviceIndexInternal,
|