@zwave-js/cc 15.0.0-beta.0 → 15.0.0-beta.1
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/cc/AlarmSensorCC.d.ts +79 -161
- package/build/cjs/cc/AlarmSensorCC.js +12 -50
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +63 -199
- package/build/cjs/cc/AssociationCC.js +9 -22
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/cjs/cc/AssociationGroupInfoCC.js +11 -22
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/cjs/cc/BarrierOperatorCC.js +12 -44
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +85 -331
- package/build/cjs/cc/BasicCC.js +15 -46
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.d.ts +237 -835
- package/build/cjs/cc/BatteryCC.js +7 -84
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +34 -99
- package/build/cjs/cc/BinarySensorCC.js +9 -29
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +45 -197
- package/build/cjs/cc/BinarySwitchCC.js +6 -22
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +77 -296
- package/build/cjs/cc/CentralSceneCC.js +7 -30
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/cjs/cc/ClimateControlScheduleCC.js +5 -24
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +130 -457
- package/build/cjs/cc/ColorSwitchCC.js +23 -75
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +32 -100
- package/build/cjs/cc/ConfigurationCC.js +11 -31
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.d.ts +512 -1823
- package/build/cjs/cc/DoorLockCC.js +51 -156
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/cjs/cc/DoorLockLoggingCC.js +4 -8
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +14 -29
- package/build/cjs/cc/EnergyProductionCC.js +5 -17
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +73 -324
- package/build/cjs/cc/EntryControlCC.js +9 -36
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +5 -26
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/cjs/cc/HumidityControlModeCC.js +6 -15
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -12
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/cjs/cc/HumidityControlSetpointCC.js +10 -28
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +123 -365
- package/build/cjs/cc/IndicatorCC.js +15 -61
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +826 -2317
- package/build/cjs/cc/IrrigationCC.js +29 -233
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +31 -133
- package/build/cjs/cc/LanguageCC.js +4 -15
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +14 -64
- package/build/cjs/cc/LockCC.js +4 -12
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/cjs/cc/ManufacturerSpecificCC.js +5 -26
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.d.ts +119 -393
- package/build/cjs/cc/MeterCC.js +25 -69
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/cjs/cc/MultiChannelAssociationCC.js +10 -23
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +119 -499
- package/build/cjs/cc/MultiChannelCC.js +18 -46
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/cjs/cc/MultilevelSensorCC.js +12 -33
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/cjs/cc/MultilevelSwitchCC.js +13 -107
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +33 -135
- package/build/cjs/cc/NodeNamingCC.js +5 -16
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +262 -702
- package/build/cjs/cc/NotificationCC.js +29 -112
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +118 -524
- package/build/cjs/cc/ProtectionCC.js +15 -50
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +33 -132
- package/build/cjs/cc/SceneActivationCC.js +4 -17
- package/build/cjs/cc/SceneActivationCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +9 -21
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneControllerConfigurationCC.js +10 -22
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/cjs/cc/ScheduleEntryLockCC.js +13 -30
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +72 -261
- package/build/cjs/cc/SoundSwitchCC.js +11 -43
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +17 -33
- package/build/cjs/cc/SupervisionCC.js +4 -9
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatFanModeCC.js +8 -21
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatFanStateCC.js +4 -12
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatModeCC.js +8 -21
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatOperatingStateCC.js +4 -12
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/cjs/cc/ThermostatSetpointCC.js +10 -25
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.d.ts +12 -63
- package/build/cjs/cc/TimeParametersCC.js +4 -11
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.d.ts +311 -1066
- package/build/cjs/cc/UserCodeCC.js +33 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +289 -1003
- package/build/cjs/cc/VersionCC.js +7 -98
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +49 -201
- package/build/cjs/cc/WakeUpCC.js +6 -26
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.d.ts +126 -220
- package/build/cjs/cc/WindowCoveringCC.js +16 -128
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.d.ts +69 -329
- package/build/cjs/cc/ZWavePlusCC.js +4 -25
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +15814 -0
- package/build/cjs/cc/_CCValues.generated.js +8723 -0
- package/build/cjs/cc/_CCValues.generated.js.map +7 -0
- package/build/cjs/lib/CCValueUtils.d.ts +14 -0
- package/build/cjs/lib/CCValueUtils.js +93 -0
- package/build/cjs/lib/CCValueUtils.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +6 -105
- package/build/cjs/lib/Values.js +13 -107
- package/build/cjs/lib/Values.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +79 -161
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -39
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +63 -199
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -14
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -13
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -34
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +85 -331
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -32
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +237 -835
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -78
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +34 -99
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -16
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +45 -197
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -17
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +77 -296
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -26
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -23
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +130 -457
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -52
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +32 -100
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -15
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +512 -1823
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +9 -127
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -5
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +14 -29
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +2 -13
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +73 -324
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -28
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -23
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -10
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -9
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -19
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +123 -365
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -43
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +826 -2317
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -222
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +31 -133
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -12
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +14 -64
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -9
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +0 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -24
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +119 -393
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -49
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -14
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +119 -499
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -30
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -22
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +5 -101
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +33 -135
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -12
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +262 -702
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +3 -85
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +118 -524
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +33 -132
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -14
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -14
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -14
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +2 -17
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +72 -261
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -33
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +17 -33
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -7
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -14
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -9
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -14
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -9
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -16
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +12 -63
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +2 -8
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +311 -1066
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -60
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +289 -1003
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -92
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +49 -201
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -21
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +126 -220
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -103
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +69 -329
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -25
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +15814 -0
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -0
- package/build/esm/cc/_CCValues.generated.js +9187 -0
- package/build/esm/cc/_CCValues.generated.js.map +1 -0
- package/build/esm/lib/CCValueUtils.d.ts +14 -0
- package/build/esm/lib/CCValueUtils.d.ts.map +1 -0
- package/build/esm/lib/CCValueUtils.js +62 -0
- package/build/esm/lib/CCValueUtils.js.map +1 -0
- package/build/esm/lib/Values.d.ts +6 -105
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +7 -104
- package/build/esm/lib/Values.js.map +1 -1
- package/package.json +9 -7
|
@@ -38,7 +38,7 @@ __export(IndicatorCC_exports, {
|
|
|
38
38
|
IndicatorCCSet: () => IndicatorCCSet,
|
|
39
39
|
IndicatorCCSupportedGet: () => IndicatorCCSupportedGet,
|
|
40
40
|
IndicatorCCSupportedReport: () => IndicatorCCSupportedReport,
|
|
41
|
-
IndicatorCCValues: () => IndicatorCCValues
|
|
41
|
+
IndicatorCCValues: () => import_CCValues_generated.IndicatorCCValues
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(IndicatorCC_exports);
|
|
44
44
|
var __validateArgs = __toESM(require("./IndicatorCC._validateArgs.js"), 1);
|
|
@@ -52,6 +52,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
52
52
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
53
53
|
var import_Values = require("../lib/Values.js");
|
|
54
54
|
var import_Types = require("../lib/_Types.js");
|
|
55
|
+
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
55
56
|
var __runInitializers = function(thisArg, initializers, value) {
|
|
56
57
|
var useValue = arguments.length > 2;
|
|
57
58
|
for (var i = 0; i < initializers.length; i++) {
|
|
@@ -134,57 +135,10 @@ function indicatorObjectsToTimeout(values) {
|
|
|
134
135
|
};
|
|
135
136
|
}
|
|
136
137
|
__name(indicatorObjectsToTimeout, "indicatorObjectsToTimeout");
|
|
137
|
-
const IndicatorCCValues = Object.freeze({
|
|
138
|
-
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses.Indicator, {
|
|
139
|
-
...import_Values.V.staticProperty("supportedIndicatorIds", void 0, {
|
|
140
|
-
internal: true
|
|
141
|
-
}),
|
|
142
|
-
...import_Values.V.staticPropertyWithName("valueV1", "value", {
|
|
143
|
-
...import_safe.ValueMetadata.UInt8,
|
|
144
|
-
label: "Indicator value",
|
|
145
|
-
ccSpecific: {
|
|
146
|
-
indicatorId: 0
|
|
147
|
-
}
|
|
148
|
-
}),
|
|
149
|
-
// Convenience values for indicators that are split across multiple properties
|
|
150
|
-
...import_Values.V.staticProperty("identify", {
|
|
151
|
-
...import_safe.ValueMetadata.WriteOnlyBoolean,
|
|
152
|
-
label: "Identify",
|
|
153
|
-
states: {
|
|
154
|
-
true: "Identify"
|
|
155
|
-
}
|
|
156
|
-
}, { minVersion: 3 }),
|
|
157
|
-
...import_Values.V.staticProperty("timeout", {
|
|
158
|
-
...import_safe.ValueMetadata.String,
|
|
159
|
-
label: "Timeout"
|
|
160
|
-
}, { minVersion: 3 })
|
|
161
|
-
}),
|
|
162
|
-
...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses.Indicator, {
|
|
163
|
-
...import_Values.V.dynamicPropertyAndKeyWithName("supportedPropertyIDs", "supportedPropertyIDs", (indicatorId) => indicatorId, ({ property, propertyKey }) => property === "supportedPropertyIDs" && typeof propertyKey === "number", void 0, { internal: true }),
|
|
164
|
-
...import_Values.V.dynamicPropertyAndKeyWithName(
|
|
165
|
-
"valueV2",
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
167
|
-
(indicatorId, propertyId) => indicatorId,
|
|
168
|
-
(indicatorId, propertyId) => propertyId,
|
|
169
|
-
({ property, propertyKey }) => typeof property === "number" && typeof propertyKey === "number",
|
|
170
|
-
// The metadata is highly dependent on the indicator and property
|
|
171
|
-
// so this is just a baseline
|
|
172
|
-
(indicatorId, propertyId) => ({
|
|
173
|
-
...import_safe.ValueMetadata.Any,
|
|
174
|
-
ccSpecific: {
|
|
175
|
-
indicatorId,
|
|
176
|
-
propertyId
|
|
177
|
-
}
|
|
178
|
-
}),
|
|
179
|
-
{ minVersion: 2 }
|
|
180
|
-
),
|
|
181
|
-
...import_Values.V.dynamicPropertyWithName("indicatorDescription", (indicatorId) => indicatorId, ({ property }) => typeof property === "number", void 0, { internal: true, minVersion: 4 })
|
|
182
|
-
})
|
|
183
|
-
});
|
|
184
138
|
function getIndicatorMetadata(indicatorId, propertyId, overrideIndicatorLabel) {
|
|
185
139
|
const label = overrideIndicatorLabel || getIndicatorName(indicatorId);
|
|
186
140
|
const prop = (0, import_safe.getIndicatorProperty)(propertyId);
|
|
187
|
-
const baseMetadata = IndicatorCCValues.valueV2(indicatorId, propertyId).meta;
|
|
141
|
+
const baseMetadata = import_CCValues_generated.IndicatorCCValues.valueV2(indicatorId, propertyId).meta;
|
|
188
142
|
if (!label && !prop) {
|
|
189
143
|
return {
|
|
190
144
|
...baseMetadata,
|
|
@@ -541,7 +495,7 @@ let IndicatorCCAPI = (() => {
|
|
|
541
495
|
return IndicatorCCAPI2 = _classThis;
|
|
542
496
|
})();
|
|
543
497
|
let IndicatorCC = (() => {
|
|
544
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Indicator), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(IndicatorCCValues)];
|
|
498
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Indicator), (0, import_CommandClassDecorators.implementedVersion)(4), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.IndicatorCCValues)];
|
|
545
499
|
let _classDescriptor;
|
|
546
500
|
let _classExtraInitializers = [];
|
|
547
501
|
let _classThis;
|
|
@@ -592,7 +546,7 @@ let IndicatorCC = (() => {
|
|
|
592
546
|
supportedIndicatorIds.push(supportedResponse.indicatorId ?? curId);
|
|
593
547
|
curId = supportedResponse.nextIndicatorId;
|
|
594
548
|
} while (curId !== 0);
|
|
595
|
-
this.setValue(ctx, IndicatorCCValues.supportedIndicatorIds, supportedIndicatorIds);
|
|
549
|
+
this.setValue(ctx, import_CCValues_generated.IndicatorCCValues.supportedIndicatorIds, supportedIndicatorIds);
|
|
596
550
|
const logMessage = `supported indicator IDs: ${supportedIndicatorIds.join(", ")}`;
|
|
597
551
|
ctx.logNode(node.id, {
|
|
598
552
|
endpoint: this.endpointIndex,
|
|
@@ -630,7 +584,7 @@ let IndicatorCC = (() => {
|
|
|
630
584
|
});
|
|
631
585
|
await api.get();
|
|
632
586
|
} else {
|
|
633
|
-
const supportedIndicatorIds = this.getValue(ctx, IndicatorCCValues.supportedIndicatorIds) ?? [];
|
|
587
|
+
const supportedIndicatorIds = this.getValue(ctx, import_CCValues_generated.IndicatorCCValues.supportedIndicatorIds) ?? [];
|
|
634
588
|
for (const indicatorId of supportedIndicatorIds) {
|
|
635
589
|
ctx.logNode(node.id, {
|
|
636
590
|
endpoint: this.endpointIndex,
|
|
@@ -659,13 +613,13 @@ let IndicatorCC = (() => {
|
|
|
659
613
|
return super.translateProperty(ctx, property, propertyKey);
|
|
660
614
|
}
|
|
661
615
|
supportsV2Indicators(ctx) {
|
|
662
|
-
const supportedIndicatorIds = this.getValue(ctx, IndicatorCCValues.supportedIndicatorIds);
|
|
616
|
+
const supportedIndicatorIds = this.getValue(ctx, import_CCValues_generated.IndicatorCCValues.supportedIndicatorIds);
|
|
663
617
|
if (!supportedIndicatorIds?.length)
|
|
664
618
|
return false;
|
|
665
|
-
return supportedIndicatorIds.some((indicatorId) => !!this.getValue(ctx, IndicatorCCValues.supportedPropertyIDs(indicatorId))?.length);
|
|
619
|
+
return supportedIndicatorIds.some((indicatorId) => !!this.getValue(ctx, import_CCValues_generated.IndicatorCCValues.supportedPropertyIDs(indicatorId))?.length);
|
|
666
620
|
}
|
|
667
621
|
static getSupportedPropertyIDsCached(ctx, endpoint, indicatorId) {
|
|
668
|
-
return ctx.getValueDB(endpoint.nodeId).getValue(IndicatorCCValues.supportedPropertyIDs(indicatorId).endpoint(endpoint.index));
|
|
622
|
+
return ctx.getValueDB(endpoint.nodeId).getValue(import_CCValues_generated.IndicatorCCValues.supportedPropertyIDs(indicatorId).endpoint(endpoint.index));
|
|
669
623
|
}
|
|
670
624
|
};
|
|
671
625
|
return IndicatorCC2 = _classThis;
|
|
@@ -824,7 +778,7 @@ let IndicatorCCReport = (() => {
|
|
|
824
778
|
return false;
|
|
825
779
|
if (this.indicator0Value != void 0) {
|
|
826
780
|
if (!this.supportsV2Indicators(ctx)) {
|
|
827
|
-
const valueV1 = IndicatorCCValues.valueV1;
|
|
781
|
+
const valueV1 = import_CCValues_generated.IndicatorCCValues.valueV1;
|
|
828
782
|
this.setMetadata(ctx, valueV1);
|
|
829
783
|
this.setValue(ctx, valueV1, this.indicator0Value);
|
|
830
784
|
} else {
|
|
@@ -849,7 +803,7 @@ let IndicatorCCReport = (() => {
|
|
|
849
803
|
timeoutString += `${timeout.minutes}m`;
|
|
850
804
|
if (timeout?.seconds)
|
|
851
805
|
timeoutString += `${timeout.seconds}s`;
|
|
852
|
-
this.setValue(ctx, IndicatorCCValues.timeout, timeoutString);
|
|
806
|
+
this.setValue(ctx, import_CCValues_generated.IndicatorCCValues.timeout, timeoutString);
|
|
853
807
|
}
|
|
854
808
|
}
|
|
855
809
|
return true;
|
|
@@ -857,12 +811,12 @@ let IndicatorCCReport = (() => {
|
|
|
857
811
|
indicator0Value;
|
|
858
812
|
values;
|
|
859
813
|
setIndicatorValue(ctx, value) {
|
|
860
|
-
const overrideIndicatorLabel = isManufacturerDefinedIndicator(value.indicatorId) ? this.getValue(ctx, IndicatorCCValues.indicatorDescription(value.indicatorId)) : void 0;
|
|
814
|
+
const overrideIndicatorLabel = isManufacturerDefinedIndicator(value.indicatorId) ? this.getValue(ctx, import_CCValues_generated.IndicatorCCValues.indicatorDescription(value.indicatorId)) : void 0;
|
|
861
815
|
const metadata = getIndicatorMetadata(value.indicatorId, value.propertyId, overrideIndicatorLabel);
|
|
862
816
|
if (metadata.type === "boolean") {
|
|
863
817
|
value.value = !!value.value;
|
|
864
818
|
}
|
|
865
|
-
const valueV2 = IndicatorCCValues.valueV2(value.indicatorId, value.propertyId);
|
|
819
|
+
const valueV2 = import_CCValues_generated.IndicatorCCValues.valueV2(value.indicatorId, value.propertyId);
|
|
866
820
|
this.setMetadata(ctx, valueV2, metadata);
|
|
867
821
|
this.setValue(ctx, valueV2, value.value);
|
|
868
822
|
}
|
|
@@ -1003,7 +957,7 @@ let IndicatorCCSupportedReport = (() => {
|
|
|
1003
957
|
if (!super.persistValues(ctx))
|
|
1004
958
|
return false;
|
|
1005
959
|
if (this.indicatorId !== 0) {
|
|
1006
|
-
this.setValue(ctx, IndicatorCCValues.supportedPropertyIDs(this.indicatorId), this.supportedProperties);
|
|
960
|
+
this.setValue(ctx, import_CCValues_generated.IndicatorCCValues.supportedPropertyIDs(this.indicatorId), this.supportedProperties);
|
|
1007
961
|
}
|
|
1008
962
|
return true;
|
|
1009
963
|
}
|
|
@@ -1130,7 +1084,7 @@ let IndicatorCCDescriptionReport = (() => {
|
|
|
1130
1084
|
if (!super.persistValues(ctx))
|
|
1131
1085
|
return false;
|
|
1132
1086
|
if (this.description) {
|
|
1133
|
-
this.setValue(ctx, IndicatorCCValues.indicatorDescription(this.indicatorId), this.description);
|
|
1087
|
+
this.setValue(ctx, import_CCValues_generated.IndicatorCCValues.indicatorDescription(this.indicatorId), this.description);
|
|
1134
1088
|
}
|
|
1135
1089
|
return true;
|
|
1136
1090
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/IndicatorCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype EndpointId,\n\ttype GetValueDB,\n\tIndicator,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeBitMask,\n\tgetIndicatorProperty,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { num2hex } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { clamp, roundTo } from \"alcalzone-shared/math\";\nimport { isArray } from \"alcalzone-shared/typeguards\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { IndicatorCommand, type IndicatorTimeout } from \"../lib/_Types.js\";\n\nfunction isManufacturerDefinedIndicator(indicatorId: number): boolean {\n\treturn indicatorId >= 0x80 && indicatorId <= 0x9f;\n}\n\nconst timeoutStringRegex =\n\t/^(?:(?<hoursStr>\\d+)h)?(?:(?<minutesStr>\\d+)m)?(?:(?<secondsStr>\\d+(?:\\.\\d+)?)s)?$/i;\n\nfunction parseIndicatorTimeoutString(\n\ttext: string,\n): IndicatorTimeout | undefined {\n\tif (!text.length) return undefined;\n\t// Try to parse the numeric parts from a timeout\n\tconst match = timeoutStringRegex.exec(text);\n\tif (!match) return undefined;\n\tconst { hoursStr, minutesStr, secondsStr } = match.groups!;\n\tif (!hoursStr && !minutesStr && !secondsStr) return undefined;\n\n\tconst ret: IndicatorTimeout = {};\n\tif (hoursStr) {\n\t\tret.hours = clamp(parseInt(hoursStr, 10), 0, 255);\n\t}\n\tif (minutesStr) {\n\t\tret.minutes = clamp(parseInt(minutesStr, 10), 0, 255);\n\t}\n\tif (secondsStr) {\n\t\tret.seconds = clamp(roundTo(parseFloat(secondsStr), 2), 0, 59.99);\n\t}\n\n\treturn ret;\n}\n\nfunction indicatorObjectsToTimeout(\n\tvalues: IndicatorObject[],\n): IndicatorTimeout | undefined {\n\tconst timeoutValues = values.filter((v) =>\n\t\t[0x0a, 0x06, 0x07, 0x08].includes(v.propertyId)\n\t);\n\tif (!timeoutValues.length) return undefined;\n\n\tconst hours = (timeoutValues.find((v) => v.propertyId === 0x0a)?.value\n\t\t?? 0) as number;\n\tconst minutes = (timeoutValues.find((v) => v.propertyId === 0x06)?.value\n\t\t?? 0) as number;\n\tconst seconds = clamp(\n\t\t(timeoutValues.find((v) => v.propertyId === 0x07)\n\t\t\t?.value as number) ?? 0,\n\t\t0,\n\t\t59,\n\t)\n\t\t+ clamp(\n\t\t\t\t(timeoutValues.find((v) => v.propertyId === 0x08)\n\t\t\t\t\t?.value as number) ?? 0,\n\t\t\t\t0,\n\t\t\t\t99,\n\t\t\t)\n\t\t\t/ 100;\n\n\treturn {\n\t\thours,\n\t\tminutes,\n\t\tseconds,\n\t};\n}\n\nexport const IndicatorCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Indicator, {\n\t\t...V.staticProperty(\"supportedIndicatorIds\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"valueV1\",\n\t\t\t\"value\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"Indicator value\",\n\t\t\t\tccSpecific: {\n\t\t\t\t\tindicatorId: 0,\n\t\t\t\t},\n\t\t\t} as const,\n\t\t),\n\n\t\t// Convenience values for indicators that are split across multiple properties\n\t\t...V.staticProperty(\n\t\t\t\"identify\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.WriteOnlyBoolean,\n\t\t\t\tlabel: \"Identify\",\n\t\t\t\tstates: {\n\t\t\t\t\ttrue: \"Identify\",\n\t\t\t\t},\n\t\t\t} as const,\n\t\t\t{ minVersion: 3 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"timeout\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.String,\n\t\t\t\tlabel: \"Timeout\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 3 } as const,\n\t\t),\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses.Indicator, {\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"supportedPropertyIDs\",\n\t\t\t\"supportedPropertyIDs\",\n\t\t\t(indicatorId: number) => indicatorId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"supportedPropertyIDs\"\n\t\t\t\t&& typeof propertyKey === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"valueV2\",\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t(indicatorId: number, propertyId: number) => indicatorId,\n\t\t\t(indicatorId: number, propertyId: number) => propertyId,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\ttypeof property === \"number\" && typeof propertyKey === \"number\",\n\t\t\t// The metadata is highly dependent on the indicator and property\n\t\t\t// so this is just a baseline\n\t\t\t(indicatorId: number, propertyId: number) => ({\n\t\t\t\t...ValueMetadata.Any,\n\t\t\t\tccSpecific: {\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId,\n\t\t\t\t},\n\t\t\t}),\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.dynamicPropertyWithName(\n\t\t\t\"indicatorDescription\",\n\t\t\t(indicatorId: number) => indicatorId,\n\t\t\t({ property }) => typeof property === \"number\",\n\t\t\tundefined,\n\t\t\t{ internal: true, minVersion: 4 } as const,\n\t\t),\n\t}),\n});\n\n/**\n * Looks up the configured metadata for the given indicator and property\n */\nfunction getIndicatorMetadata(\n\tindicatorId: Indicator,\n\tpropertyId: number,\n\toverrideIndicatorLabel?: string,\n): ValueMetadata {\n\tconst label = overrideIndicatorLabel\n\t\t|| getIndicatorName(indicatorId);\n\tconst prop = getIndicatorProperty(propertyId);\n\tconst baseMetadata = IndicatorCCValues.valueV2(\n\t\tindicatorId,\n\t\tpropertyId,\n\t).meta;\n\tif (!label && !prop) {\n\t\treturn {\n\t\t\t...baseMetadata,\n\t\t\t...ValueMetadata.UInt8,\n\t\t};\n\t} else if (!prop) {\n\t\treturn {\n\t\t\t...baseMetadata,\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel,\n\t\t};\n\t} else {\n\t\tif (prop.type === \"boolean\") {\n\t\t\treturn {\n\t\t\t\t...baseMetadata,\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: `${label} - ${prop.label}`,\n\t\t\t\tdescription: prop.description,\n\t\t\t\treadable: !prop.readonly,\n\t\t\t};\n\t\t} else {\n\t\t\t// UInt8\n\t\t\treturn {\n\t\t\t\t...baseMetadata,\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: `${label} - ${prop.label}`,\n\t\t\t\tdescription: prop.description,\n\t\t\t\tmin: prop.min,\n\t\t\t\tmax: prop.max,\n\t\t\t\treadable: !prop.readonly,\n\t\t\t};\n\t\t}\n\t}\n}\n\nfunction getIndicatorName(\n\tindicatorId: number | undefined,\n): string {\n\tif (indicatorId) {\n\t\treturn `${num2hex(indicatorId)} (${\n\t\t\tindicatorId in Indicator ? Indicator[indicatorId] : \"Unknown\"\n\t\t})`;\n\t} else {\n\t\treturn \"0 (default)\";\n\t}\n}\n\nconst MAX_INDICATOR_OBJECTS = 31;\n\n@API(CommandClasses.Indicator)\nexport class IndicatorCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: IndicatorCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase IndicatorCommand.Get:\n\t\t\tcase IndicatorCommand.Report:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase IndicatorCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase IndicatorCommand.SupportedGet:\n\t\t\tcase IndicatorCommand.SupportedReport:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase IndicatorCommand.DescriptionGet:\n\t\t\tcase IndicatorCommand.DescriptionReport:\n\t\t\t\treturn this.version >= 4 && this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: IndicatorCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t\tvalue,\n\t\t) {\n\t\t\tif (property === \"value\") {\n\t\t\t\t// V1 value\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.set(value);\n\t\t\t} else if (\n\t\t\t\ttypeof property === \"number\"\n\t\t\t\t&& typeof propertyKey === \"number\"\n\t\t\t) {\n\t\t\t\tconst indicatorId = property;\n\t\t\t\tconst propertyId = propertyKey;\n\t\t\t\tconst expectedType = getIndicatorMetadata(\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId,\n\t\t\t\t).type as \"number\" | \"boolean\";\n\n\t\t\t\t// V2+ value\n\t\t\t\tif (typeof value !== expectedType) {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\texpectedType,\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.set([\n\t\t\t\t\t{\n\t\t\t\t\t\tindicatorId: property,\n\t\t\t\t\t\tpropertyId: propertyKey,\n\t\t\t\t\t\tvalue: value as any,\n\t\t\t\t\t},\n\t\t\t\t]);\n\t\t\t} else if (property === \"identify\") {\n\t\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"boolean\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.identify();\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: IndicatorCCAPI, { property }) {\n\t\t\tif (property === \"value\") return this.get();\n\t\t\tif (typeof property === \"number\") {\n\t\t\t\treturn this.get(property);\n\t\t\t}\n\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n\n\t@validateArgs()\n\tpublic async get(\n\t\tindicatorId?: number,\n\t): Promise<MaybeNotKnown<number | IndicatorObject[]>> {\n\t\tthis.assertSupportsCommand(IndicatorCommand, IndicatorCommand.Get);\n\n\t\tconst cc = new IndicatorCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<IndicatorCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (!response) return;\n\t\tif (response.values) return response.values;\n\t\treturn response.indicator0Value!;\n\t}\n\n\t@validateArgs()\n\tpublic async set(\n\t\tvalue: number | IndicatorObject[],\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(IndicatorCommand, IndicatorCommand.Set);\n\n\t\tif (this.version === 1 && typeof value !== \"number\") {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Node ${this.endpoint\n\t\t\t\t\t.nodeId as number} only supports IndicatorCC V1 which requires a single value to be set`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t} else if (\n\t\t\tthis.version >= 2\n\t\t\t&& isArray(value)\n\t\t\t&& value.length > MAX_INDICATOR_OBJECTS\n\t\t) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Only ${MAX_INDICATOR_OBJECTS} indicator values can be set at a time!`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\n\t\tconst cc = new IndicatorCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...(typeof value === \"number\" ? { value } : { values: value }),\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async sendReport(\n\t\toptions: IndicatorCCReportOptions,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.Report,\n\t\t);\n\n\t\tconst cc = new IndicatorCCReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...options,\n\t\t});\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async getSupported(indicatorId: number): Promise<\n\t\t| {\n\t\t\tindicatorId?: number;\n\t\t\tsupportedProperties: readonly number[];\n\t\t\tnextIndicatorId: number;\n\t\t}\n\t\t| undefined\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new IndicatorCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tIndicatorCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\t// Include the actual indicator ID if 0x00 was requested\n\t\t\t\t...(indicatorId === 0x00\n\t\t\t\t\t? { indicatorId: response.indicatorId }\n\t\t\t\t\t: undefined),\n\t\t\t\tsupportedProperties: response.supportedProperties,\n\t\t\t\tnextIndicatorId: response.nextIndicatorId,\n\t\t\t};\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async reportSupported(\n\t\tindicatorId: number,\n\t\tsupportedProperties: readonly number[],\n\t\tnextIndicatorId: number,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.SupportedReport,\n\t\t);\n\n\t\tconst cc = new IndicatorCCSupportedReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t\tsupportedProperties,\n\t\t\tnextIndicatorId,\n\t\t});\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async reportDescription(\n\t\tindicatorId: number,\n\t\tdescription: string,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.DescriptionReport,\n\t\t);\n\n\t\tconst cc = new IndicatorCCDescriptionReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t\tdescription,\n\t\t});\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Instructs the node to identify itself. Available starting with V3 of this CC.\n\t */\n\tpublic async identify(): Promise<SupervisionResult | undefined> {\n\t\tif (this.version < 3) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`The identify command is only supported in Indicator CC version 3 and above`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\t\treturn this.set([\n\t\t\t{\n\t\t\t\tindicatorId: 0x50,\n\t\t\t\tpropertyId: 0x03,\n\t\t\t\tvalue: 0x08,\n\t\t\t},\n\t\t\t{\n\t\t\t\tindicatorId: 0x50,\n\t\t\t\tpropertyId: 0x04,\n\t\t\t\tvalue: 0x03,\n\t\t\t},\n\t\t\t{\n\t\t\t\tindicatorId: 0x50,\n\t\t\t\tpropertyId: 0x05,\n\t\t\t\tvalue: 0x06,\n\t\t\t},\n\t\t]);\n\t}\n\n\t/**\n\t * Set a timeout for a given indicator ID after which the indicator will be turned off.\n\t * @param timeout The timeout in one of the supported forms:\n\t * \t- a timeout string in the form `12h18m17.59s`. All parts (hours, minutes, seconds, hundredths) are optional, but must be specified in this order. An empty string will be treated like `undefined`.\n\t * \t- an object specifying the timeout parts. An empty object will be treated like `undefined`.\n\t * \t- `undefined` to disable the timeout.\n\t */\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\tindicatorId: number,\n\t\ttimeout: IndicatorTimeout | string | undefined,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertPhysicalEndpoint(this.endpoint);\n\n\t\tif (this.version < 3) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`The setTimeout command is only supported in Indicator CC version 3 and above`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tif (typeof timeout === \"string\") {\n\t\t\tif (timeout === \"\") {\n\t\t\t\ttimeout = undefined;\n\t\t\t} else {\n\t\t\t\tconst parsed = parseIndicatorTimeoutString(timeout);\n\t\t\t\tif (!parsed) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The timeout string \"${timeout}\" is not valid`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\ttimeout = parsed;\n\t\t\t}\n\t\t}\n\n\t\tconst supportedPropertyIDs = IndicatorCC.getSupportedPropertyIDsCached(\n\t\t\tthis.host,\n\t\t\tthis.endpoint,\n\t\t\tindicatorId,\n\t\t);\n\n\t\tconst objects: IndicatorObject[] = [];\n\t\tif (timeout) {\n\t\t\tconst hours = timeout.hours ?? 0;\n\t\t\tconst minutes = timeout.minutes ?? 0;\n\t\t\tconst seconds = Math.floor(timeout.seconds ?? 0);\n\t\t\tconst hundredths = Math.round(((timeout.seconds ?? 0) % 1) * 100);\n\n\t\t\tif (hours) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x0a)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in hours`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x0a,\n\t\t\t\t\tvalue: hours,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (minutes) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x06)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in minutes`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x06,\n\t\t\t\t\tvalue: minutes,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (seconds) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x07)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in seconds`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x07,\n\t\t\t\t\tvalue: seconds,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (hundredths) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x08)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in 1/100 seconds`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x08,\n\t\t\t\t\tvalue: hundredths,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (!objects.length) {\n\t\t\tobjects.push(\n\t\t\t\t...(supportedPropertyIDs ?? []).map((p) => ({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: p,\n\t\t\t\t\tvalue: 0,\n\t\t\t\t})),\n\t\t\t);\n\t\t}\n\n\t\treturn this.set(objects);\n\t}\n\n\t/**\n\t * Returns the timeout after which the given indicator will be turned off.\n\t */\n\t@validateArgs()\n\tpublic async getTimeout(\n\t\tindicatorId: number,\n\t): Promise<MaybeNotKnown<IndicatorTimeout>> {\n\t\tconst values = await this.get(indicatorId);\n\t\tif (!isArray(values)) return;\n\n\t\treturn indicatorObjectsToTimeout(values);\n\t}\n\n\t@validateArgs()\n\tpublic async getDescription(\n\t\tindicatorId: number,\n\t): Promise<MaybeNotKnown<string>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.DescriptionGet,\n\t\t);\n\n\t\tconst cc = new IndicatorCCDescriptionGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tIndicatorCCDescriptionReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.description;\n\t}\n}\n\n@commandClass(CommandClasses.Indicator)\n@implementedVersion(4)\n@ccValues(IndicatorCCValues)\nexport class IndicatorCC extends CommandClass {\n\tdeclare ccCommand: IndicatorCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Indicator,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tif (api.version > 1) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"scanning supported indicator IDs...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\t// Query ID 0 to get the first supported ID\n\t\t\tlet curId = 0x00;\n\t\t\tconst supportedIndicatorIds: number[] = [];\n\t\t\tdo {\n\t\t\t\tconst supportedResponse = await api.getSupported(curId);\n\t\t\t\tif (!supportedResponse) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Time out while scanning supported indicator IDs, skipping interview...\",\n\t\t\t\t\t\tlevel: \"warn\",\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsupportedIndicatorIds.push(\n\t\t\t\t\tsupportedResponse.indicatorId ?? curId,\n\t\t\t\t);\n\t\t\t\tcurId = supportedResponse.nextIndicatorId;\n\t\t\t} while (curId !== 0x00);\n\n\t\t\t// The IDs are not stored by the report CCs so store them here once we have all of them\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.supportedIndicatorIds,\n\t\t\t\tsupportedIndicatorIds,\n\t\t\t);\n\t\t\tconst logMessage = `supported indicator IDs: ${\n\t\t\t\tsupportedIndicatorIds.join(\n\t\t\t\t\t\", \",\n\t\t\t\t)\n\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\n\t\t\tif (api.version >= 4) {\n\t\t\t\tconst manufacturerDefinedIndicatorIds = supportedIndicatorIds\n\t\t\t\t\t.filter((id) => isManufacturerDefinedIndicator(id));\n\t\t\t\tif (manufacturerDefinedIndicatorIds.length > 0) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"retrieving description for manufacturer-defined indicator IDs...\",\n\t\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (const id of manufacturerDefinedIndicatorIds) {\n\t\t\t\t\t\tawait api.getDescription(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Query current values\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Indicator,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tif (api.version === 1) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"requesting current indicator value...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait api.get();\n\t\t} else {\n\t\t\tconst supportedIndicatorIds: number[] = this.getValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.supportedIndicatorIds,\n\t\t\t) ?? [];\n\t\t\tfor (const indicatorId of supportedIndicatorIds) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `requesting current indicator value (id = ${\n\t\t\t\t\t\tnum2hex(\n\t\t\t\t\t\t\tindicatorId,\n\t\t\t\t\t\t)\n\t\t\t\t\t})...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tawait api.get(indicatorId);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic translatePropertyKey(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey: string | number,\n\t): string | undefined {\n\t\tif (property === \"value\") {\n\t\t\t// CC version 1 only has a single value that doesn't need to be translated\n\t\t\treturn undefined;\n\t\t} else if (\n\t\t\ttypeof property === \"number\"\n\t\t\t&& typeof propertyKey === \"number\"\n\t\t) {\n\t\t\t// The indicator property is our property key\n\t\t\tconst prop = getIndicatorProperty(propertyKey);\n\t\t\tif (prop) return prop.label;\n\t\t}\n\t\treturn super.translatePropertyKey(ctx, property, propertyKey);\n\t}\n\n\tpublic translateProperty(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey?: string | number,\n\t): string {\n\t\tif (typeof property === \"number\" && typeof propertyKey === \"number\") {\n\t\t\t// The indicator corresponds to our property\n\t\t\tif (property in Indicator) return Indicator[property];\n\t\t}\n\t\treturn super.translateProperty(ctx, property, propertyKey);\n\t}\n\n\tprotected supportsV2Indicators(ctx: GetValueDB): boolean {\n\t\t// First test if there are any indicator ids defined\n\t\tconst supportedIndicatorIds = this.getValue<number[]>(\n\t\t\tctx,\n\t\t\tIndicatorCCValues.supportedIndicatorIds,\n\t\t);\n\t\tif (!supportedIndicatorIds?.length) return false;\n\t\t// Then test if there are any property ids defined\n\t\treturn supportedIndicatorIds.some(\n\t\t\t(indicatorId) =>\n\t\t\t\t!!this.getValue<number[]>(\n\t\t\t\t\tctx,\n\t\t\t\t\tIndicatorCCValues.supportedPropertyIDs(indicatorId),\n\t\t\t\t)?.length,\n\t\t);\n\t}\n\n\tpublic static getSupportedPropertyIDsCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t\tindicatorId: number,\n\t): MaybeNotKnown<number[]> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tIndicatorCCValues.supportedPropertyIDs(indicatorId).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorObject {\n\tindicatorId: number;\n\tpropertyId: number;\n\tvalue: number | boolean;\n}\n\n// @publicAPI\nexport type IndicatorCCSetOptions =\n\t| {\n\t\tvalue: number;\n\t}\n\t| {\n\t\tvalues: IndicatorObject[];\n\t};\n\n@CCCommand(IndicatorCommand.Set)\n@useSupervision()\nexport class IndicatorCCSet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (\"value\" in options) {\n\t\t\tthis.indicator0Value = options.value;\n\t\t} else {\n\t\t\tthis.values = options.values;\n\t\t}\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): IndicatorCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\n\t\tconst objCount = raw.payload.length >= 2\n\t\t\t? raw.payload[1] & 0b11111\n\t\t\t: 0;\n\n\t\tif (objCount === 0) {\n\t\t\tconst indicator0Value = raw.payload[0];\n\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tvalue: indicator0Value,\n\t\t\t});\n\t\t}\n\n\t\tvalidatePayload(raw.payload.length >= 2 + 3 * objCount);\n\n\t\tconst values: IndicatorObject[] = [];\n\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\tconst offset = 2 + 3 * i;\n\t\t\tconst value: IndicatorObject = {\n\t\t\t\tindicatorId: raw.payload[offset],\n\t\t\t\tpropertyId: raw.payload[offset + 1],\n\t\t\t\tvalue: raw.payload[offset + 2],\n\t\t\t};\n\t\t\tvalues.push(value);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tvalues,\n\t\t});\n\t}\n\n\tpublic indicator0Value: number | undefined;\n\tpublic values: IndicatorObject[] | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (this.values != undefined) {\n\t\t\t// V2+\n\t\t\tthis.payload = Bytes.alloc(2 + 3 * this.values.length, 0);\n\t\t\t// Byte 0 is the legacy value\n\t\t\tconst objCount = this.values.length & MAX_INDICATOR_OBJECTS;\n\t\t\tthis.payload[1] = objCount;\n\t\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\t\tconst offset = 2 + 3 * i;\n\t\t\t\tthis.payload[offset] = this.values[i].indicatorId;\n\t\t\t\tthis.payload[offset + 1] = this.values[i].propertyId;\n\t\t\t\tconst value = this.values[i].value;\n\t\t\t\tthis.payload[offset + 2] = value === true\n\t\t\t\t\t? 0xff\n\t\t\t\t\t: value === false\n\t\t\t\t\t? 0x00\n\t\t\t\t\t: value;\n\t\t\t}\n\t\t} else {\n\t\t\t// V1\n\t\t\tthis.payload = Bytes.from([this.indicator0Value ?? 0]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {};\n\t\tif (this.indicator0Value != undefined) {\n\t\t\tmessage[\"indicator 0 value\"] = this.indicator0Value;\n\t\t}\n\t\tif (this.values != undefined) {\n\t\t\tmessage.values = `${\n\t\t\t\tthis.values\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(v) => `\n\u00B7 indicatorId: ${v.indicatorId}\n propertyId: ${v.propertyId}\n value: ${v.value}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport type IndicatorCCReportOptions =\n\t| {\n\t\tvalue: number;\n\t}\n\t| {\n\t\tvalues: IndicatorObject[];\n\t};\n\n@CCCommand(IndicatorCommand.Report)\nexport class IndicatorCCReport extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tif (\"value\" in options) {\n\t\t\tthis.indicator0Value = options.value;\n\t\t} else if (\"values\" in options) {\n\t\t\tif (options.values.length > MAX_INDICATOR_OBJECTS) {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`Only ${MAX_INDICATOR_OBJECTS} indicator values can be set at a time!`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.values = options.values;\n\t\t}\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): IndicatorCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\n\t\tconst objCount = raw.payload.length >= 2\n\t\t\t? raw.payload[1] & 0b11111\n\t\t\t: 0;\n\n\t\tif (objCount === 0) {\n\t\t\tconst indicator0Value = raw.payload[0];\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tvalue: indicator0Value,\n\t\t\t});\n\t\t}\n\n\t\tvalidatePayload(raw.payload.length >= 2 + 3 * objCount);\n\n\t\tconst values: IndicatorObject[] = [];\n\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\tconst offset = 2 + 3 * i;\n\t\t\tconst value: IndicatorObject = {\n\t\t\t\tindicatorId: raw.payload[offset],\n\t\t\t\tpropertyId: raw.payload[offset + 1],\n\t\t\t\tvalue: raw.payload[offset + 2],\n\t\t\t};\n\t\t\tvalues.push(value);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tvalues,\n\t\t});\n\n\t\t// TODO: Think if we want this:\n\n\t\t// // If not all Property IDs are included in the command for the actual Indicator ID,\n\t\t// // a controlling node MUST assume non-specified Property IDs values to be 0x00.\n\t\t// const indicatorId = this.values[0].indicatorId;\n\t\t// const supportedIndicatorProperties =\n\t\t// \tvalueDB.getValue<number[]>(\n\t\t// \t\tgetSupportedPropertyIDsValueID(\n\t\t// \t\t\tthis.endpointIndex,\n\t\t// \t\t\tindicatorId,\n\t\t// \t\t),\n\t\t// \t) ?? [];\n\t\t// // Find out which ones are missing\n\t\t// const missingIndicatorProperties = supportedIndicatorProperties.filter(\n\t\t// \tprop =>\n\t\t// \t\t!this.values!.find(({ propertyId }) => prop === propertyId),\n\t\t// );\n\t\t// // And assume they are 0 (false)\n\t\t// for (const missing of missingIndicatorProperties) {\n\t\t// \tthis.setIndicatorValue({\n\t\t// \t\tindicatorId,\n\t\t// \t\tpropertyId: missing,\n\t\t// \t\tvalue: 0,\n\t\t// \t});\n\t\t// }\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tif (this.indicator0Value != undefined) {\n\t\t\tif (!this.supportsV2Indicators(ctx)) {\n\t\t\t\t// Publish the value\n\t\t\t\tconst valueV1 = IndicatorCCValues.valueV1;\n\t\t\t\tthis.setMetadata(ctx, valueV1);\n\t\t\t\tthis.setValue(ctx, valueV1, this.indicator0Value);\n\t\t\t} else {\n\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t// Don't!\n\t\t\t\t\tctx.logNode(this.nodeId, {\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`ignoring V1 indicator report because the node supports V2 indicators`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.values) {\n\t\t\t// Store the simple values first\n\t\t\tfor (const value of this.values) {\n\t\t\t\tthis.setIndicatorValue(ctx, value);\n\t\t\t}\n\n\t\t\t// Then group values into the convenience properties\n\n\t\t\t// ... timeout\n\t\t\tconst timeout = indicatorObjectsToTimeout(this.values);\n\t\t\tif (timeout) {\n\t\t\t\tlet timeoutString = \"\";\n\t\t\t\tif (timeout?.hours) timeoutString += `${timeout.hours}h`;\n\t\t\t\tif (timeout?.minutes) timeoutString += `${timeout.minutes}m`;\n\t\t\t\tif (timeout?.seconds) timeoutString += `${timeout.seconds}s`;\n\n\t\t\t\tthis.setValue(\n\t\t\t\t\tctx,\n\t\t\t\t\tIndicatorCCValues.timeout,\n\t\t\t\t\ttimeoutString,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly indicator0Value: number | undefined;\n\tpublic readonly values: IndicatorObject[] | undefined;\n\n\tprivate setIndicatorValue(\n\t\tctx: GetValueDB,\n\t\tvalue: IndicatorObject,\n\t): void {\n\t\t// Manufacturer-defined indicators may need a custom label\n\t\tconst overrideIndicatorLabel = isManufacturerDefinedIndicator(\n\t\t\t\tvalue.indicatorId,\n\t\t\t)\n\t\t\t? this.getValue<string>(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.indicatorDescription(value.indicatorId),\n\t\t\t)\n\t\t\t: undefined;\n\n\t\tconst metadata = getIndicatorMetadata(\n\t\t\tvalue.indicatorId,\n\t\t\tvalue.propertyId,\n\t\t\toverrideIndicatorLabel,\n\t\t);\n\t\t// Some values need to be converted\n\t\tif (metadata.type === \"boolean\") {\n\t\t\tvalue.value = !!value.value;\n\t\t}\n\n\t\t// Publish the value\n\t\tconst valueV2 = IndicatorCCValues.valueV2(\n\t\t\tvalue.indicatorId,\n\t\t\tvalue.propertyId,\n\t\t);\n\t\tthis.setMetadata(ctx, valueV2, metadata);\n\t\tthis.setValue(ctx, valueV2, value.value);\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (this.values != undefined) {\n\t\t\t// V2+\n\t\t\tthis.payload = Bytes.alloc(2 + 3 * this.values.length, 0);\n\t\t\t// Byte 0 is the legacy value\n\t\t\tconst objCount = this.values.length & MAX_INDICATOR_OBJECTS;\n\t\t\tthis.payload[1] = objCount;\n\t\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\t\tconst offset = 2 + 3 * i;\n\t\t\t\tthis.payload[offset] = this.values[i].indicatorId;\n\t\t\t\tthis.payload[offset + 1] = this.values[i].propertyId;\n\t\t\t\tconst value = this.values[i].value;\n\t\t\t\tthis.payload[offset + 2] = value === true\n\t\t\t\t\t? 0xff\n\t\t\t\t\t: value === false\n\t\t\t\t\t? 0x00\n\t\t\t\t\t: value;\n\t\t\t}\n\t\t} else {\n\t\t\t// V1\n\t\t\tthis.payload = Bytes.from([this.indicator0Value ?? 0]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {};\n\t\tif (this.indicator0Value != undefined) {\n\t\t\tmessage[\"indicator 0 value\"] = this.indicator0Value;\n\t\t}\n\t\tif (this.values != undefined) {\n\t\t\tmessage.values = `${\n\t\t\t\tthis.values\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(v) => `\n\u00B7 indicatorId: ${v.indicatorId}\n propertyId: ${v.propertyId}\n value: ${v.value}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCGetOptions {\n\tindicatorId?: number;\n}\n\n@CCCommand(IndicatorCommand.Get)\n@expectedCCResponse(IndicatorCCReport)\nexport class IndicatorCCGet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.indicatorId = options.indicatorId;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): IndicatorCCGet {\n\t\tlet indicatorId: number | undefined;\n\n\t\tif (raw.payload.length > 0) {\n\t\t\tindicatorId = raw.payload[0];\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t});\n\t}\n\n\tpublic indicatorId: number | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (this.indicatorId != undefined) {\n\t\t\tthis.payload = Bytes.from([this.indicatorId]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tindicator: getIndicatorName(this.indicatorId),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCSupportedReportOptions {\n\tindicatorId: number;\n\tnextIndicatorId: number;\n\tsupportedProperties: readonly number[];\n}\n\n@CCCommand(IndicatorCommand.SupportedReport)\nexport class IndicatorCCSupportedReport extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.indicatorId = options.indicatorId;\n\t\tthis.nextIndicatorId = options.nextIndicatorId;\n\t\tthis.supportedProperties = options.supportedProperties;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst indicatorId = raw.payload[0];\n\t\tconst nextIndicatorId = raw.payload[1];\n\t\tconst bitMaskLength = raw.payload[2] & 0b11111;\n\t\tlet supportedProperties: readonly number[];\n\n\t\tif (bitMaskLength === 0) {\n\t\t\tsupportedProperties = [];\n\t\t} else {\n\t\t\tvalidatePayload(raw.payload.length >= 3 + bitMaskLength);\n\t\t\t// The bit mask starts at 0, but bit 0 is not used\n\t\t\tsupportedProperties = parseBitMask(\n\t\t\t\traw.payload.subarray(3, 3 + bitMaskLength),\n\t\t\t\t0,\n\t\t\t).filter((v) => v !== 0);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t\tnextIndicatorId,\n\t\t\tsupportedProperties,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tif (this.indicatorId !== 0x00) {\n\t\t\t// Remember which property IDs are supported\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.supportedPropertyIDs(this.indicatorId),\n\t\t\t\tthis.supportedProperties,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic readonly indicatorId: number;\n\tpublic readonly nextIndicatorId: number;\n\tpublic readonly supportedProperties: readonly number[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst bitmask = this.supportedProperties.length > 0\n\t\t\t? encodeBitMask(this.supportedProperties, undefined, 0)\n\t\t\t: new Bytes();\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([\n\t\t\t\tthis.indicatorId,\n\t\t\t\tthis.nextIndicatorId,\n\t\t\t\tbitmask.length,\n\t\t\t]),\n\t\t\tbitmask,\n\t\t]);\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tindicator: getIndicatorName(this.indicatorId),\n\t\t\t\t\"supported properties\": `${\n\t\t\t\t\tthis.supportedProperties\n\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t(id) =>\n\t\t\t\t\t\t\t\tgetIndicatorProperty(id)?.label\n\t\t\t\t\t\t\t\t\t?? `Unknown (${num2hex(id)})`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join(\", \")\n\t\t\t\t}`,\n\t\t\t\t\"next indicator\": getIndicatorName(this.nextIndicatorId),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCSupportedGetOptions {\n\tindicatorId: number;\n}\n\nfunction testResponseForIndicatorSupportedGet(\n\tsent: IndicatorCCSupportedGet,\n\treceived: IndicatorCCSupportedReport,\n) {\n\treturn sent.indicatorId === 0 || received.indicatorId === sent.indicatorId;\n}\n\n@CCCommand(IndicatorCommand.SupportedGet)\n@expectedCCResponse(\n\tIndicatorCCSupportedReport,\n\ttestResponseForIndicatorSupportedGet,\n)\nexport class IndicatorCCSupportedGet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCSupportedGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.indicatorId = options.indicatorId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCSupportedGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst indicatorId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t});\n\t}\n\n\tpublic indicatorId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.indicatorId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tindicator: getIndicatorName(this.indicatorId),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCDescriptionReportOptions {\n\tindicatorId: number;\n\tdescription: string;\n}\n\n@CCCommand(IndicatorCommand.DescriptionReport)\nexport class IndicatorCCDescriptionReport extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCDescriptionReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.indicatorId = options.indicatorId;\n\t\tthis.description = options.description;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCDescriptionReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst indicatorId = raw.payload[0];\n\t\tconst descrptionLength = raw.payload[1];\n\t\tvalidatePayload(raw.payload.length >= 2 + descrptionLength);\n\t\tconst description: string = raw.payload\n\t\t\t.subarray(2, 2 + descrptionLength)\n\t\t\t.toString(\"utf8\");\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t\tdescription,\n\t\t});\n\t}\n\n\tpublic indicatorId: number;\n\tpublic description: string;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tif (this.description) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.indicatorDescription(this.indicatorId),\n\t\t\t\tthis.description,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst description = Bytes.from(this.description, \"utf8\");\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.indicatorId, description.length]),\n\t\t\tdescription,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"indicator ID\": this.indicatorId,\n\t\t\t\tdescription: this.description || \"(none)\",\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCDescriptionGetOptions {\n\tindicatorId: number;\n}\n\nfunction testResponseForIndicatorDescriptionGet(\n\tsent: IndicatorCCDescriptionGet,\n\treceived: IndicatorCCDescriptionReport,\n) {\n\treturn received.indicatorId === sent.indicatorId;\n}\n\n@CCCommand(IndicatorCommand.DescriptionGet)\n@expectedCCResponse(\n\tIndicatorCCDescriptionReport,\n\ttestResponseForIndicatorDescriptionGet,\n)\nexport class IndicatorCCDescriptionGet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCDescriptionGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.indicatorId = options.indicatorId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCDescriptionGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst indicatorId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t});\n\t}\n\n\tpublic indicatorId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.indicatorId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"indicator ID\": this.indicatorId,\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAkBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwB;AAExB,kBAA+B;AAC/B,wBAAwB;AACxB,iBAQO;AACP,0BAMO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,SAAS,+BAA+B,aAAmB;AAC1D,SAAO,eAAe,OAAQ,eAAe;AAC9C;AAFS;AAIT,MAAM,qBACL;AAED,SAAS,4BACR,MAAY;AAEZ,MAAI,CAAC,KAAK;AAAQ,WAAO;AAEzB,QAAM,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AAK;AACtC;AALS;IAYI,6BAAyB,MAAA;8BALrC,yCAAU,8BAAiB,cAAc,OACzC,kDACA,8BACA,sCAAsC,CACtC;;;;oBAC8C;iDAAA,YAAW;WAAA;;;;;;;;AAA1D,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAsD;AAEtD,YAAM,OAAO;AACb,WAAK,cAAc,QAAQ;IAC5B;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,cAAc,IAAI,QAAQ,CAAC;AAEjC,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,WAAW,CAAC;AAC5C,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,gBAAgB,KAAK;;;IAGxB;;;;",
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype EndpointId,\n\ttype GetValueDB,\n\tIndicator,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeBitMask,\n\tgetIndicatorProperty,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { num2hex } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { clamp, roundTo } from \"alcalzone-shared/math\";\nimport { isArray } from \"alcalzone-shared/typeguards\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { IndicatorCommand, type IndicatorTimeout } from \"../lib/_Types.js\";\n\nfunction isManufacturerDefinedIndicator(indicatorId: number): boolean {\n\treturn indicatorId >= 0x80 && indicatorId <= 0x9f;\n}\n\nconst timeoutStringRegex =\n\t/^(?:(?<hoursStr>\\d+)h)?(?:(?<minutesStr>\\d+)m)?(?:(?<secondsStr>\\d+(?:\\.\\d+)?)s)?$/i;\n\nfunction parseIndicatorTimeoutString(\n\ttext: string,\n): IndicatorTimeout | undefined {\n\tif (!text.length) return undefined;\n\t// Try to parse the numeric parts from a timeout\n\tconst match = timeoutStringRegex.exec(text);\n\tif (!match) return undefined;\n\tconst { hoursStr, minutesStr, secondsStr } = match.groups!;\n\tif (!hoursStr && !minutesStr && !secondsStr) return undefined;\n\n\tconst ret: IndicatorTimeout = {};\n\tif (hoursStr) {\n\t\tret.hours = clamp(parseInt(hoursStr, 10), 0, 255);\n\t}\n\tif (minutesStr) {\n\t\tret.minutes = clamp(parseInt(minutesStr, 10), 0, 255);\n\t}\n\tif (secondsStr) {\n\t\tret.seconds = clamp(roundTo(parseFloat(secondsStr), 2), 0, 59.99);\n\t}\n\n\treturn ret;\n}\n\nfunction indicatorObjectsToTimeout(\n\tvalues: IndicatorObject[],\n): IndicatorTimeout | undefined {\n\tconst timeoutValues = values.filter((v) =>\n\t\t[0x0a, 0x06, 0x07, 0x08].includes(v.propertyId)\n\t);\n\tif (!timeoutValues.length) return undefined;\n\n\tconst hours = (timeoutValues.find((v) => v.propertyId === 0x0a)?.value\n\t\t?? 0) as number;\n\tconst minutes = (timeoutValues.find((v) => v.propertyId === 0x06)?.value\n\t\t?? 0) as number;\n\tconst seconds = clamp(\n\t\t(timeoutValues.find((v) => v.propertyId === 0x07)\n\t\t\t?.value as number) ?? 0,\n\t\t0,\n\t\t59,\n\t)\n\t\t+ clamp(\n\t\t\t\t(timeoutValues.find((v) => v.propertyId === 0x08)\n\t\t\t\t\t?.value as number) ?? 0,\n\t\t\t\t0,\n\t\t\t\t99,\n\t\t\t)\n\t\t\t/ 100;\n\n\treturn {\n\t\thours,\n\t\tminutes,\n\t\tseconds,\n\t};\n}\n\nexport const IndicatorCCValues = V.defineCCValues(CommandClasses.Indicator, {\n\t...V.staticProperty(\"supportedIndicatorIds\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticPropertyWithName(\n\t\t\"valueV1\",\n\t\t\"value\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"Indicator value\",\n\t\t\tccSpecific: {\n\t\t\t\tindicatorId: 0,\n\t\t\t},\n\t\t} as const,\n\t),\n\t...V.staticProperty(\n\t\t\"identify\",\n\t\t{\n\t\t\t...ValueMetadata.WriteOnlyBoolean,\n\t\t\tlabel: \"Identify\",\n\t\t\tstates: {\n\t\t\t\ttrue: \"Identify\",\n\t\t\t},\n\t\t} as const,\n\t\t{ minVersion: 3 } as const,\n\t),\n\t...V.staticProperty(\n\t\t\"timeout\",\n\t\t{\n\t\t\t...ValueMetadata.String,\n\t\t\tlabel: \"Timeout\",\n\t\t} as const,\n\t\t{ minVersion: 3 } as const,\n\t),\n\t...V.dynamicPropertyAndKeyWithName(\n\t\t\"supportedPropertyIDs\",\n\t\t\"supportedPropertyIDs\",\n\t\t(indicatorId: number) => indicatorId,\n\t\t({ property, propertyKey }) =>\n\t\t\tproperty === \"supportedPropertyIDs\"\n\t\t\t&& typeof propertyKey === \"number\",\n\t\tundefined,\n\t\t{ internal: true },\n\t),\n\t...V.dynamicPropertyAndKeyWithName(\n\t\t\"valueV2\",\n\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t(indicatorId: number, propertyId: number) => indicatorId,\n\t\t(indicatorId: number, propertyId: number) => propertyId,\n\t\t({ property, propertyKey }) =>\n\t\t\ttypeof property === \"number\" && typeof propertyKey === \"number\",\n\t\t// The metadata is highly dependent on the indicator and property\n\t\t// so this is just a baseline\n\t\t(indicatorId: number, propertyId: number) => ({\n\t\t\t...ValueMetadata.Any,\n\t\t\tccSpecific: {\n\t\t\t\tindicatorId,\n\t\t\t\tpropertyId,\n\t\t\t},\n\t\t}),\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.dynamicPropertyWithName(\n\t\t\"indicatorDescription\",\n\t\t(indicatorId: number) => indicatorId,\n\t\t({ property }) => typeof property === \"number\",\n\t\tundefined,\n\t\t{ internal: true, minVersion: 4 } as const,\n\t),\n});\n\n/**\n * Looks up the configured metadata for the given indicator and property\n */\nfunction getIndicatorMetadata(\n\tindicatorId: Indicator,\n\tpropertyId: number,\n\toverrideIndicatorLabel?: string,\n): ValueMetadata {\n\tconst label = overrideIndicatorLabel\n\t\t|| getIndicatorName(indicatorId);\n\tconst prop = getIndicatorProperty(propertyId);\n\tconst baseMetadata = IndicatorCCValues.valueV2(\n\t\tindicatorId,\n\t\tpropertyId,\n\t).meta;\n\tif (!label && !prop) {\n\t\treturn {\n\t\t\t...baseMetadata,\n\t\t\t...ValueMetadata.UInt8,\n\t\t};\n\t} else if (!prop) {\n\t\treturn {\n\t\t\t...baseMetadata,\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel,\n\t\t};\n\t} else {\n\t\tif (prop.type === \"boolean\") {\n\t\t\treturn {\n\t\t\t\t...baseMetadata,\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: `${label} - ${prop.label}`,\n\t\t\t\tdescription: prop.description,\n\t\t\t\treadable: !prop.readonly,\n\t\t\t};\n\t\t} else {\n\t\t\t// UInt8\n\t\t\treturn {\n\t\t\t\t...baseMetadata,\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: `${label} - ${prop.label}`,\n\t\t\t\tdescription: prop.description,\n\t\t\t\tmin: prop.min,\n\t\t\t\tmax: prop.max,\n\t\t\t\treadable: !prop.readonly,\n\t\t\t};\n\t\t}\n\t}\n}\n\nfunction getIndicatorName(\n\tindicatorId: number | undefined,\n): string {\n\tif (indicatorId) {\n\t\treturn `${num2hex(indicatorId)} (${\n\t\t\tindicatorId in Indicator ? Indicator[indicatorId] : \"Unknown\"\n\t\t})`;\n\t} else {\n\t\treturn \"0 (default)\";\n\t}\n}\n\nconst MAX_INDICATOR_OBJECTS = 31;\n\n@API(CommandClasses.Indicator)\nexport class IndicatorCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: IndicatorCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase IndicatorCommand.Get:\n\t\t\tcase IndicatorCommand.Report:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase IndicatorCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase IndicatorCommand.SupportedGet:\n\t\t\tcase IndicatorCommand.SupportedReport:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase IndicatorCommand.DescriptionGet:\n\t\t\tcase IndicatorCommand.DescriptionReport:\n\t\t\t\treturn this.version >= 4 && this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: IndicatorCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t\tvalue,\n\t\t) {\n\t\t\tif (property === \"value\") {\n\t\t\t\t// V1 value\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.set(value);\n\t\t\t} else if (\n\t\t\t\ttypeof property === \"number\"\n\t\t\t\t&& typeof propertyKey === \"number\"\n\t\t\t) {\n\t\t\t\tconst indicatorId = property;\n\t\t\t\tconst propertyId = propertyKey;\n\t\t\t\tconst expectedType = getIndicatorMetadata(\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId,\n\t\t\t\t).type as \"number\" | \"boolean\";\n\n\t\t\t\t// V2+ value\n\t\t\t\tif (typeof value !== expectedType) {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\texpectedType,\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.set([\n\t\t\t\t\t{\n\t\t\t\t\t\tindicatorId: property,\n\t\t\t\t\t\tpropertyId: propertyKey,\n\t\t\t\t\t\tvalue: value as any,\n\t\t\t\t\t},\n\t\t\t\t]);\n\t\t\t} else if (property === \"identify\") {\n\t\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"boolean\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.identify();\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: IndicatorCCAPI, { property }) {\n\t\t\tif (property === \"value\") return this.get();\n\t\t\tif (typeof property === \"number\") {\n\t\t\t\treturn this.get(property);\n\t\t\t}\n\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n\n\t@validateArgs()\n\tpublic async get(\n\t\tindicatorId?: number,\n\t): Promise<MaybeNotKnown<number | IndicatorObject[]>> {\n\t\tthis.assertSupportsCommand(IndicatorCommand, IndicatorCommand.Get);\n\n\t\tconst cc = new IndicatorCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<IndicatorCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (!response) return;\n\t\tif (response.values) return response.values;\n\t\treturn response.indicator0Value!;\n\t}\n\n\t@validateArgs()\n\tpublic async set(\n\t\tvalue: number | IndicatorObject[],\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(IndicatorCommand, IndicatorCommand.Set);\n\n\t\tif (this.version === 1 && typeof value !== \"number\") {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Node ${this.endpoint\n\t\t\t\t\t.nodeId as number} only supports IndicatorCC V1 which requires a single value to be set`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t} else if (\n\t\t\tthis.version >= 2\n\t\t\t&& isArray(value)\n\t\t\t&& value.length > MAX_INDICATOR_OBJECTS\n\t\t) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`Only ${MAX_INDICATOR_OBJECTS} indicator values can be set at a time!`,\n\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t);\n\t\t}\n\n\t\tconst cc = new IndicatorCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...(typeof value === \"number\" ? { value } : { values: value }),\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async sendReport(\n\t\toptions: IndicatorCCReportOptions,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.Report,\n\t\t);\n\n\t\tconst cc = new IndicatorCCReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\t...options,\n\t\t});\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async getSupported(indicatorId: number): Promise<\n\t\t| {\n\t\t\tindicatorId?: number;\n\t\t\tsupportedProperties: readonly number[];\n\t\t\tnextIndicatorId: number;\n\t\t}\n\t\t| undefined\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new IndicatorCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tIndicatorCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\t// Include the actual indicator ID if 0x00 was requested\n\t\t\t\t...(indicatorId === 0x00\n\t\t\t\t\t? { indicatorId: response.indicatorId }\n\t\t\t\t\t: undefined),\n\t\t\t\tsupportedProperties: response.supportedProperties,\n\t\t\t\tnextIndicatorId: response.nextIndicatorId,\n\t\t\t};\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async reportSupported(\n\t\tindicatorId: number,\n\t\tsupportedProperties: readonly number[],\n\t\tnextIndicatorId: number,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.SupportedReport,\n\t\t);\n\n\t\tconst cc = new IndicatorCCSupportedReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t\tsupportedProperties,\n\t\t\tnextIndicatorId,\n\t\t});\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async reportDescription(\n\t\tindicatorId: number,\n\t\tdescription: string,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.DescriptionReport,\n\t\t);\n\n\t\tconst cc = new IndicatorCCDescriptionReport({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t\tdescription,\n\t\t});\n\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/**\n\t * Instructs the node to identify itself. Available starting with V3 of this CC.\n\t */\n\tpublic async identify(): Promise<SupervisionResult | undefined> {\n\t\tif (this.version < 3) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`The identify command is only supported in Indicator CC version 3 and above`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\t\treturn this.set([\n\t\t\t{\n\t\t\t\tindicatorId: 0x50,\n\t\t\t\tpropertyId: 0x03,\n\t\t\t\tvalue: 0x08,\n\t\t\t},\n\t\t\t{\n\t\t\t\tindicatorId: 0x50,\n\t\t\t\tpropertyId: 0x04,\n\t\t\t\tvalue: 0x03,\n\t\t\t},\n\t\t\t{\n\t\t\t\tindicatorId: 0x50,\n\t\t\t\tpropertyId: 0x05,\n\t\t\t\tvalue: 0x06,\n\t\t\t},\n\t\t]);\n\t}\n\n\t/**\n\t * Set a timeout for a given indicator ID after which the indicator will be turned off.\n\t * @param timeout The timeout in one of the supported forms:\n\t * \t- a timeout string in the form `12h18m17.59s`. All parts (hours, minutes, seconds, hundredths) are optional, but must be specified in this order. An empty string will be treated like `undefined`.\n\t * \t- an object specifying the timeout parts. An empty object will be treated like `undefined`.\n\t * \t- `undefined` to disable the timeout.\n\t */\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\tindicatorId: number,\n\t\ttimeout: IndicatorTimeout | string | undefined,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertPhysicalEndpoint(this.endpoint);\n\n\t\tif (this.version < 3) {\n\t\t\tthrow new ZWaveError(\n\t\t\t\t`The setTimeout command is only supported in Indicator CC version 3 and above`,\n\t\t\t\tZWaveErrorCodes.CC_NotSupported,\n\t\t\t);\n\t\t}\n\n\t\tif (typeof timeout === \"string\") {\n\t\t\tif (timeout === \"\") {\n\t\t\t\ttimeout = undefined;\n\t\t\t} else {\n\t\t\t\tconst parsed = parseIndicatorTimeoutString(timeout);\n\t\t\t\tif (!parsed) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The timeout string \"${timeout}\" is not valid`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\ttimeout = parsed;\n\t\t\t}\n\t\t}\n\n\t\tconst supportedPropertyIDs = IndicatorCC.getSupportedPropertyIDsCached(\n\t\t\tthis.host,\n\t\t\tthis.endpoint,\n\t\t\tindicatorId,\n\t\t);\n\n\t\tconst objects: IndicatorObject[] = [];\n\t\tif (timeout) {\n\t\t\tconst hours = timeout.hours ?? 0;\n\t\t\tconst minutes = timeout.minutes ?? 0;\n\t\t\tconst seconds = Math.floor(timeout.seconds ?? 0);\n\t\t\tconst hundredths = Math.round(((timeout.seconds ?? 0) % 1) * 100);\n\n\t\t\tif (hours) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x0a)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in hours`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x0a,\n\t\t\t\t\tvalue: hours,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (minutes) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x06)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in minutes`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x06,\n\t\t\t\t\tvalue: minutes,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (seconds) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x07)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in seconds`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x07,\n\t\t\t\t\tvalue: seconds,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (hundredths) {\n\t\t\t\tif (!supportedPropertyIDs?.includes(0x08)) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The indicator ${indicatorId} does not support setting the timeout in 1/100 seconds`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tobjects.push({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: 0x08,\n\t\t\t\t\tvalue: hundredths,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (!objects.length) {\n\t\t\tobjects.push(\n\t\t\t\t...(supportedPropertyIDs ?? []).map((p) => ({\n\t\t\t\t\tindicatorId,\n\t\t\t\t\tpropertyId: p,\n\t\t\t\t\tvalue: 0,\n\t\t\t\t})),\n\t\t\t);\n\t\t}\n\n\t\treturn this.set(objects);\n\t}\n\n\t/**\n\t * Returns the timeout after which the given indicator will be turned off.\n\t */\n\t@validateArgs()\n\tpublic async getTimeout(\n\t\tindicatorId: number,\n\t): Promise<MaybeNotKnown<IndicatorTimeout>> {\n\t\tconst values = await this.get(indicatorId);\n\t\tif (!isArray(values)) return;\n\n\t\treturn indicatorObjectsToTimeout(values);\n\t}\n\n\t@validateArgs()\n\tpublic async getDescription(\n\t\tindicatorId: number,\n\t): Promise<MaybeNotKnown<string>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tIndicatorCommand,\n\t\t\tIndicatorCommand.DescriptionGet,\n\t\t);\n\n\t\tconst cc = new IndicatorCCDescriptionGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tindicatorId,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tIndicatorCCDescriptionReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.description;\n\t}\n}\n\n@commandClass(CommandClasses.Indicator)\n@implementedVersion(4)\n@ccValues(IndicatorCCValues)\nexport class IndicatorCC extends CommandClass {\n\tdeclare ccCommand: IndicatorCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Indicator,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tif (api.version > 1) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"scanning supported indicator IDs...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\t// Query ID 0 to get the first supported ID\n\t\t\tlet curId = 0x00;\n\t\t\tconst supportedIndicatorIds: number[] = [];\n\t\t\tdo {\n\t\t\t\tconst supportedResponse = await api.getSupported(curId);\n\t\t\t\tif (!supportedResponse) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Time out while scanning supported indicator IDs, skipping interview...\",\n\t\t\t\t\t\tlevel: \"warn\",\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsupportedIndicatorIds.push(\n\t\t\t\t\tsupportedResponse.indicatorId ?? curId,\n\t\t\t\t);\n\t\t\t\tcurId = supportedResponse.nextIndicatorId;\n\t\t\t} while (curId !== 0x00);\n\n\t\t\t// The IDs are not stored by the report CCs so store them here once we have all of them\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.supportedIndicatorIds,\n\t\t\t\tsupportedIndicatorIds,\n\t\t\t);\n\t\t\tconst logMessage = `supported indicator IDs: ${\n\t\t\t\tsupportedIndicatorIds.join(\n\t\t\t\t\t\", \",\n\t\t\t\t)\n\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\n\t\t\tif (api.version >= 4) {\n\t\t\t\tconst manufacturerDefinedIndicatorIds = supportedIndicatorIds\n\t\t\t\t\t.filter((id) => isManufacturerDefinedIndicator(id));\n\t\t\t\tif (manufacturerDefinedIndicatorIds.length > 0) {\n\t\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"retrieving description for manufacturer-defined indicator IDs...\",\n\t\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (const id of manufacturerDefinedIndicatorIds) {\n\t\t\t\t\t\tawait api.getDescription(id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Query current values\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Indicator,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tif (api.version === 1) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"requesting current indicator value...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait api.get();\n\t\t} else {\n\t\t\tconst supportedIndicatorIds: number[] = this.getValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.supportedIndicatorIds,\n\t\t\t) ?? [];\n\t\t\tfor (const indicatorId of supportedIndicatorIds) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: `requesting current indicator value (id = ${\n\t\t\t\t\t\tnum2hex(\n\t\t\t\t\t\t\tindicatorId,\n\t\t\t\t\t\t)\n\t\t\t\t\t})...`,\n\t\t\t\t\tdirection: \"outbound\",\n\t\t\t\t});\n\t\t\t\tawait api.get(indicatorId);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic translatePropertyKey(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey: string | number,\n\t): string | undefined {\n\t\tif (property === \"value\") {\n\t\t\t// CC version 1 only has a single value that doesn't need to be translated\n\t\t\treturn undefined;\n\t\t} else if (\n\t\t\ttypeof property === \"number\"\n\t\t\t&& typeof propertyKey === \"number\"\n\t\t) {\n\t\t\t// The indicator property is our property key\n\t\t\tconst prop = getIndicatorProperty(propertyKey);\n\t\t\tif (prop) return prop.label;\n\t\t}\n\t\treturn super.translatePropertyKey(ctx, property, propertyKey);\n\t}\n\n\tpublic translateProperty(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey?: string | number,\n\t): string {\n\t\tif (typeof property === \"number\" && typeof propertyKey === \"number\") {\n\t\t\t// The indicator corresponds to our property\n\t\t\tif (property in Indicator) return Indicator[property];\n\t\t}\n\t\treturn super.translateProperty(ctx, property, propertyKey);\n\t}\n\n\tprotected supportsV2Indicators(ctx: GetValueDB): boolean {\n\t\t// First test if there are any indicator ids defined\n\t\tconst supportedIndicatorIds = this.getValue<number[]>(\n\t\t\tctx,\n\t\t\tIndicatorCCValues.supportedIndicatorIds,\n\t\t);\n\t\tif (!supportedIndicatorIds?.length) return false;\n\t\t// Then test if there are any property ids defined\n\t\treturn supportedIndicatorIds.some(\n\t\t\t(indicatorId) =>\n\t\t\t\t!!this.getValue<number[]>(\n\t\t\t\t\tctx,\n\t\t\t\t\tIndicatorCCValues.supportedPropertyIDs(indicatorId),\n\t\t\t\t)?.length,\n\t\t);\n\t}\n\n\tpublic static getSupportedPropertyIDsCached(\n\t\tctx: GetValueDB,\n\t\tendpoint: EndpointId,\n\t\tindicatorId: number,\n\t): MaybeNotKnown<number[]> {\n\t\treturn ctx\n\t\t\t.getValueDB(endpoint.nodeId)\n\t\t\t.getValue(\n\t\t\t\tIndicatorCCValues.supportedPropertyIDs(indicatorId).endpoint(\n\t\t\t\t\tendpoint.index,\n\t\t\t\t),\n\t\t\t);\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorObject {\n\tindicatorId: number;\n\tpropertyId: number;\n\tvalue: number | boolean;\n}\n\n// @publicAPI\nexport type IndicatorCCSetOptions =\n\t| {\n\t\tvalue: number;\n\t}\n\t| {\n\t\tvalues: IndicatorObject[];\n\t};\n\n@CCCommand(IndicatorCommand.Set)\n@useSupervision()\nexport class IndicatorCCSet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tif (\"value\" in options) {\n\t\t\tthis.indicator0Value = options.value;\n\t\t} else {\n\t\t\tthis.values = options.values;\n\t\t}\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): IndicatorCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\n\t\tconst objCount = raw.payload.length >= 2\n\t\t\t? raw.payload[1] & 0b11111\n\t\t\t: 0;\n\n\t\tif (objCount === 0) {\n\t\t\tconst indicator0Value = raw.payload[0];\n\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tvalue: indicator0Value,\n\t\t\t});\n\t\t}\n\n\t\tvalidatePayload(raw.payload.length >= 2 + 3 * objCount);\n\n\t\tconst values: IndicatorObject[] = [];\n\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\tconst offset = 2 + 3 * i;\n\t\t\tconst value: IndicatorObject = {\n\t\t\t\tindicatorId: raw.payload[offset],\n\t\t\t\tpropertyId: raw.payload[offset + 1],\n\t\t\t\tvalue: raw.payload[offset + 2],\n\t\t\t};\n\t\t\tvalues.push(value);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tvalues,\n\t\t});\n\t}\n\n\tpublic indicator0Value: number | undefined;\n\tpublic values: IndicatorObject[] | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (this.values != undefined) {\n\t\t\t// V2+\n\t\t\tthis.payload = Bytes.alloc(2 + 3 * this.values.length, 0);\n\t\t\t// Byte 0 is the legacy value\n\t\t\tconst objCount = this.values.length & MAX_INDICATOR_OBJECTS;\n\t\t\tthis.payload[1] = objCount;\n\t\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\t\tconst offset = 2 + 3 * i;\n\t\t\t\tthis.payload[offset] = this.values[i].indicatorId;\n\t\t\t\tthis.payload[offset + 1] = this.values[i].propertyId;\n\t\t\t\tconst value = this.values[i].value;\n\t\t\t\tthis.payload[offset + 2] = value === true\n\t\t\t\t\t? 0xff\n\t\t\t\t\t: value === false\n\t\t\t\t\t? 0x00\n\t\t\t\t\t: value;\n\t\t\t}\n\t\t} else {\n\t\t\t// V1\n\t\t\tthis.payload = Bytes.from([this.indicator0Value ?? 0]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {};\n\t\tif (this.indicator0Value != undefined) {\n\t\t\tmessage[\"indicator 0 value\"] = this.indicator0Value;\n\t\t}\n\t\tif (this.values != undefined) {\n\t\t\tmessage.values = `${\n\t\t\t\tthis.values\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(v) => `\n\u00B7 indicatorId: ${v.indicatorId}\n propertyId: ${v.propertyId}\n value: ${v.value}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport type IndicatorCCReportOptions =\n\t| {\n\t\tvalue: number;\n\t}\n\t| {\n\t\tvalues: IndicatorObject[];\n\t};\n\n@CCCommand(IndicatorCommand.Report)\nexport class IndicatorCCReport extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tif (\"value\" in options) {\n\t\t\tthis.indicator0Value = options.value;\n\t\t} else if (\"values\" in options) {\n\t\t\tif (options.values.length > MAX_INDICATOR_OBJECTS) {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`Only ${MAX_INDICATOR_OBJECTS} indicator values can be set at a time!`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.values = options.values;\n\t\t}\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): IndicatorCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\n\t\tconst objCount = raw.payload.length >= 2\n\t\t\t? raw.payload[1] & 0b11111\n\t\t\t: 0;\n\n\t\tif (objCount === 0) {\n\t\t\tconst indicator0Value = raw.payload[0];\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tvalue: indicator0Value,\n\t\t\t});\n\t\t}\n\n\t\tvalidatePayload(raw.payload.length >= 2 + 3 * objCount);\n\n\t\tconst values: IndicatorObject[] = [];\n\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\tconst offset = 2 + 3 * i;\n\t\t\tconst value: IndicatorObject = {\n\t\t\t\tindicatorId: raw.payload[offset],\n\t\t\t\tpropertyId: raw.payload[offset + 1],\n\t\t\t\tvalue: raw.payload[offset + 2],\n\t\t\t};\n\t\t\tvalues.push(value);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tvalues,\n\t\t});\n\n\t\t// TODO: Think if we want this:\n\n\t\t// // If not all Property IDs are included in the command for the actual Indicator ID,\n\t\t// // a controlling node MUST assume non-specified Property IDs values to be 0x00.\n\t\t// const indicatorId = this.values[0].indicatorId;\n\t\t// const supportedIndicatorProperties =\n\t\t// \tvalueDB.getValue<number[]>(\n\t\t// \t\tgetSupportedPropertyIDsValueID(\n\t\t// \t\t\tthis.endpointIndex,\n\t\t// \t\t\tindicatorId,\n\t\t// \t\t),\n\t\t// \t) ?? [];\n\t\t// // Find out which ones are missing\n\t\t// const missingIndicatorProperties = supportedIndicatorProperties.filter(\n\t\t// \tprop =>\n\t\t// \t\t!this.values!.find(({ propertyId }) => prop === propertyId),\n\t\t// );\n\t\t// // And assume they are 0 (false)\n\t\t// for (const missing of missingIndicatorProperties) {\n\t\t// \tthis.setIndicatorValue({\n\t\t// \t\tindicatorId,\n\t\t// \t\tpropertyId: missing,\n\t\t// \t\tvalue: 0,\n\t\t// \t});\n\t\t// }\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tif (this.indicator0Value != undefined) {\n\t\t\tif (!this.supportsV2Indicators(ctx)) {\n\t\t\t\t// Publish the value\n\t\t\t\tconst valueV1 = IndicatorCCValues.valueV1;\n\t\t\t\tthis.setMetadata(ctx, valueV1);\n\t\t\t\tthis.setValue(ctx, valueV1, this.indicator0Value);\n\t\t\t} else {\n\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t// Don't!\n\t\t\t\t\tctx.logNode(this.nodeId, {\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t`ignoring V1 indicator report because the node supports V2 indicators`,\n\t\t\t\t\t\tdirection: \"none\",\n\t\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.values) {\n\t\t\t// Store the simple values first\n\t\t\tfor (const value of this.values) {\n\t\t\t\tthis.setIndicatorValue(ctx, value);\n\t\t\t}\n\n\t\t\t// Then group values into the convenience properties\n\n\t\t\t// ... timeout\n\t\t\tconst timeout = indicatorObjectsToTimeout(this.values);\n\t\t\tif (timeout) {\n\t\t\t\tlet timeoutString = \"\";\n\t\t\t\tif (timeout?.hours) timeoutString += `${timeout.hours}h`;\n\t\t\t\tif (timeout?.minutes) timeoutString += `${timeout.minutes}m`;\n\t\t\t\tif (timeout?.seconds) timeoutString += `${timeout.seconds}s`;\n\n\t\t\t\tthis.setValue(\n\t\t\t\t\tctx,\n\t\t\t\t\tIndicatorCCValues.timeout,\n\t\t\t\t\ttimeoutString,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly indicator0Value: number | undefined;\n\tpublic readonly values: IndicatorObject[] | undefined;\n\n\tprivate setIndicatorValue(\n\t\tctx: GetValueDB,\n\t\tvalue: IndicatorObject,\n\t): void {\n\t\t// Manufacturer-defined indicators may need a custom label\n\t\tconst overrideIndicatorLabel = isManufacturerDefinedIndicator(\n\t\t\t\tvalue.indicatorId,\n\t\t\t)\n\t\t\t? this.getValue<string>(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.indicatorDescription(value.indicatorId),\n\t\t\t)\n\t\t\t: undefined;\n\n\t\tconst metadata = getIndicatorMetadata(\n\t\t\tvalue.indicatorId,\n\t\t\tvalue.propertyId,\n\t\t\toverrideIndicatorLabel,\n\t\t);\n\t\t// Some values need to be converted\n\t\tif (metadata.type === \"boolean\") {\n\t\t\tvalue.value = !!value.value;\n\t\t}\n\n\t\t// Publish the value\n\t\tconst valueV2 = IndicatorCCValues.valueV2(\n\t\t\tvalue.indicatorId,\n\t\t\tvalue.propertyId,\n\t\t);\n\t\tthis.setMetadata(ctx, valueV2, metadata);\n\t\tthis.setValue(ctx, valueV2, value.value);\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (this.values != undefined) {\n\t\t\t// V2+\n\t\t\tthis.payload = Bytes.alloc(2 + 3 * this.values.length, 0);\n\t\t\t// Byte 0 is the legacy value\n\t\t\tconst objCount = this.values.length & MAX_INDICATOR_OBJECTS;\n\t\t\tthis.payload[1] = objCount;\n\t\t\tfor (let i = 0; i < objCount; i++) {\n\t\t\t\tconst offset = 2 + 3 * i;\n\t\t\t\tthis.payload[offset] = this.values[i].indicatorId;\n\t\t\t\tthis.payload[offset + 1] = this.values[i].propertyId;\n\t\t\t\tconst value = this.values[i].value;\n\t\t\t\tthis.payload[offset + 2] = value === true\n\t\t\t\t\t? 0xff\n\t\t\t\t\t: value === false\n\t\t\t\t\t? 0x00\n\t\t\t\t\t: value;\n\t\t\t}\n\t\t} else {\n\t\t\t// V1\n\t\t\tthis.payload = Bytes.from([this.indicator0Value ?? 0]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {};\n\t\tif (this.indicator0Value != undefined) {\n\t\t\tmessage[\"indicator 0 value\"] = this.indicator0Value;\n\t\t}\n\t\tif (this.values != undefined) {\n\t\t\tmessage.values = `${\n\t\t\t\tthis.values\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(v) => `\n\u00B7 indicatorId: ${v.indicatorId}\n propertyId: ${v.propertyId}\n value: ${v.value}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCGetOptions {\n\tindicatorId?: number;\n}\n\n@CCCommand(IndicatorCommand.Get)\n@expectedCCResponse(IndicatorCCReport)\nexport class IndicatorCCGet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.indicatorId = options.indicatorId;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): IndicatorCCGet {\n\t\tlet indicatorId: number | undefined;\n\n\t\tif (raw.payload.length > 0) {\n\t\t\tindicatorId = raw.payload[0];\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t});\n\t}\n\n\tpublic indicatorId: number | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tif (this.indicatorId != undefined) {\n\t\t\tthis.payload = Bytes.from([this.indicatorId]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tindicator: getIndicatorName(this.indicatorId),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCSupportedReportOptions {\n\tindicatorId: number;\n\tnextIndicatorId: number;\n\tsupportedProperties: readonly number[];\n}\n\n@CCCommand(IndicatorCommand.SupportedReport)\nexport class IndicatorCCSupportedReport extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.indicatorId = options.indicatorId;\n\t\tthis.nextIndicatorId = options.nextIndicatorId;\n\t\tthis.supportedProperties = options.supportedProperties;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst indicatorId = raw.payload[0];\n\t\tconst nextIndicatorId = raw.payload[1];\n\t\tconst bitMaskLength = raw.payload[2] & 0b11111;\n\t\tlet supportedProperties: readonly number[];\n\n\t\tif (bitMaskLength === 0) {\n\t\t\tsupportedProperties = [];\n\t\t} else {\n\t\t\tvalidatePayload(raw.payload.length >= 3 + bitMaskLength);\n\t\t\t// The bit mask starts at 0, but bit 0 is not used\n\t\t\tsupportedProperties = parseBitMask(\n\t\t\t\traw.payload.subarray(3, 3 + bitMaskLength),\n\t\t\t\t0,\n\t\t\t).filter((v) => v !== 0);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t\tnextIndicatorId,\n\t\t\tsupportedProperties,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tif (this.indicatorId !== 0x00) {\n\t\t\t// Remember which property IDs are supported\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.supportedPropertyIDs(this.indicatorId),\n\t\t\t\tthis.supportedProperties,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic readonly indicatorId: number;\n\tpublic readonly nextIndicatorId: number;\n\tpublic readonly supportedProperties: readonly number[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst bitmask = this.supportedProperties.length > 0\n\t\t\t? encodeBitMask(this.supportedProperties, undefined, 0)\n\t\t\t: new Bytes();\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([\n\t\t\t\tthis.indicatorId,\n\t\t\t\tthis.nextIndicatorId,\n\t\t\t\tbitmask.length,\n\t\t\t]),\n\t\t\tbitmask,\n\t\t]);\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tindicator: getIndicatorName(this.indicatorId),\n\t\t\t\t\"supported properties\": `${\n\t\t\t\t\tthis.supportedProperties\n\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t(id) =>\n\t\t\t\t\t\t\t\tgetIndicatorProperty(id)?.label\n\t\t\t\t\t\t\t\t\t?? `Unknown (${num2hex(id)})`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join(\", \")\n\t\t\t\t}`,\n\t\t\t\t\"next indicator\": getIndicatorName(this.nextIndicatorId),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCSupportedGetOptions {\n\tindicatorId: number;\n}\n\nfunction testResponseForIndicatorSupportedGet(\n\tsent: IndicatorCCSupportedGet,\n\treceived: IndicatorCCSupportedReport,\n) {\n\treturn sent.indicatorId === 0 || received.indicatorId === sent.indicatorId;\n}\n\n@CCCommand(IndicatorCommand.SupportedGet)\n@expectedCCResponse(\n\tIndicatorCCSupportedReport,\n\ttestResponseForIndicatorSupportedGet,\n)\nexport class IndicatorCCSupportedGet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCSupportedGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.indicatorId = options.indicatorId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCSupportedGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst indicatorId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t});\n\t}\n\n\tpublic indicatorId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.indicatorId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tindicator: getIndicatorName(this.indicatorId),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCDescriptionReportOptions {\n\tindicatorId: number;\n\tdescription: string;\n}\n\n@CCCommand(IndicatorCommand.DescriptionReport)\nexport class IndicatorCCDescriptionReport extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCDescriptionReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.indicatorId = options.indicatorId;\n\t\tthis.description = options.description;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCDescriptionReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst indicatorId = raw.payload[0];\n\t\tconst descrptionLength = raw.payload[1];\n\t\tvalidatePayload(raw.payload.length >= 2 + descrptionLength);\n\t\tconst description: string = raw.payload\n\t\t\t.subarray(2, 2 + descrptionLength)\n\t\t\t.toString(\"utf8\");\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t\tdescription,\n\t\t});\n\t}\n\n\tpublic indicatorId: number;\n\tpublic description: string;\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tif (this.description) {\n\t\t\tthis.setValue(\n\t\t\t\tctx,\n\t\t\t\tIndicatorCCValues.indicatorDescription(this.indicatorId),\n\t\t\t\tthis.description,\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst description = Bytes.from(this.description, \"utf8\");\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.indicatorId, description.length]),\n\t\t\tdescription,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"indicator ID\": this.indicatorId,\n\t\t\t\tdescription: this.description || \"(none)\",\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface IndicatorCCDescriptionGetOptions {\n\tindicatorId: number;\n}\n\nfunction testResponseForIndicatorDescriptionGet(\n\tsent: IndicatorCCDescriptionGet,\n\treceived: IndicatorCCDescriptionReport,\n) {\n\treturn received.indicatorId === sent.indicatorId;\n}\n\n@CCCommand(IndicatorCommand.DescriptionGet)\n@expectedCCResponse(\n\tIndicatorCCDescriptionReport,\n\ttestResponseForIndicatorDescriptionGet,\n)\nexport class IndicatorCCDescriptionGet extends IndicatorCC {\n\tpublic constructor(\n\t\toptions: WithAddress<IndicatorCCDescriptionGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.indicatorId = options.indicatorId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): IndicatorCCDescriptionGet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst indicatorId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tindicatorId,\n\t\t});\n\t}\n\n\tpublic indicatorId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.indicatorId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"indicator ID\": this.indicatorId,\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAkBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwB;AAExB,kBAA+B;AAC/B,wBAAwB;AACxB,iBAQO;AACP,0BAMO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,SAAS,+BAA+B,aAAmB;AAC1D,SAAO,eAAe,OAAQ,eAAe;AAC9C;AAFS;AAIT,MAAM,qBACL;AAED,SAAS,4BACR,MAAY;AAEZ,MAAI,CAAC,KAAK;AAAQ,WAAO;AAEzB,QAAM,QAAQ,mBAAmB,KAAK,IAAI;AAC1C,MAAI,CAAC;AAAO,WAAO;AACnB,QAAM,EAAE,UAAU,YAAY,WAAU,IAAK,MAAM;AACnD,MAAI,CAAC,YAAY,CAAC,cAAc,CAAC;AAAY,WAAO;AAEpD,QAAM,MAAwB,CAAA;AAC9B,MAAI,UAAU;AACb,QAAI,YAAQ,mBAAM,SAAS,UAAU,EAAE,GAAG,GAAG,GAAG;EACjD;AACA,MAAI,YAAY;AACf,QAAI,cAAU,mBAAM,SAAS,YAAY,EAAE,GAAG,GAAG,GAAG;EACrD;AACA,MAAI,YAAY;AACf,QAAI,cAAU,uBAAM,qBAAQ,WAAW,UAAU,GAAG,CAAC,GAAG,GAAG,KAAK;EACjE;AAEA,SAAO;AACR;AAtBS;AAwBT,SAAS,0BACR,QAAyB;AAEzB,QAAM,gBAAgB,OAAO,OAAO,CAAC,MACpC,CAAC,IAAM,GAAM,GAAM,CAAI,EAAE,SAAS,EAAE,UAAU,C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