@zwave-js/cc 15.21.0 → 15.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +2 -2
- package/build/cjs/cc/AlarmSensorCC.js +18 -57
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/ApplicationStatusCC.js +9 -48
- package/build/cjs/cc/ApplicationStatusCC.js.map +1 -1
- package/build/cjs/cc/AssociationCC.d.ts +2 -2
- package/build/cjs/cc/AssociationCC.js +32 -71
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.js +28 -65
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +2 -2
- package/build/cjs/cc/BarrierOperatorCC.js +28 -67
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +2 -2
- package/build/cjs/cc/BasicCC.js +15 -54
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BasicWindowCoveringCC.js +12 -51
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/cjs/cc/BatteryCC.d.ts +2 -2
- package/build/cjs/cc/BatteryCC.js +15 -54
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +2 -2
- package/build/cjs/cc/BinarySensorCC.js +19 -58
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +2 -2
- package/build/cjs/cc/BinarySwitchCC.js +15 -54
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CRC16CC.js +7 -46
- package/build/cjs/cc/CRC16CC.js.map +1 -1
- package/build/cjs/cc/CentralSceneCC.js +19 -58
- package/build/cjs/cc/CentralSceneCC.js.map +1 -1
- package/build/cjs/cc/ClimateControlScheduleCC.js +25 -64
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cjs/cc/ClockCC.d.ts +2 -2
- package/build/cjs/cc/ClockCC.js +15 -54
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +26 -65
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +2 -2
- package/build/cjs/cc/ConfigurationCC.js +43 -82
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js +7 -46
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +2 -2
- package/build/cjs/cc/DoorLockCC.js +26 -65
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.js +17 -56
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +2 -2
- package/build/cjs/cc/EnergyProductionCC.js +13 -52
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +2 -2
- package/build/cjs/cc/EntryControlCC.js +25 -64
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +34 -73
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cjs/cc/HailCC.js +3 -42
- package/build/cjs/cc/HailCC.js.map +1 -1
- package/build/cjs/cc/HumidityControlModeCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +19 -58
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +11 -50
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +30 -69
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/InclusionControllerCC.js +9 -48
- package/build/cjs/cc/InclusionControllerCC.js.map +1 -1
- package/build/cjs/cc/IndicatorCC.d.ts +2 -2
- package/build/cjs/cc/IndicatorCC.js +31 -70
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +2 -2
- package/build/cjs/cc/IrrigationCC.js +54 -93
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +2 -2
- package/build/cjs/cc/LanguageCC.js +15 -54
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +2 -2
- package/build/cjs/cc/LockCC.js +15 -54
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -49
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +16 -55
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cjs/cc/MeterCC.d.ts +2 -2
- package/build/cjs/cc/MeterCC.js +23 -62
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +26 -65
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.js +34 -73
- package/build/cjs/cc/MultiChannelCC.js.map +1 -1
- package/build/cjs/cc/MultiCommandCC.js +9 -48
- package/build/cjs/cc/MultiCommandCC.js.map +1 -1
- package/build/cjs/cc/MultilevelSensorCC.d.ts +2 -2
- package/build/cjs/cc/MultilevelSensorCC.js +23 -62
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.js +24 -63
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NoOperationCC.js +5 -44
- package/build/cjs/cc/NoOperationCC.js.map +1 -1
- package/build/cjs/cc/NodeNamingCC.d.ts +6 -4
- package/build/cjs/cc/NodeNamingCC.js +70 -85
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +20 -3
- package/build/cjs/cc/NotificationCC.js +141 -104
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.js +22 -61
- package/build/cjs/cc/PowerlevelCC.js.map +1 -1
- package/build/cjs/cc/ProtectionCC.d.ts +2 -2
- package/build/cjs/cc/ProtectionCC.js +33 -72
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.js +9 -48
- package/build/cjs/cc/SceneActivationCC.js.map +1 -1
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +14 -53
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js +17 -56
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js +46 -85
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cjs/cc/Security2CC.js +33 -72
- package/build/cjs/cc/Security2CC.js.map +1 -1
- package/build/cjs/cc/SecurityCC.js +27 -66
- package/build/cjs/cc/SecurityCC.js.map +1 -1
- package/build/cjs/cc/SoundSwitchCC.js +29 -68
- package/build/cjs/cc/SoundSwitchCC.js.map +1 -1
- package/build/cjs/cc/SupervisionCC.js +9 -48
- package/build/cjs/cc/SupervisionCC.js.map +1 -1
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.js +19 -58
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.js +11 -50
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +19 -58
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.js +11 -50
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.js +15 -54
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.js +25 -64
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.js +24 -63
- package/build/cjs/cc/TimeCC.js.map +1 -1
- package/build/cjs/cc/TimeParametersCC.js +13 -52
- package/build/cjs/cc/TimeParametersCC.js.map +1 -1
- package/build/cjs/cc/TransportServiceCC.js +13 -52
- package/build/cjs/cc/TransportServiceCC.js.map +1 -1
- package/build/cjs/cc/UserCodeCC.d.ts +6 -4
- package/build/cjs/cc/UserCodeCC.js +89 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.js +25 -64
- package/build/cjs/cc/VersionCC.js.map +1 -1
- package/build/cjs/cc/WakeUpCC.js +21 -60
- package/build/cjs/cc/WakeUpCC.js.map +1 -1
- package/build/cjs/cc/WindowCoveringCC.d.ts +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +26 -65
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWaveLongRangeCC.js +3 -42
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/cjs/cc/ZWavePlusCC.js +11 -50
- package/build/cjs/cc/ZWavePlusCC.js.map +1 -1
- package/build/cjs/cc/ZWaveProtocolCC.js +73 -112
- package/build/cjs/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cjs/cc/_CCValues.generated.d.ts +131 -7
- package/build/cjs/cc/_CCValues.generated.js +68 -5
- package/build/cjs/cc/_CCValues.generated.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +22 -59
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +6 -2
- package/build/cjs/lib/CommandClass.js +1 -1
- package/build/cjs/lib/CommandClass.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.js +9 -48
- package/build/cjs/lib/Security2/Extension.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +1 -1
- package/build/cjs/lib/Values.js.map +1 -1
- package/build/esm/cc/AlarmSensorCC.d.ts +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +9 -38
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/ApplicationStatusCC.js +1 -34
- package/build/esm/cc/ApplicationStatusCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +2 -2
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +3 -36
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +2 -2
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +5 -36
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +2 -2
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +3 -36
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +2 -2
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +3 -36
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.js +1 -34
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +2 -2
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +3 -36
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +2 -2
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +3 -36
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +2 -2
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +3 -36
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +1 -34
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +1 -34
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +1 -34
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +2 -2
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +3 -36
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +2 -2
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +3 -36
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +2 -2
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +3 -36
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -34
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +2 -2
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +3 -36
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +2 -2
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +3 -36
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +2 -2
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +3 -36
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +2 -2
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +3 -36
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1 -34
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +1 -34
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +3 -36
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +3 -36
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +3 -36
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +1 -34
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +2 -2
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +3 -36
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +2 -2
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -36
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +2 -2
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +3 -36
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +2 -2
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +3 -36
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +3 -36
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +1 -34
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +2 -2
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -36
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +2 -2
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +4 -37
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1 -34
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +1 -34
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +2 -2
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +3 -36
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +2 -2
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +3 -36
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +1 -34
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +6 -4
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +52 -73
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +20 -3
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +143 -89
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +1 -34
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +2 -2
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +3 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +1 -34
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +1 -34
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +2 -2
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +3 -36
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1 -34
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1 -34
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +1 -34
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +1 -34
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +1 -34
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +2 -2
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +3 -36
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +2 -2
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +3 -36
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +2 -2
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +3 -36
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +2 -2
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +3 -36
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +2 -2
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +3 -36
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +2 -2
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +3 -36
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -34
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -34
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +1 -34
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +6 -4
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +55 -48
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.js +1 -34
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.js +1 -34
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +2 -2
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -36
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +1 -34
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +1 -34
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1 -34
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +131 -7
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +71 -4
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +7 -38
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +6 -2
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +1 -1
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/Security2/Extension.js +1 -34
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/Values.d.ts +1 -1
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/package.json +9 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/HumidityControlSetpointCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./HumidityControlSetpointCC._validateArgs.js\";\nconst { validateArgs_HumidityControlSetpointCCAPI_get, validateArgs_HumidityControlSetpointCCAPI_set, validateArgs_HumidityControlSetpointCCAPI_getCapabilities, validateArgs_HumidityControlSetpointCCAPI_getSupportedScales } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type Scale, type SupervisionResult, ValueMetadata, type ValueMetadataNumeric, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeFloatWithScale, getNamedScale, getUnknownScale, parseBitMask, parseFloatWithScale, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { type HumidityControlSetpointCapabilities, HumidityControlSetpointCommand, HumidityControlSetpointType, type HumidityControlSetpointValue, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { HumidityControlSetpointCCValues } from \"./_CCValues.generated.js\";\nexport { HumidityControlSetpointCCValues };\nfunction getScale(scale: number): Scale {\n return getNamedScale(\"humidity\", scale as any) ?? getUnknownScale(scale);\n}\nfunction getSetpointUnit(scale: number): string {\n return getScale(scale).unit ?? \"\";\n}\n@API(CommandClasses[\"Humidity Control Setpoint\"])\nexport class HumidityControlSetpointCCAPI extends CCAPI {\n public supportsCommand(cmd: HumidityControlSetpointCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case HumidityControlSetpointCommand.Get:\n case HumidityControlSetpointCommand.SupportedGet:\n case HumidityControlSetpointCommand.CapabilitiesGet:\n return this.isSinglecast();\n case HumidityControlSetpointCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }, value) {\n if (property !== \"setpoint\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);\n const preferredScale = this.tryGetValueDB()?.getValue<number>(scaleValueId);\n const result = await this.set(propertyKey, value, preferredScale ?? 0);\n // Verify the change after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property, propertyKey }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }) {\n switch (property) {\n case \"setpoint\":\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n return (await this.get(propertyKey))?.value;\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_get()\n public async get(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointValue>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Get);\n const cc = new HumidityControlSetpointCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCReport>(cc, this.commandOptions);\n if (!response)\n return;\n return response.type === HumidityControlSetpointType[\"N/A\"]\n // not supported\n ? undefined\n // supported\n : {\n value: response.value,\n scale: response.scale,\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_set()\n public async set(setpointType: HumidityControlSetpointType, value: number, scale: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Set);\n const cc = new HumidityControlSetpointCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n value,\n scale,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_HumidityControlSetpointCCAPI_getCapabilities()\n public async getCapabilities(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointCapabilities>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.CapabilitiesGet);\n const cc = new HumidityControlSetpointCCCapabilitiesGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCCapabilitiesReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"minValue\",\n \"maxValue\",\n \"minValueScale\",\n \"maxValueScale\",\n ]);\n }\n }\n public async getSupportedSetpointTypes(): Promise<MaybeNotKnown<readonly HumidityControlSetpointType[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedSetpointTypes;\n }\n @validateArgs_HumidityControlSetpointCCAPI_getSupportedScales()\n public async getSupportedScales(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<readonly Scale[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCScaleSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCScaleSupportedReport>(cc, this.commandOptions);\n if (response) {\n return response.supportedScales.map((scale) => getScale(scale));\n }\n }\n}\n@commandClass(CommandClasses[\"Humidity Control Setpoint\"])\n@implementedVersion(2)\n@ccValues(HumidityControlSetpointCCValues)\nexport class HumidityControlSetpointCC extends CommandClass {\n declare ccCommand: HumidityControlSetpointCommand;\n public translatePropertyKey(ctx: GetValueDB, property: string | number, propertyKey: string | number): string | undefined {\n if (property === \"setpoint\") {\n return getEnumMemberName(HumidityControlSetpointType, propertyKey as any);\n }\n else {\n return super.translatePropertyKey(ctx, property, propertyKey);\n }\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query the supported setpoint types\n let setpointTypes: HumidityControlSetpointType[] = [];\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"retrieving supported setpoint types...\",\n direction: \"outbound\",\n });\n const resp = await api.getSupportedSetpointTypes();\n if (resp) {\n setpointTypes = [...resp];\n const logMessage = \"received supported setpoint types:\\n\"\n + setpointTypes\n .map((type) => getEnumMemberName(HumidityControlSetpointType, type))\n .map((name) => `\u00B7 ${name}`)\n .join(\"\\n\");\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported setpoint types timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Find out the capabilities of this setpoint\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `retrieving capabilities for setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpointScaleSupported = await api.getSupportedScales(type);\n if (setpointScaleSupported) {\n const logMessage = `received supported scales for setpoint ${setpointName}: \n${setpointScaleSupported\n .map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n .join(\"\")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n const scaleValue = HumidityControlSetpointCCValues\n .setpointScale(type);\n const states: Record<number, string> = {};\n for (const scale of setpointScaleSupported) {\n if (scale.unit)\n states[scale.key] = scale.unit;\n }\n this.setMetadata(ctx, scaleValue, {\n ...scaleValue.meta,\n states,\n });\n }\n const setpointCaps = await api.getCapabilities(type);\n if (setpointCaps) {\n const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);\n const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);\n const logMessage = `received capabilities for setpoint ${setpointName}:\nminimum value: ${setpointCaps.minValue} ${minValueUnit}\nmaximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n // Query the current value for all setpoint types\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n const setpointTypes: HumidityControlSetpointType[] = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];\n // Query each setpoint's current value\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Every time, query the current value\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying current value of setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpoint = await api.get(type);\n if (setpoint) {\n const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? \"\"}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSetOptions {\n setpointType: HumidityControlSetpointType;\n value: number;\n scale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Set)\n@useSupervision()\nexport class HumidityControlSetpointCCSet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public value: number;\n public scale: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.setpointType & 0b1111],\n encodeFloatWithScale(this.value, this.scale),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCReportOptions {\n type: HumidityControlSetpointType;\n scale: number;\n value: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Report)\nexport class HumidityControlSetpointCCReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.type = options.type;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // Setpoint type 0 is not defined in the spec, prevent devices from using it.\n if (type === 0) {\n // Not supported\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value: 0,\n scale: 0,\n });\n }\n // parseFloatWithScale does its own validation\n const { value, scale } = parseFloatWithScale(raw.payload.subarray(1));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value,\n scale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const scale = getScale(this.scale);\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n const existingMetadata = this.getMetadata<ValueMetadataNumeric>(ctx, setpointValue);\n // Update the metadata when it is missing or the unit has changed\n if (existingMetadata?.unit !== scale.unit) {\n this.setMetadata(ctx, setpointValue, {\n ...(existingMetadata ?? setpointValue.meta),\n unit: scale.unit,\n });\n }\n this.setValue(ctx, setpointValue, this.value);\n // Remember the device-preferred setpoint scale so it can be used in SET commands\n this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);\n return true;\n }\n public type: HumidityControlSetpointType;\n public scale: number;\n public value: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\nfunction testResponseForHumidityControlSetpointGet(sent: HumidityControlSetpointCCGet, received: HumidityControlSetpointCCReport) {\n // We expect a Humidity Control Setpoint Report that matches the requested setpoint type\n return received.type === sent.setpointType;\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.Get)\n@expectedCCResponse(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)\nexport class HumidityControlSetpointCCGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSupportedReportOptions {\n supportedSetpointTypes: HumidityControlSetpointType[];\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedReport)\n@ccValueProperty(\"supportedSetpointTypes\", HumidityControlSetpointCCValues.supportedSetpointTypes)\nexport class HumidityControlSetpointCCSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedSetpointTypes = options.supportedSetpointTypes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedSetpointTypes: HumidityControlSetpointType[] = parseBitMask(raw.payload, HumidityControlSetpointType[\"N/A\"]);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedSetpointTypes,\n });\n }\n public readonly supportedSetpointTypes: readonly HumidityControlSetpointType[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported setpoint types\": this.supportedSetpointTypes\n .map((t) => `\\n\u00B7 ${getEnumMemberName(HumidityControlSetpointType, t)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCSupportedReport)\nexport class HumidityControlSetpointCCSupportedGet extends HumidityControlSetpointCC {\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedReportOptions {\n supportedScales: number[];\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedScales = options.supportedScales;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedScales = parseBitMask(Bytes.from([raw.payload[0] & 0b1111]), 0);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedScales,\n });\n }\n public readonly supportedScales: readonly number[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const supportedScales = this.supportedScales.map((scale) => getScale(scale));\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"scale supported\": supportedScales\n .map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCScaleSupportedGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesReportOptions {\n type: HumidityControlSetpointType;\n minValue: number;\n maxValue: number;\n minValueScale: number;\n maxValueScale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesReportOptions>) {\n super(options);\n this.type = options.type;\n this.minValue = options.minValue;\n this.maxValue = options.maxValue;\n this.minValueScale = options.minValueScale;\n this.maxValueScale = options.maxValueScale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // parseFloatWithScale does its own validation\n const { value: minValue, scale: minValueScale, bytesRead, } = parseFloatWithScale(raw.payload.subarray(1));\n const { value: maxValue, scale: maxValueScale } = parseFloatWithScale(raw.payload.subarray(1 + bytesRead));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n minValue,\n minValueScale,\n maxValue,\n maxValueScale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Predefine the metadata\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n this.setMetadata(ctx, setpointValue, {\n ...setpointValue.meta,\n min: this.minValue,\n max: this.maxValue,\n unit: getSetpointUnit(this.minValueScale)\n || getSetpointUnit(this.maxValueScale),\n });\n return true;\n }\n public type: HumidityControlSetpointType;\n public minValue: number;\n public maxValue: number;\n public minValueScale: number;\n public maxValueScale: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const minValueScale = getScale(this.minValueScale);\n const maxValueScale = getScale(this.maxValueScale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n \"min value\": `${this.minValue} ${minValueScale.unit}`,\n \"max value\": `${this.maxValue} ${maxValueScale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesGet)\n@expectedCCResponse(HumidityControlSetpointCCCapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCCapabilitiesGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAmX;AACnX,oBAA+C;AAC/C,iBAAwJ;AACxJ,0BAAuH;AACvH,oCAAiI;AAEjI,mBAA0J;AAE1J,gCAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAThD,MAAM,EAAE,+CAA+C,+CAA+C,2DAA2D,6DAA4D,IAAK;AAWlO,SAAS,SAAS,OAAa;AAC3B,aAAO,2BAAc,YAAY,KAAY,SAAK,6BAAgB,KAAK;AAC3E;AAFS;AAGT,SAAS,gBAAgB,OAAa;AAClC,SAAO,SAAS,KAAK,EAAE,QAAQ;AACnC;AAFS;IAII,gCAA4B,MAAA;8BADxC,mCAAI,2BAAe,2BAA2B,CAAC,CAAC;;;;oBACC;;;;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AAW,KAAgB;AAC9B,YAAM,gBAAgB,SAAS,KAAK,aAAa;AACjD,YAAM,gBAAgB,SAAS,KAAK,aAAa;AACjD,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,0CAA6B,KAAK,IAAI;UACzE,aAAa,GAAG,KAAK,QAAQ,IAAI,cAAc,IAAI;UACnD,aAAa,GAAG,KAAK,QAAQ,IAAI,cAAc,IAAI;;;IAG/D;;;;IAQS,4CAAwC,MAAA;8BAFpD,yCAAU,4CAA+B,eAAe,OACxD,kDAAmB,2CAA2C,CAAC;;;;oBACF;gEAAA,YAAyB;WAAA;;;;;;;;AAAvF,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACT,YAAmB,SAAqE;AACpF,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;IAChC;IACO,OAAO,KAAK,MAAa,MAAsB;AAElD,YAAM,IAAI,uBAAW,GAAG,KAAK,IAAI,qCAAqC,4BAAgB,8BAA8B;IAIxH;IACO;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,eAAe,EAAM,CAAC;AACtD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,0CAA6B,KAAK,YAAY;;;IAG7F;;;;",
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./HumidityControlSetpointCC._validateArgs.js\";\nconst { validateArgs_HumidityControlSetpointCCAPI_get, validateArgs_HumidityControlSetpointCCAPI_set, validateArgs_HumidityControlSetpointCCAPI_getCapabilities, validateArgs_HumidityControlSetpointCCAPI_getSupportedScales } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type Scale, type SupervisionResult, ValueMetadata, type ValueMetadataNumeric, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeFloatWithScale, getNamedScale, getUnknownScale, parseBitMask, parseFloatWithScale, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { type HumidityControlSetpointCapabilities, HumidityControlSetpointCommand, HumidityControlSetpointType, type HumidityControlSetpointValue, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { HumidityControlSetpointCCValues } from \"./_CCValues.generated.js\";\nexport { HumidityControlSetpointCCValues };\nfunction getScale(scale: number): Scale {\n return getNamedScale(\"humidity\", scale as any) ?? getUnknownScale(scale);\n}\nfunction getSetpointUnit(scale: number): string {\n return getScale(scale).unit ?? \"\";\n}\n@API(CommandClasses[\"Humidity Control Setpoint\"])\nexport class HumidityControlSetpointCCAPI extends CCAPI {\n public supportsCommand(cmd: HumidityControlSetpointCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case HumidityControlSetpointCommand.Get:\n case HumidityControlSetpointCommand.SupportedGet:\n case HumidityControlSetpointCommand.CapabilitiesGet:\n return this.isSinglecast();\n case HumidityControlSetpointCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }, value) {\n if (property !== \"setpoint\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);\n const preferredScale = this.tryGetValueDB()?.getValue<number>(scaleValueId);\n const result = await this.set(propertyKey, value, preferredScale ?? 0);\n // Verify the change after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property, propertyKey }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }) {\n switch (property) {\n case \"setpoint\":\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n return (await this.get(propertyKey))?.value;\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_get()\n public async get(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointValue>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Get);\n const cc = new HumidityControlSetpointCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCReport>(cc, this.commandOptions);\n if (!response)\n return;\n return response.type === HumidityControlSetpointType[\"N/A\"]\n // not supported\n ? undefined\n // supported\n : {\n value: response.value,\n scale: response.scale,\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_set()\n public async set(setpointType: HumidityControlSetpointType, value: number, scale: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Set);\n const cc = new HumidityControlSetpointCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n value,\n scale,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_HumidityControlSetpointCCAPI_getCapabilities()\n public async getCapabilities(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointCapabilities>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.CapabilitiesGet);\n const cc = new HumidityControlSetpointCCCapabilitiesGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCCapabilitiesReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"minValue\",\n \"maxValue\",\n \"minValueScale\",\n \"maxValueScale\",\n ]);\n }\n }\n public async getSupportedSetpointTypes(): Promise<MaybeNotKnown<readonly HumidityControlSetpointType[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedSetpointTypes;\n }\n @validateArgs_HumidityControlSetpointCCAPI_getSupportedScales()\n public async getSupportedScales(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<readonly Scale[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCScaleSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCScaleSupportedReport>(cc, this.commandOptions);\n if (response) {\n return response.supportedScales.map((scale) => getScale(scale));\n }\n }\n}\n@commandClass(CommandClasses[\"Humidity Control Setpoint\"])\n@implementedVersion(2)\n@ccValues(HumidityControlSetpointCCValues)\nexport class HumidityControlSetpointCC extends CommandClass {\n declare ccCommand: HumidityControlSetpointCommand;\n public translatePropertyKey(ctx: GetValueDB, property: string | number, propertyKey: string | number): string | undefined {\n if (property === \"setpoint\") {\n return getEnumMemberName(HumidityControlSetpointType, propertyKey as any);\n }\n else {\n return super.translatePropertyKey(ctx, property, propertyKey);\n }\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query the supported setpoint types\n let setpointTypes: HumidityControlSetpointType[] = [];\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"retrieving supported setpoint types...\",\n direction: \"outbound\",\n });\n const resp = await api.getSupportedSetpointTypes();\n if (resp) {\n setpointTypes = [...resp];\n const logMessage = \"received supported setpoint types:\\n\"\n + setpointTypes\n .map((type) => getEnumMemberName(HumidityControlSetpointType, type))\n .map((name) => `\u00B7 ${name}`)\n .join(\"\\n\");\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported setpoint types timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Find out the capabilities of this setpoint\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `retrieving capabilities for setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpointScaleSupported = await api.getSupportedScales(type);\n if (setpointScaleSupported) {\n const logMessage = `received supported scales for setpoint ${setpointName}: \n${setpointScaleSupported\n .map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n .join(\"\")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n const scaleValue = HumidityControlSetpointCCValues\n .setpointScale(type);\n const states: Record<number, string> = {};\n for (const scale of setpointScaleSupported) {\n if (scale.unit)\n states[scale.key] = scale.unit;\n }\n this.setMetadata(ctx, scaleValue, {\n ...scaleValue.meta,\n states,\n });\n }\n const setpointCaps = await api.getCapabilities(type);\n if (setpointCaps) {\n const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);\n const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);\n const logMessage = `received capabilities for setpoint ${setpointName}:\nminimum value: ${setpointCaps.minValue} ${minValueUnit}\nmaximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n // Query the current value for all setpoint types\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n const setpointTypes: HumidityControlSetpointType[] = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];\n // Query each setpoint's current value\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Every time, query the current value\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying current value of setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpoint = await api.get(type);\n if (setpoint) {\n const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? \"\"}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSetOptions {\n setpointType: HumidityControlSetpointType;\n value: number;\n scale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Set)\n@useSupervision()\nexport class HumidityControlSetpointCCSet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public value: number;\n public scale: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.setpointType & 0b1111],\n encodeFloatWithScale(this.value, this.scale),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCReportOptions {\n type: HumidityControlSetpointType;\n scale: number;\n value: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Report)\nexport class HumidityControlSetpointCCReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.type = options.type;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // Setpoint type 0 is not defined in the spec, prevent devices from using it.\n if (type === 0) {\n // Not supported\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value: 0,\n scale: 0,\n });\n }\n // parseFloatWithScale does its own validation\n const { value, scale } = parseFloatWithScale(raw.payload.subarray(1));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value,\n scale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const scale = getScale(this.scale);\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n const existingMetadata = this.getMetadata<ValueMetadataNumeric>(ctx, setpointValue);\n // Update the metadata when it is missing or the unit has changed\n if (existingMetadata?.unit !== scale.unit) {\n this.setMetadata(ctx, setpointValue, {\n ...(existingMetadata ?? setpointValue.meta),\n unit: scale.unit,\n });\n }\n this.setValue(ctx, setpointValue, this.value);\n // Remember the device-preferred setpoint scale so it can be used in SET commands\n this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);\n return true;\n }\n public type: HumidityControlSetpointType;\n public scale: number;\n public value: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\nfunction testResponseForHumidityControlSetpointGet(sent: HumidityControlSetpointCCGet, received: HumidityControlSetpointCCReport) {\n // We expect a Humidity Control Setpoint Report that matches the requested setpoint type\n return received.type === sent.setpointType;\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.Get)\n@expectedCCResponse(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)\nexport class HumidityControlSetpointCCGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSupportedReportOptions {\n supportedSetpointTypes: HumidityControlSetpointType[];\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedReport)\n@ccValueProperty(\"supportedSetpointTypes\", HumidityControlSetpointCCValues.supportedSetpointTypes)\nexport class HumidityControlSetpointCCSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedSetpointTypes = options.supportedSetpointTypes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedSetpointTypes: HumidityControlSetpointType[] = parseBitMask(raw.payload, HumidityControlSetpointType[\"N/A\"]);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedSetpointTypes,\n });\n }\n public readonly supportedSetpointTypes: readonly HumidityControlSetpointType[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported setpoint types\": this.supportedSetpointTypes\n .map((t) => `\\n\u00B7 ${getEnumMemberName(HumidityControlSetpointType, t)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCSupportedReport)\nexport class HumidityControlSetpointCCSupportedGet extends HumidityControlSetpointCC {\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedReportOptions {\n supportedScales: number[];\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedScales = options.supportedScales;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedScales = parseBitMask(Bytes.from([raw.payload[0] & 0b1111]), 0);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedScales,\n });\n }\n public readonly supportedScales: readonly number[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const supportedScales = this.supportedScales.map((scale) => getScale(scale));\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"scale supported\": supportedScales\n .map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCScaleSupportedGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesReportOptions {\n type: HumidityControlSetpointType;\n minValue: number;\n maxValue: number;\n minValueScale: number;\n maxValueScale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesReportOptions>) {\n super(options);\n this.type = options.type;\n this.minValue = options.minValue;\n this.maxValue = options.maxValue;\n this.minValueScale = options.minValueScale;\n this.maxValueScale = options.maxValueScale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // parseFloatWithScale does its own validation\n const { value: minValue, scale: minValueScale, bytesRead, } = parseFloatWithScale(raw.payload.subarray(1));\n const { value: maxValue, scale: maxValueScale } = parseFloatWithScale(raw.payload.subarray(1 + bytesRead));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n minValue,\n minValueScale,\n maxValue,\n maxValueScale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Predefine the metadata\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n this.setMetadata(ctx, setpointValue, {\n ...setpointValue.meta,\n min: this.minValue,\n max: this.maxValue,\n unit: getSetpointUnit(this.minValueScale)\n || getSetpointUnit(this.maxValueScale),\n });\n return true;\n }\n public type: HumidityControlSetpointType;\n public minValue: number;\n public maxValue: number;\n public minValueScale: number;\n public maxValueScale: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const minValueScale = getScale(this.minValueScale);\n const maxValueScale = getScale(this.maxValueScale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n \"min value\": `${this.minValue} ${minValueScale.unit}`,\n \"max value\": `${this.maxValue} ${maxValueScale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesGet)\n@expectedCCResponse(HumidityControlSetpointCCCapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCCapabilitiesGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAmX;AACnX,oBAA+C;AA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AAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,0CAA6B,KAAK,YAAY;;;IAG7F;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,52 +25,13 @@ __export(InclusionControllerCC_exports, {
|
|
|
25
25
|
InclusionControllerCCInitiate: () => InclusionControllerCCInitiate
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(InclusionControllerCC_exports);
|
|
28
|
+
var import_tslib = require("tslib");
|
|
28
29
|
var import_core = require("@zwave-js/core");
|
|
29
30
|
var import_shared = require("@zwave-js/shared");
|
|
30
31
|
var import_API = require("../lib/API.js");
|
|
31
32
|
var import_CommandClass = require("../lib/CommandClass.js");
|
|
32
33
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
33
34
|
var import_Types = require("../lib/_Types.js");
|
|
34
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
35
|
-
function accept(f) {
|
|
36
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
37
|
-
return f;
|
|
38
|
-
}
|
|
39
|
-
__name(accept, "accept");
|
|
40
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
41
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
42
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
43
|
-
var _, done = false;
|
|
44
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
45
|
-
var context = {};
|
|
46
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
47
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
48
|
-
context.addInitializer = function(f) {
|
|
49
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
50
|
-
extraInitializers.push(accept(f || null));
|
|
51
|
-
};
|
|
52
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
53
|
-
if (kind === "accessor") {
|
|
54
|
-
if (result === void 0) continue;
|
|
55
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
56
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
57
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
58
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
59
|
-
} else if (_ = accept(result)) {
|
|
60
|
-
if (kind === "field") initializers.unshift(_);
|
|
61
|
-
else descriptor[key] = _;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
65
|
-
done = true;
|
|
66
|
-
};
|
|
67
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
68
|
-
var useValue = arguments.length > 2;
|
|
69
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
70
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
71
|
-
}
|
|
72
|
-
return useValue ? value : void 0;
|
|
73
|
-
};
|
|
74
35
|
let InclusionControllerCC = (() => {
|
|
75
36
|
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Inclusion Controller"]), (0, import_CommandClassDecorators.implementedVersion)(1)];
|
|
76
37
|
let _classDescriptor;
|
|
@@ -86,10 +47,10 @@ let InclusionControllerCC = (() => {
|
|
|
86
47
|
}
|
|
87
48
|
static {
|
|
88
49
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
89
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
50
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
90
51
|
InclusionControllerCC2 = _classThis = _classDescriptor.value;
|
|
91
52
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
92
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
53
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
93
54
|
}
|
|
94
55
|
};
|
|
95
56
|
return InclusionControllerCC2 = _classThis;
|
|
@@ -109,10 +70,10 @@ let InclusionControllerCCAPI = (() => {
|
|
|
109
70
|
}
|
|
110
71
|
static {
|
|
111
72
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
112
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
73
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
113
74
|
InclusionControllerCCAPI2 = _classThis = _classDescriptor.value;
|
|
114
75
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
115
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
76
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
116
77
|
}
|
|
117
78
|
supportsCommand(cmd) {
|
|
118
79
|
switch (cmd) {
|
|
@@ -162,10 +123,10 @@ let InclusionControllerCCComplete = (() => {
|
|
|
162
123
|
}
|
|
163
124
|
static {
|
|
164
125
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
165
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
126
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
166
127
|
InclusionControllerCCComplete2 = _classThis = _classDescriptor.value;
|
|
167
128
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
168
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
129
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
169
130
|
}
|
|
170
131
|
constructor(options) {
|
|
171
132
|
super(options);
|
|
@@ -216,10 +177,10 @@ let InclusionControllerCCInitiate = (() => {
|
|
|
216
177
|
}
|
|
217
178
|
static {
|
|
218
179
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
219
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
180
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
220
181
|
InclusionControllerCCInitiate2 = _classThis = _classDescriptor.value;
|
|
221
182
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
222
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
183
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
223
184
|
}
|
|
224
185
|
constructor(options) {
|
|
225
186
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/InclusionControllerCC.ts"],
|
|
4
4
|
"sourcesContent": ["import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, commandClass, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { InclusionControllerCommand, InclusionControllerStatus, InclusionControllerStep, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\n// This CC should not be used directly from user code\n/* eslint-disable @zwave-js/ccapi-validate-args */\n@commandClass(CommandClasses[\"Inclusion Controller\"])\n@implementedVersion(1)\nexport class InclusionControllerCC extends CommandClass {\n declare ccCommand: InclusionControllerCommand;\n}\n@API(CommandClasses[\"Inclusion Controller\"])\nexport class InclusionControllerCCAPI extends CCAPI {\n public supportsCommand(cmd: InclusionControllerCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case InclusionControllerCommand.Initiate:\n case InclusionControllerCommand.Complete:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n /** Instruct the target to initiate the given inclusion step for the given node */\n public async initiateStep(nodeId: number, step: InclusionControllerStep): Promise<void> {\n this.assertSupportsCommand(InclusionControllerCommand, InclusionControllerCommand.Initiate);\n const cc = new InclusionControllerCCInitiate({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n includedNodeId: nodeId,\n step,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n /** Indicate to the other node that the given inclusion step has been completed */\n public async completeStep(step: InclusionControllerStep, status: InclusionControllerStatus): Promise<void> {\n this.assertSupportsCommand(InclusionControllerCommand, InclusionControllerCommand.Complete);\n const cc = new InclusionControllerCCComplete({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n step,\n status,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n// @publicAPI\nexport interface InclusionControllerCCCompleteOptions {\n step: InclusionControllerStep;\n status: InclusionControllerStatus;\n}\n@CCCommand(InclusionControllerCommand.Complete)\nexport class InclusionControllerCCComplete extends InclusionControllerCC {\n public constructor(options: WithAddress<InclusionControllerCCCompleteOptions>) {\n super(options);\n this.step = options.step;\n this.status = options.status;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): InclusionControllerCCComplete {\n validatePayload(raw.payload.length >= 2);\n const step: InclusionControllerStep = raw.payload[0];\n validatePayload.withReason(\"Invalid inclusion controller step\")(step in InclusionControllerStep);\n const status: InclusionControllerStatus = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n step,\n status,\n });\n }\n public step: InclusionControllerStep;\n public status: InclusionControllerStatus;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.step, this.status]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n step: getEnumMemberName(InclusionControllerStep, this.step),\n status: getEnumMemberName(InclusionControllerStatus, this.status),\n },\n };\n }\n}\n// @publicAPI\nexport interface InclusionControllerCCInitiateOptions {\n includedNodeId: number;\n step: InclusionControllerStep;\n}\n@CCCommand(InclusionControllerCommand.Initiate)\nexport class InclusionControllerCCInitiate extends InclusionControllerCC {\n public constructor(options: WithAddress<InclusionControllerCCInitiateOptions>) {\n super(options);\n this.includedNodeId = options.includedNodeId;\n this.step = options.step;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): InclusionControllerCCInitiate {\n validatePayload(raw.payload.length >= 2);\n const includedNodeId = raw.payload[0];\n const step: InclusionControllerStep = raw.payload[1];\n validatePayload.withReason(\"Invalid inclusion controller step\")(step in InclusionControllerStep);\n return new this({\n nodeId: ctx.sourceNodeId,\n includedNodeId,\n step,\n });\n }\n public includedNodeId: number;\n public step: InclusionControllerStep;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.includedNodeId, this.step]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"included node id\": this.includedNodeId,\n step: getEnumMemberName(InclusionControllerStep, this.step),\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkI;AAClI,oBAAyC;AACzC,iBAAsB;AACtB,0BAAyC;AACzC,oCAAkE;AAClE,mBAAgG;IAMnF,yBAAqB,MAAA;8BAFjC,4CAAa,2BAAe,sBAAsB,CAAC,OACnD,kDAAmB,CAAC,CAAC;;;;oBACqB;6CAAA,YAAY;WAAA;;;;;;;;AAAvD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;IAIA,4BAAwB,MAAA;8BADpC,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACE;gDAAA,YAAK;WAAA;;;;;;;;AAAnD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAgB,KAA+B;AAClD,cAAQ,KAAK;QACT,KAAK,wCAA2B;QAChC,KAAK,wCAA2B;AAC5B,iBAAO;MACf;AACA,aAAO,MAAM,gBAAgB,GAAG;IACpC;;IAEO,MAAM,aAAa,QAAgB,MAA6B;AACnE,WAAK,sBAAsB,yCAA4B,wCAA2B,QAAQ;AAC1F,YAAM,KAAK,IAAI,8BAA8B;QACzC,QAAQ,KAAK,SAAS;QACtB,eAAe,KAAK,SAAS;QAC7B,gBAAgB;QAChB;OACH;AACD,YAAM,KAAK,KAAK,YAAY,IAAI,KAAK,cAAc;IACvD;;IAEO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AAAxE,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAA0D;AACzE,YAAM,OAAO;AACb,WAAK,iBAAiB,QAAQ;AAC9B,WAAK,OAAO,QAAQ;IACxB;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,iBAAiB,IAAI,QAAQ,CAAC;AACpC,YAAM,OAAgC,IAAI,QAAQ,CAAC;AACnD,kCAAgB,WAAW,mCAAmC,EAAE,QAAQ,oCAAuB;AAC/F,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;QACA;OACH;IACL;IACO;IACA;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,gBAAgB,KAAK,IAAI,CAAC;AAC1D,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,oBAAoB,KAAK;UACzB,UAAM,iCAAkB,sCAAyB,KAAK,IAAI;;;IAGtE;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EndpointId, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { Bytes } from "@zwave-js/shared";
|
|
3
3
|
import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
|
|
4
|
-
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
4
|
+
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
5
5
|
import { IndicatorCommand, type IndicatorTimeout } from "../lib/_Types.js";
|
|
6
6
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
7
7
|
import { IndicatorCCValues } from "./_CCValues.generated.js";
|
|
@@ -42,7 +42,7 @@ export declare class IndicatorCCAPI extends CCAPI {
|
|
|
42
42
|
export declare class IndicatorCC extends CommandClass {
|
|
43
43
|
ccCommand: IndicatorCommand;
|
|
44
44
|
interview(ctx: InterviewContext): Promise<void>;
|
|
45
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
45
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
46
46
|
translatePropertyKey(ctx: GetValueDB, property: string | number, propertyKey: string | number): string | undefined;
|
|
47
47
|
translateProperty(ctx: GetValueDB, property: string | number, propertyKey?: string | number): string;
|
|
48
48
|
protected supportsV2Indicators(ctx: GetValueDB): boolean;
|
|
@@ -42,6 +42,7 @@ __export(IndicatorCC_exports, {
|
|
|
42
42
|
shouldExposeIndicatorValue: () => shouldExposeIndicatorValue
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(IndicatorCC_exports);
|
|
45
|
+
var import_tslib = require("tslib");
|
|
45
46
|
var __validateArgs = __toESM(require("./IndicatorCC._validateArgs.js"), 1);
|
|
46
47
|
var import_core = require("@zwave-js/core");
|
|
47
48
|
var import_shared = require("@zwave-js/shared");
|
|
@@ -52,46 +53,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
52
53
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
53
54
|
var import_Types = require("../lib/_Types.js");
|
|
54
55
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
55
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
56
|
-
var useValue = arguments.length > 2;
|
|
57
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
58
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
59
|
-
}
|
|
60
|
-
return useValue ? value : void 0;
|
|
61
|
-
};
|
|
62
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
63
|
-
function accept(f) {
|
|
64
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
65
|
-
return f;
|
|
66
|
-
}
|
|
67
|
-
__name(accept, "accept");
|
|
68
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
69
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
70
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
71
|
-
var _, done = false;
|
|
72
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
73
|
-
var context = {};
|
|
74
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
75
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
76
|
-
context.addInitializer = function(f) {
|
|
77
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
78
|
-
extraInitializers.push(accept(f || null));
|
|
79
|
-
};
|
|
80
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
81
|
-
if (kind === "accessor") {
|
|
82
|
-
if (result === void 0) continue;
|
|
83
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
84
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
85
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
86
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
87
|
-
} else if (_ = accept(result)) {
|
|
88
|
-
if (kind === "field") initializers.unshift(_);
|
|
89
|
-
else descriptor[key] = _;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
93
|
-
done = true;
|
|
94
|
-
};
|
|
95
56
|
const { validateArgs_IndicatorCCAPI_get, validateArgs_IndicatorCCAPI_set, validateArgs_IndicatorCCAPI_sendReport, validateArgs_IndicatorCCAPI_getSupported, validateArgs_IndicatorCCAPI_reportSupported, validateArgs_IndicatorCCAPI_reportDescription, validateArgs_IndicatorCCAPI_setTimeout, validateArgs_IndicatorCCAPI_getTimeout, validateArgs_IndicatorCCAPI_getDescription } = __validateArgs;
|
|
96
57
|
function isManufacturerDefinedIndicator(indicatorId) {
|
|
97
58
|
return indicatorId >= 128 && indicatorId <= 159;
|
|
@@ -244,19 +205,19 @@ let IndicatorCCAPI = (() => {
|
|
|
244
205
|
_setTimeout_decorators = [validateArgs_IndicatorCCAPI_setTimeout()];
|
|
245
206
|
_getTimeout_decorators = [validateArgs_IndicatorCCAPI_getTimeout()];
|
|
246
207
|
_getDescription_decorators = [validateArgs_IndicatorCCAPI_getDescription()];
|
|
247
|
-
__esDecorate(this, null, _get_decorators, { kind: "method", name: "get", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "get" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.get, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
248
|
-
__esDecorate(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
249
|
-
__esDecorate(this, null, _sendReport_decorators, { kind: "method", name: "sendReport", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendReport" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendReport, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
250
|
-
__esDecorate(this, null, _getSupported_decorators, { kind: "method", name: "getSupported", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getSupported" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getSupported, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
251
|
-
__esDecorate(this, null, _reportSupported_decorators, { kind: "method", name: "reportSupported", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "reportSupported" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.reportSupported, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
252
|
-
__esDecorate(this, null, _reportDescription_decorators, { kind: "method", name: "reportDescription", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "reportDescription" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.reportDescription, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
253
|
-
__esDecorate(this, null, _setTimeout_decorators, { kind: "method", name: "setTimeout", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "setTimeout" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.setTimeout, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
254
|
-
__esDecorate(this, null, _getTimeout_decorators, { kind: "method", name: "getTimeout", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getTimeout" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getTimeout, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
255
|
-
__esDecorate(this, null, _getDescription_decorators, { kind: "method", name: "getDescription", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getDescription" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getDescription, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
256
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
208
|
+
(0, import_tslib.__esDecorate)(this, null, _get_decorators, { kind: "method", name: "get", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "get" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.get, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
209
|
+
(0, import_tslib.__esDecorate)(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
210
|
+
(0, import_tslib.__esDecorate)(this, null, _sendReport_decorators, { kind: "method", name: "sendReport", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendReport" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendReport, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
211
|
+
(0, import_tslib.__esDecorate)(this, null, _getSupported_decorators, { kind: "method", name: "getSupported", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getSupported" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getSupported, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
212
|
+
(0, import_tslib.__esDecorate)(this, null, _reportSupported_decorators, { kind: "method", name: "reportSupported", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "reportSupported" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.reportSupported, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
213
|
+
(0, import_tslib.__esDecorate)(this, null, _reportDescription_decorators, { kind: "method", name: "reportDescription", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "reportDescription" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.reportDescription, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
214
|
+
(0, import_tslib.__esDecorate)(this, null, _setTimeout_decorators, { kind: "method", name: "setTimeout", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "setTimeout" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.setTimeout, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
215
|
+
(0, import_tslib.__esDecorate)(this, null, _getTimeout_decorators, { kind: "method", name: "getTimeout", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getTimeout" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getTimeout, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
216
|
+
(0, import_tslib.__esDecorate)(this, null, _getDescription_decorators, { kind: "method", name: "getDescription", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getDescription" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getDescription, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
217
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
257
218
|
IndicatorCCAPI2 = _classThis = _classDescriptor.value;
|
|
258
219
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
259
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
220
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
260
221
|
}
|
|
261
222
|
supportsCommand(cmd) {
|
|
262
223
|
switch (cmd) {
|
|
@@ -529,7 +490,7 @@ let IndicatorCCAPI = (() => {
|
|
|
529
490
|
}
|
|
530
491
|
constructor() {
|
|
531
492
|
super(...arguments);
|
|
532
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
493
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
533
494
|
}
|
|
534
495
|
};
|
|
535
496
|
return IndicatorCCAPI2 = _classThis;
|
|
@@ -549,10 +510,10 @@ let IndicatorCC = (() => {
|
|
|
549
510
|
}
|
|
550
511
|
static {
|
|
551
512
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
552
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
513
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
553
514
|
IndicatorCC2 = _classThis = _classDescriptor.value;
|
|
554
515
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
555
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
516
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
556
517
|
}
|
|
557
518
|
async interview(ctx) {
|
|
558
519
|
const node = this.getNode(ctx);
|
|
@@ -612,11 +573,11 @@ let IndicatorCC = (() => {
|
|
|
612
573
|
await this.refreshValues(ctx);
|
|
613
574
|
this.setInterviewComplete(ctx, true);
|
|
614
575
|
}
|
|
615
|
-
async refreshValues(ctx) {
|
|
576
|
+
async refreshValues(ctx, options) {
|
|
616
577
|
const node = this.getNode(ctx);
|
|
617
578
|
const endpoint = this.getEndpoint(ctx);
|
|
618
579
|
const api = import_API.CCAPI.create(import_core.CommandClasses.Indicator, ctx, endpoint).withOptions({
|
|
619
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
580
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
620
581
|
});
|
|
621
582
|
if (api.version === 1) {
|
|
622
583
|
ctx.logNode(node.id, {
|
|
@@ -690,10 +651,10 @@ let IndicatorCCSet = (() => {
|
|
|
690
651
|
}
|
|
691
652
|
static {
|
|
692
653
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
693
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
654
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
694
655
|
IndicatorCCSet2 = _classThis = _classDescriptor.value;
|
|
695
656
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
696
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
657
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
697
658
|
}
|
|
698
659
|
constructor(options) {
|
|
699
660
|
super(options);
|
|
@@ -782,10 +743,10 @@ let IndicatorCCReport = (() => {
|
|
|
782
743
|
}
|
|
783
744
|
static {
|
|
784
745
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
785
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
746
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
786
747
|
IndicatorCCReport2 = _classThis = _classDescriptor.value;
|
|
787
748
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
788
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
749
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
789
750
|
}
|
|
790
751
|
constructor(options) {
|
|
791
752
|
super(options);
|
|
@@ -951,10 +912,10 @@ let IndicatorCCGet = (() => {
|
|
|
951
912
|
}
|
|
952
913
|
static {
|
|
953
914
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
954
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
915
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
955
916
|
IndicatorCCGet2 = _classThis = _classDescriptor.value;
|
|
956
917
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
957
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
918
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
958
919
|
}
|
|
959
920
|
constructor(options) {
|
|
960
921
|
super(options);
|
|
@@ -1003,10 +964,10 @@ let IndicatorCCSupportedReport = (() => {
|
|
|
1003
964
|
}
|
|
1004
965
|
static {
|
|
1005
966
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1006
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
967
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1007
968
|
IndicatorCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
1008
969
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1009
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
970
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
1010
971
|
}
|
|
1011
972
|
constructor(options) {
|
|
1012
973
|
super(options);
|
|
@@ -1088,10 +1049,10 @@ let IndicatorCCSupportedGet = (() => {
|
|
|
1088
1049
|
}
|
|
1089
1050
|
static {
|
|
1090
1051
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1091
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1052
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1092
1053
|
IndicatorCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
1093
1054
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1094
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
1055
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
1095
1056
|
}
|
|
1096
1057
|
constructor(options) {
|
|
1097
1058
|
super(options);
|
|
@@ -1136,10 +1097,10 @@ let IndicatorCCDescriptionReport = (() => {
|
|
|
1136
1097
|
}
|
|
1137
1098
|
static {
|
|
1138
1099
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1139
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1100
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1140
1101
|
IndicatorCCDescriptionReport2 = _classThis = _classDescriptor.value;
|
|
1141
1102
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1142
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
1103
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
1143
1104
|
}
|
|
1144
1105
|
constructor(options) {
|
|
1145
1106
|
super(options);
|
|
@@ -1207,10 +1168,10 @@ let IndicatorCCDescriptionGet = (() => {
|
|
|
1207
1168
|
}
|
|
1208
1169
|
static {
|
|
1209
1170
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1210
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1171
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
1211
1172
|
IndicatorCCDescriptionGet2 = _classThis = _classDescriptor.value;
|
|
1212
1173
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1213
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
1174
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
1214
1175
|
}
|
|
1215
1176
|
constructor(options) {
|
|
1216
1177
|
super(options);
|