@zwave-js/cc 15.0.0-beta.0 → 15.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +79 -161
- package/build/cjs/cc/AlarmSensorCC.js +12 -50
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +63 -199
- package/build/cjs/cc/AssociationCC.js +9 -22
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/cjs/cc/AssociationGroupInfoCC.js +11 -22
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/cjs/cc/BarrierOperatorCC.js +12 -44
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +85 -331
- package/build/cjs/cc/BasicCC.js +15 -46
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.d.ts +237 -835
- package/build/cjs/cc/BatteryCC.js +7 -84
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +34 -99
- package/build/cjs/cc/BinarySensorCC.js +9 -29
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +45 -197
- package/build/cjs/cc/BinarySwitchCC.js +6 -22
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +77 -296
- package/build/cjs/cc/CentralSceneCC.js +7 -30
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/cjs/cc/ClimateControlScheduleCC.js +5 -24
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +130 -457
- package/build/cjs/cc/ColorSwitchCC.js +23 -75
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +32 -100
- package/build/cjs/cc/ConfigurationCC.js +11 -31
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC.d.ts +512 -1823
- package/build/cjs/cc/DoorLockCC.js +51 -156
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/cjs/cc/DoorLockLoggingCC.js +4 -8
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +14 -29
- package/build/cjs/cc/EnergyProductionCC.js +5 -17
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +73 -324
- package/build/cjs/cc/EntryControlCC.js +9 -36
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +5 -26
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/cjs/cc/HumidityControlModeCC.js +6 -15
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -12
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/cjs/cc/HumidityControlSetpointCC.js +10 -28
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +123 -365
- package/build/cjs/cc/IndicatorCC.js +15 -61
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +826 -2317
- package/build/cjs/cc/IrrigationCC.js +29 -233
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +31 -133
- package/build/cjs/cc/LanguageCC.js +4 -15
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +14 -64
- package/build/cjs/cc/LockCC.js +4 -12
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/cjs/cc/ManufacturerSpecificCC.js +5 -26
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.d.ts +119 -393
- package/build/cjs/cc/MeterCC.js +25 -69
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/cjs/cc/MultiChannelAssociationCC.js +10 -23
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +119 -499
- package/build/cjs/cc/MultiChannelCC.js +18 -46
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/cjs/cc/MultilevelSensorCC.js +12 -33
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/cjs/cc/MultilevelSwitchCC.js +13 -107
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +33 -135
- package/build/cjs/cc/NodeNamingCC.js +5 -16
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +262 -702
- package/build/cjs/cc/NotificationCC.js +29 -112
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +118 -524
- package/build/cjs/cc/ProtectionCC.js +15 -50
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +33 -132
- package/build/cjs/cc/SceneActivationCC.js +4 -17
- package/build/cjs/cc/SceneActivationCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +9 -21
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/cjs/cc/SceneControllerConfigurationCC.js +10 -22
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/cjs/cc/ScheduleEntryLockCC.js +13 -30
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +72 -261
- package/build/cjs/cc/SoundSwitchCC.js +11 -43
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +17 -33
- package/build/cjs/cc/SupervisionCC.js +4 -9
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatFanModeCC.js +8 -21
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatFanStateCC.js +4 -12
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +44 -195
- package/build/cjs/cc/ThermostatModeCC.js +8 -21
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/cjs/cc/ThermostatOperatingStateCC.js +4 -12
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/cjs/cc/ThermostatSetpointCC.js +10 -25
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.d.ts +12 -63
- package/build/cjs/cc/TimeParametersCC.js +4 -11
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC.d.ts +311 -1066
- package/build/cjs/cc/UserCodeCC.js +33 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +289 -1003
- package/build/cjs/cc/VersionCC.js +7 -98
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +49 -201
- package/build/cjs/cc/WakeUpCC.js +6 -26
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.d.ts +126 -220
- package/build/cjs/cc/WindowCoveringCC.js +16 -128
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.d.ts +69 -329
- package/build/cjs/cc/ZWavePlusCC.js +4 -25
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/_CCValues.generated.d.ts +15814 -0
- package/build/cjs/cc/_CCValues.generated.js +8723 -0
- package/build/cjs/cc/_CCValues.generated.js.map +7 -0
- package/build/cjs/lib/CCValueUtils.d.ts +14 -0
- package/build/cjs/lib/CCValueUtils.js +93 -0
- package/build/cjs/lib/CCValueUtils.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +6 -105
- package/build/cjs/lib/Values.js +13 -107
- package/build/cjs/lib/Values.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts +79 -161
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +2 -39
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +63 -199
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +2 -14
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +66 -166
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +2 -13
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +86 -294
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +2 -34
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +85 -331
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +2 -32
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +237 -835
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +2 -78
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +34 -99
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +2 -16
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +45 -197
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +2 -17
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +77 -296
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +2 -26
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +45 -160
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +2 -23
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +130 -457
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +2 -52
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +32 -100
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +2 -15
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +512 -1823
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +9 -127
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +11 -63
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +2 -5
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +14 -29
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +2 -13
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +73 -324
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +2 -28
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +78 -390
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -23
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +31 -131
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +2 -10
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -9
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +51 -128
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +2 -19
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +123 -365
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +2 -43
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +826 -2317
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -222
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +31 -133
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +2 -12
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +14 -64
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +2 -9
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +0 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +77 -239
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +2 -24
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +119 -393
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -49
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +66 -166
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +2 -14
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +119 -499
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +2 -30
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +46 -130
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +2 -22
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +160 -525
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +5 -101
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +33 -135
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +2 -12
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +262 -702
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +3 -85
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +118 -524
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +2 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +33 -132
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +2 -14
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -14
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +34 -61
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +2 -14
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +95 -299
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +2 -17
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +72 -261
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +2 -33
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +17 -33
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +2 -7
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +2 -14
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +2 -9
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +44 -195
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +2 -14
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +17 -65
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +2 -9
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +49 -129
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +2 -16
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +12 -63
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +2 -8
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +311 -1066
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +2 -60
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +289 -1003
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +2 -92
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +49 -201
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +2 -21
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +126 -220
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -103
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +69 -329
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +2 -25
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +15814 -0
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -0
- package/build/esm/cc/_CCValues.generated.js +9187 -0
- package/build/esm/cc/_CCValues.generated.js.map +1 -0
- package/build/esm/lib/CCValueUtils.d.ts +14 -0
- package/build/esm/lib/CCValueUtils.d.ts.map +1 -0
- package/build/esm/lib/CCValueUtils.js +62 -0
- package/build/esm/lib/CCValueUtils.js.map +1 -0
- package/build/esm/lib/Values.d.ts +6 -105
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +7 -104
- package/build/esm/lib/Values.js.map +1 -1
- package/package.json +9 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/CentralSceneCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tgetCCName,\n\tmaybeUnknownToString,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { CentralSceneCommand, CentralSceneKeys } from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\n\nexport const CentralSceneCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Central Scene\"], {\n\t\t...V.staticProperty(\"sceneCount\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportsSlowRefresh\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedKeyAttributes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\n\t\t...V.staticProperty(\n\t\t\t\"slowRefresh\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Send held down notifications at a slow rate\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"When this is true, KeyHeldDown notifications are sent every 55s. When this is false, the notifications are sent every 200ms.\",\n\t\t\t} as const,\n\t\t),\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Central Scene\"], {\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"scene\",\n\t\t\t\"scene\",\n\t\t\t(sceneNumber: number) => sceneNumber.toString().padStart(3, \"0\"),\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"scene\"\n\t\t\t\t&& typeof propertyKey === \"string\"\n\t\t\t\t&& /^\\d{3}$/.test(propertyKey),\n\t\t\t(sceneNumber: number) => ({\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: `Scene ${sceneNumber.toString().padStart(3, \"0\")}`,\n\t\t\t} as const),\n\t\t\t{ stateful: false } as const,\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Central Scene\"])\nexport class CentralSceneCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase CentralSceneCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast(); // this is mandatory\n\t\t\tcase CentralSceneCommand.ConfigurationGet:\n\t\t\t\treturn this.version >= 3 && this.isSinglecast();\n\t\t\tcase CentralSceneCommand.ConfigurationSet:\n\t\t\t\treturn this.version >= 3;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tCentralSceneCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"sceneCount\",\n\t\t\t\t\"supportsSlowRefresh\",\n\t\t\t\t\"supportedKeyAttributes\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tCentralSceneCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"slowRefresh\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tslowRefresh: boolean,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.ConfigurationSet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tslowRefresh,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: CentralSceneCCAPI, { property }, value) {\n\t\t\tif (property !== \"slowRefresh\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn this.setConfiguration(value);\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: CentralSceneCCAPI, { property }) {\n\t\t\tif (property === \"slowRefresh\") {\n\t\t\t\treturn (await this.getConfiguration())?.[property];\n\t\t\t}\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n}\n\n@commandClass(CommandClasses[\"Central Scene\"])\n@implementedVersion(3)\n@ccValues(CentralSceneCCValues)\nexport class CentralSceneCC extends CommandClass {\n\tdeclare ccCommand: CentralSceneCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses.Association,\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t];\n\t}\n\n\tpublic skipEndpointInterview(): boolean {\n\t\t// Central scene notifications are issued by the root device\n\t\treturn true;\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Central Scene\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// If one Association group issues CentralScene notifications,\n\t\t// we must associate ourselves with that channel\n\t\ttry {\n\t\t\tawait ccUtils.assignLifelineIssueingCommand(\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t\tthis.ccId,\n\t\t\t\tCentralSceneCommand.Notification,\n\t\t\t);\n\t\t} catch {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\tgetCCName(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t)\n\t\t\t\t} commands failed!`,\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"Querying supported scenes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst ccSupported = await api.getSupported();\n\t\tif (ccSupported) {\n\t\t\tconst logMessage = `received supported scenes:\n# of scenes: ${ccSupported.sceneCount}\nsupports slow refresh: ${ccSupported.supportsSlowRefresh}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported scenes timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\t// The slow refresh capability should be enabled whenever possible\n\t\tif (api.version >= 3 && ccSupported?.supportsSlowRefresh) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"Enabling slow refresh capability...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait api.setConfiguration(true);\n\t\t}\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n}\n\n// @publicAPI\nexport interface CentralSceneCCNotificationOptions {\n\tsequenceNumber: number;\n\tkeyAttribute: CentralSceneKeys;\n\tsceneNumber: number;\n\tslowRefresh?: boolean;\n}\n\n@CCCommand(CentralSceneCommand.Notification)\nexport class CentralSceneCCNotification extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCNotificationOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sequenceNumber = options.sequenceNumber;\n\t\tthis.keyAttribute = options.keyAttribute;\n\t\tthis.sceneNumber = options.sceneNumber;\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCNotification {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst sequenceNumber = raw.payload[0];\n\t\tconst keyAttribute: CentralSceneKeys = raw.payload[1] & 0b111;\n\t\tconst sceneNumber = raw.payload[2];\n\t\tlet slowRefresh: boolean | undefined;\n\t\tif (keyAttribute === CentralSceneKeys.KeyHeldDown) {\n\t\t\t// A receiving node MUST ignore this field if the command is not\n\t\t\t// carrying the Key Held Down key attribute.\n\t\t\tslowRefresh = !!(raw.payload[1] & 0b1000_0000);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsequenceNumber,\n\t\t\tkeyAttribute,\n\t\t\tsceneNumber,\n\t\t\tslowRefresh,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// In case the interview is not yet completed, we still create some basic metadata\n\t\tconst sceneValue = CentralSceneCCValues.scene(this.sceneNumber);\n\t\tthis.ensureMetadata(ctx, sceneValue);\n\n\t\t// The spec behavior is pretty complicated, so we cannot just store\n\t\t// the value and call it a day. Handling of these notifications will\n\t\t// happen in the receiving node class\n\n\t\treturn true;\n\t}\n\n\tpublic readonly sequenceNumber: number;\n\tpublic readonly keyAttribute: CentralSceneKeys;\n\tpublic readonly sceneNumber: number;\n\tpublic readonly slowRefresh: boolean | undefined;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"sequence number\": this.sequenceNumber,\n\t\t\t\"key attribute\": getEnumMemberName(\n\t\t\t\tCentralSceneKeys,\n\t\t\t\tthis.keyAttribute,\n\t\t\t),\n\t\t\t\"scene number\": this.sceneNumber,\n\t\t};\n\t\tif (this.slowRefresh != undefined) {\n\t\t\tmessage[\"slow refresh\"] = this.slowRefresh;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface CentralSceneCCSupportedReportOptions {\n\tsceneCount: number;\n\tsupportsSlowRefresh: MaybeNotKnown<boolean>;\n\tsupportedKeyAttributes: Record<number, readonly CentralSceneKeys[]>;\n}\n\n@CCCommand(CentralSceneCommand.SupportedReport)\n@ccValueProperty(\"sceneCount\", CentralSceneCCValues.sceneCount)\n@ccValueProperty(\n\t\"supportsSlowRefresh\",\n\tCentralSceneCCValues.supportsSlowRefresh,\n)\n@ccValueProperty(\n\t\"supportedKeyAttributes\",\n\tCentralSceneCCValues.supportedKeyAttributes,\n)\nexport class CentralSceneCCSupportedReport extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sceneCount = options.sceneCount;\n\t\tthis.supportsSlowRefresh = options.supportsSlowRefresh;\n\t\tfor (\n\t\t\tconst [scene, keys] of Object.entries(\n\t\t\t\toptions.supportedKeyAttributes,\n\t\t\t)\n\t\t) {\n\t\t\tthis._supportedKeyAttributes.set(\n\t\t\t\tparseInt(scene),\n\t\t\t\tkeys,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst sceneCount = raw.payload[0];\n\t\tconst supportsSlowRefresh: MaybeNotKnown<boolean> =\n\t\t\t!!(raw.payload[1] & 0b1000_0000);\n\t\tconst bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;\n\t\tconst identicalKeyAttributes = !!(raw.payload[1] & 0b1);\n\t\tconst numEntries = identicalKeyAttributes ? 1 : sceneCount;\n\t\tvalidatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);\n\t\tconst supportedKeyAttributes: Record<\n\t\t\tnumber,\n\t\t\treadonly CentralSceneKeys[]\n\t\t> = {};\n\t\tfor (let i = 0; i < numEntries; i++) {\n\t\t\tconst mask = raw.payload.subarray(\n\t\t\t\t2 + i * bitMaskBytes,\n\t\t\t\t2 + (i + 1) * bitMaskBytes,\n\t\t\t);\n\t\t\tsupportedKeyAttributes[i + 1] = parseBitMask(\n\t\t\t\tmask,\n\t\t\t\tCentralSceneKeys.KeyPressed,\n\t\t\t);\n\t\t}\n\n\t\tif (identicalKeyAttributes) {\n\t\t\t// The key attributes are only transmitted for scene 1, copy them to the others\n\t\t\tfor (let i = 2; i <= sceneCount; i++) {\n\t\t\t\tsupportedKeyAttributes[i] = supportedKeyAttributes[1];\n\t\t\t}\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneCount,\n\t\t\tsupportsSlowRefresh,\n\t\t\tsupportedKeyAttributes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Create/extend metadata for all scenes\n\t\tfor (let i = 1; i <= this.sceneCount; i++) {\n\t\t\tconst sceneValue = CentralSceneCCValues.scene(i);\n\t\t\tthis.setMetadata(ctx, sceneValue, {\n\t\t\t\t...sceneValue.meta,\n\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\tCentralSceneKeys,\n\t\t\t\t\tthis._supportedKeyAttributes.get(i),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly sceneCount: number;\n\n\t// TODO: Only offer `slowRefresh` if this is true\n\n\tpublic readonly supportsSlowRefresh: MaybeNotKnown<boolean>;\n\n\tprivate _supportedKeyAttributes = new Map<\n\t\tnumber,\n\t\treadonly CentralSceneKeys[]\n\t>();\n\n\tpublic get supportedKeyAttributes(): ReadonlyMap<\n\t\tnumber,\n\t\treadonly CentralSceneKeys[]\n\t> {\n\t\treturn this._supportedKeyAttributes;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"scene count\": this.sceneCount,\n\t\t\t\"supports slow refresh\": maybeUnknownToString(\n\t\t\t\tthis.supportsSlowRefresh,\n\t\t\t),\n\t\t};\n\t\tfor (const [scene, keys] of this.supportedKeyAttributes) {\n\t\t\tmessage[`supported attributes (scene #${scene})`] = keys\n\t\t\t\t.map((k) => `\\n\u00B7 ${getEnumMemberName(CentralSceneKeys, k)}`)\n\t\t\t\t.join(\"\");\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(CentralSceneCommand.SupportedGet)\n@expectedCCResponse(CentralSceneCCSupportedReport)\nexport class CentralSceneCCSupportedGet extends CentralSceneCC {}\n\n// @publicAPI\nexport interface CentralSceneCCConfigurationReportOptions {\n\tslowRefresh: boolean;\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationReport)\n@ccValueProperty(\"slowRefresh\", CentralSceneCCValues.slowRefresh)\nexport class CentralSceneCCConfigurationReport extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst slowRefresh = !!(raw.payload[0] & 0b1000_0000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tslowRefresh,\n\t\t});\n\t}\n\n\tpublic readonly slowRefresh: boolean;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"slow refresh\": this.slowRefresh },\n\t\t};\n\t}\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationGet)\n@expectedCCResponse(CentralSceneCCConfigurationReport)\nexport class CentralSceneCCConfigurationGet extends CentralSceneCC {}\n\n// @publicAPI\nexport interface CentralSceneCCConfigurationSetOptions {\n\tslowRefresh: boolean;\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationSet)\n@useSupervision()\nexport class CentralSceneCCConfigurationSet extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): CentralSceneCCConfigurationSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new CentralSceneCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic slowRefresh: boolean;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.slowRefresh ? 0b1000_0000 : 0]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"slow refresh\": this.slowRefresh },\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAKO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAAsD;AACtD,cAAyB
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tgetCCName,\n\tmaybeUnknownToString,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { CentralSceneCommand, CentralSceneKeys } from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\n\nexport const CentralSceneCCValues = V.defineCCValues(\n\tCommandClasses[\"Central Scene\"],\n\t{\n\t\t...V.staticProperty(\"sceneCount\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportsSlowRefresh\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedKeyAttributes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\n\t\t\t\"slowRefresh\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Send held down notifications at a slow rate\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"When this is true, KeyHeldDown notifications are sent every 55s. When this is false, the notifications are sent every 200ms.\",\n\t\t\t} as const,\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"scene\",\n\t\t\t\"scene\",\n\t\t\t(sceneNumber: number) => sceneNumber.toString().padStart(3, \"0\"),\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"scene\"\n\t\t\t\t&& typeof propertyKey === \"string\"\n\t\t\t\t&& /^\\d{3}$/.test(propertyKey),\n\t\t\t(sceneNumber: number) => ({\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: `Scene ${sceneNumber.toString().padStart(3, \"0\")}`,\n\t\t\t} as const),\n\t\t\t{ stateful: false } as const,\n\t\t),\n\t},\n);\n\n@API(CommandClasses[\"Central Scene\"])\nexport class CentralSceneCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase CentralSceneCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast(); // this is mandatory\n\t\t\tcase CentralSceneCommand.ConfigurationGet:\n\t\t\t\treturn this.version >= 3 && this.isSinglecast();\n\t\t\tcase CentralSceneCommand.ConfigurationSet:\n\t\t\t\treturn this.version >= 3;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tCentralSceneCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"sceneCount\",\n\t\t\t\t\"supportsSlowRefresh\",\n\t\t\t\t\"supportedKeyAttributes\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tCentralSceneCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"slowRefresh\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tslowRefresh: boolean,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.ConfigurationSet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tslowRefresh,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: CentralSceneCCAPI, { property }, value) {\n\t\t\tif (property !== \"slowRefresh\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn this.setConfiguration(value);\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: CentralSceneCCAPI, { property }) {\n\t\t\tif (property === \"slowRefresh\") {\n\t\t\t\treturn (await this.getConfiguration())?.[property];\n\t\t\t}\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n}\n\n@commandClass(CommandClasses[\"Central Scene\"])\n@implementedVersion(3)\n@ccValues(CentralSceneCCValues)\nexport class CentralSceneCC extends CommandClass {\n\tdeclare ccCommand: CentralSceneCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses.Association,\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t];\n\t}\n\n\tpublic skipEndpointInterview(): boolean {\n\t\t// Central scene notifications are issued by the root device\n\t\treturn true;\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Central Scene\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// If one Association group issues CentralScene notifications,\n\t\t// we must associate ourselves with that channel\n\t\ttry {\n\t\t\tawait ccUtils.assignLifelineIssueingCommand(\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t\tthis.ccId,\n\t\t\t\tCentralSceneCommand.Notification,\n\t\t\t);\n\t\t} catch {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\tgetCCName(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t)\n\t\t\t\t} commands failed!`,\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"Querying supported scenes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst ccSupported = await api.getSupported();\n\t\tif (ccSupported) {\n\t\t\tconst logMessage = `received supported scenes:\n# of scenes: ${ccSupported.sceneCount}\nsupports slow refresh: ${ccSupported.supportsSlowRefresh}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported scenes timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\t// The slow refresh capability should be enabled whenever possible\n\t\tif (api.version >= 3 && ccSupported?.supportsSlowRefresh) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"Enabling slow refresh capability...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait api.setConfiguration(true);\n\t\t}\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n}\n\n// @publicAPI\nexport interface CentralSceneCCNotificationOptions {\n\tsequenceNumber: number;\n\tkeyAttribute: CentralSceneKeys;\n\tsceneNumber: number;\n\tslowRefresh?: boolean;\n}\n\n@CCCommand(CentralSceneCommand.Notification)\nexport class CentralSceneCCNotification extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCNotificationOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sequenceNumber = options.sequenceNumber;\n\t\tthis.keyAttribute = options.keyAttribute;\n\t\tthis.sceneNumber = options.sceneNumber;\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCNotification {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst sequenceNumber = raw.payload[0];\n\t\tconst keyAttribute: CentralSceneKeys = raw.payload[1] & 0b111;\n\t\tconst sceneNumber = raw.payload[2];\n\t\tlet slowRefresh: boolean | undefined;\n\t\tif (keyAttribute === CentralSceneKeys.KeyHeldDown) {\n\t\t\t// A receiving node MUST ignore this field if the command is not\n\t\t\t// carrying the Key Held Down key attribute.\n\t\t\tslowRefresh = !!(raw.payload[1] & 0b1000_0000);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsequenceNumber,\n\t\t\tkeyAttribute,\n\t\t\tsceneNumber,\n\t\t\tslowRefresh,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// In case the interview is not yet completed, we still create some basic metadata\n\t\tconst sceneValue = CentralSceneCCValues.scene(this.sceneNumber);\n\t\tthis.ensureMetadata(ctx, sceneValue);\n\n\t\t// The spec behavior is pretty complicated, so we cannot just store\n\t\t// the value and call it a day. Handling of these notifications will\n\t\t// happen in the receiving node class\n\n\t\treturn true;\n\t}\n\n\tpublic readonly sequenceNumber: number;\n\tpublic readonly keyAttribute: CentralSceneKeys;\n\tpublic readonly sceneNumber: number;\n\tpublic readonly slowRefresh: boolean | undefined;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"sequence number\": this.sequenceNumber,\n\t\t\t\"key attribute\": getEnumMemberName(\n\t\t\t\tCentralSceneKeys,\n\t\t\t\tthis.keyAttribute,\n\t\t\t),\n\t\t\t\"scene number\": this.sceneNumber,\n\t\t};\n\t\tif (this.slowRefresh != undefined) {\n\t\t\tmessage[\"slow refresh\"] = this.slowRefresh;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface CentralSceneCCSupportedReportOptions {\n\tsceneCount: number;\n\tsupportsSlowRefresh: MaybeNotKnown<boolean>;\n\tsupportedKeyAttributes: Record<number, readonly CentralSceneKeys[]>;\n}\n\n@CCCommand(CentralSceneCommand.SupportedReport)\n@ccValueProperty(\"sceneCount\", CentralSceneCCValues.sceneCount)\n@ccValueProperty(\n\t\"supportsSlowRefresh\",\n\tCentralSceneCCValues.supportsSlowRefresh,\n)\n@ccValueProperty(\n\t\"supportedKeyAttributes\",\n\tCentralSceneCCValues.supportedKeyAttributes,\n)\nexport class CentralSceneCCSupportedReport extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sceneCount = options.sceneCount;\n\t\tthis.supportsSlowRefresh = options.supportsSlowRefresh;\n\t\tfor (\n\t\t\tconst [scene, keys] of Object.entries(\n\t\t\t\toptions.supportedKeyAttributes,\n\t\t\t)\n\t\t) {\n\t\t\tthis._supportedKeyAttributes.set(\n\t\t\t\tparseInt(scene),\n\t\t\t\tkeys,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst sceneCount = raw.payload[0];\n\t\tconst supportsSlowRefresh: MaybeNotKnown<boolean> =\n\t\t\t!!(raw.payload[1] & 0b1000_0000);\n\t\tconst bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;\n\t\tconst identicalKeyAttributes = !!(raw.payload[1] & 0b1);\n\t\tconst numEntries = identicalKeyAttributes ? 1 : sceneCount;\n\t\tvalidatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);\n\t\tconst supportedKeyAttributes: Record<\n\t\t\tnumber,\n\t\t\treadonly CentralSceneKeys[]\n\t\t> = {};\n\t\tfor (let i = 0; i < numEntries; i++) {\n\t\t\tconst mask = raw.payload.subarray(\n\t\t\t\t2 + i * bitMaskBytes,\n\t\t\t\t2 + (i + 1) * bitMaskBytes,\n\t\t\t);\n\t\t\tsupportedKeyAttributes[i + 1] = parseBitMask(\n\t\t\t\tmask,\n\t\t\t\tCentralSceneKeys.KeyPressed,\n\t\t\t);\n\t\t}\n\n\t\tif (identicalKeyAttributes) {\n\t\t\t// The key attributes are only transmitted for scene 1, copy them to the others\n\t\t\tfor (let i = 2; i <= sceneCount; i++) {\n\t\t\t\tsupportedKeyAttributes[i] = supportedKeyAttributes[1];\n\t\t\t}\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneCount,\n\t\t\tsupportsSlowRefresh,\n\t\t\tsupportedKeyAttributes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Create/extend metadata for all scenes\n\t\tfor (let i = 1; i <= this.sceneCount; i++) {\n\t\t\tconst sceneValue = CentralSceneCCValues.scene(i);\n\t\t\tthis.setMetadata(ctx, sceneValue, {\n\t\t\t\t...sceneValue.meta,\n\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\tCentralSceneKeys,\n\t\t\t\t\tthis._supportedKeyAttributes.get(i),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly sceneCount: number;\n\n\t// TODO: Only offer `slowRefresh` if this is true\n\n\tpublic readonly supportsSlowRefresh: MaybeNotKnown<boolean>;\n\n\tprivate _supportedKeyAttributes = new Map<\n\t\tnumber,\n\t\treadonly CentralSceneKeys[]\n\t>();\n\n\tpublic get supportedKeyAttributes(): ReadonlyMap<\n\t\tnumber,\n\t\treadonly CentralSceneKeys[]\n\t> {\n\t\treturn this._supportedKeyAttributes;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"scene count\": this.sceneCount,\n\t\t\t\"supports slow refresh\": maybeUnknownToString(\n\t\t\t\tthis.supportsSlowRefresh,\n\t\t\t),\n\t\t};\n\t\tfor (const [scene, keys] of this.supportedKeyAttributes) {\n\t\t\tmessage[`supported attributes (scene #${scene})`] = keys\n\t\t\t\t.map((k) => `\\n\u00B7 ${getEnumMemberName(CentralSceneKeys, k)}`)\n\t\t\t\t.join(\"\");\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(CentralSceneCommand.SupportedGet)\n@expectedCCResponse(CentralSceneCCSupportedReport)\nexport class CentralSceneCCSupportedGet extends CentralSceneCC {}\n\n// @publicAPI\nexport interface CentralSceneCCConfigurationReportOptions {\n\tslowRefresh: boolean;\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationReport)\n@ccValueProperty(\"slowRefresh\", CentralSceneCCValues.slowRefresh)\nexport class CentralSceneCCConfigurationReport extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst slowRefresh = !!(raw.payload[0] & 0b1000_0000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tslowRefresh,\n\t\t});\n\t}\n\n\tpublic readonly slowRefresh: boolean;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"slow refresh\": this.slowRefresh },\n\t\t};\n\t}\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationGet)\n@expectedCCResponse(CentralSceneCCConfigurationReport)\nexport class CentralSceneCCConfigurationGet extends CentralSceneCC {}\n\n// @publicAPI\nexport interface CentralSceneCCConfigurationSetOptions {\n\tslowRefresh: boolean;\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationSet)\n@useSupervision()\nexport class CentralSceneCCConfigurationSet extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): CentralSceneCCConfigurationSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new CentralSceneCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic slowRefresh: boolean;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.slowRefresh ? 0b1000_0000 : 0]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"slow refresh\": this.slowRefresh },\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAKO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAAsD;AACtD,cAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyCZ,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AA8D3C,mBAAA,MAAA,MAAA,8BAAA,EAAA,MAAA,UAAA,MAAA,oBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,sBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,kBAAb,OAA6B,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AA9D9B,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,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EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;IASA,kCAA8B,MAAA;8BAF1C,yCAAU,iCAAoB,gBAAgB,OAC9C,8CAAc,CAAE;;;;oBACmC;sDAAA,YAAc;WAAA;;;;;;;;AAAlE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAA2D;AAE3D,YAAM,OAAO;AACb,WAAK,cAAc,QAAQ;IAC5B;IAEO,OAAO,KACb,MACA,MAAsB;AAEtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,cAAc,MAAc,CAAC,CAAC;AAC9D,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,gBAAgB,KAAK,YAAW;;IAE7C;;;;",
|
|
6
6
|
"names": ["import_safe"]
|
|
7
7
|
}
|
|
@@ -1,46 +1,29 @@
|
|
|
1
1
|
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
2
|
-
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult,
|
|
2
|
+
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core/safe";
|
|
3
3
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
4
4
|
import { CCAPI } from "../lib/API.js";
|
|
5
5
|
import { type CCRaw, CommandClass } from "../lib/CommandClass.js";
|
|
6
6
|
import { ClimateControlScheduleCommand, ScheduleOverrideType, type SetbackState, type Switchpoint, Weekday } from "../lib/_Types.js";
|
|
7
7
|
export declare const ClimateControlScheduleCCValues: Readonly<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly type: "any";
|
|
15
|
-
readonly readable: true;
|
|
16
|
-
readonly writeable: true;
|
|
17
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
18
|
-
readonly type: "any";
|
|
19
|
-
readonly readable: true;
|
|
20
|
-
readonly writeable: true;
|
|
21
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
22
|
-
readonly type: "any";
|
|
23
|
-
readonly readable: true;
|
|
24
|
-
readonly writeable: true;
|
|
25
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
26
|
-
readonly type: "any";
|
|
27
|
-
readonly readable: true;
|
|
28
|
-
readonly writeable: true;
|
|
29
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
30
|
-
readonly type: "any";
|
|
31
|
-
readonly readable: true;
|
|
32
|
-
readonly writeable: true;
|
|
33
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
34
|
-
readonly id: ValueIDBase;
|
|
35
|
-
readonly endpoint: (endpoint?: number | undefined) => {
|
|
8
|
+
overrideType: {
|
|
9
|
+
id: {
|
|
10
|
+
readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"];
|
|
11
|
+
readonly property: "overrideType";
|
|
12
|
+
};
|
|
13
|
+
endpoint: (endpoint?: number) => {
|
|
36
14
|
readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"];
|
|
37
15
|
readonly endpoint: number;
|
|
38
|
-
readonly property: "
|
|
39
|
-
readonly propertyKey: Weekday;
|
|
16
|
+
readonly property: "overrideType";
|
|
40
17
|
};
|
|
41
|
-
}) & {
|
|
42
18
|
is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
43
|
-
readonly
|
|
19
|
+
readonly meta: {
|
|
20
|
+
readonly label: "Override type";
|
|
21
|
+
readonly states: Record<number, string>;
|
|
22
|
+
readonly type: "number";
|
|
23
|
+
readonly readable: true;
|
|
24
|
+
readonly writeable: true;
|
|
25
|
+
};
|
|
26
|
+
options: {
|
|
44
27
|
readonly internal: false;
|
|
45
28
|
readonly minVersion: 1;
|
|
46
29
|
readonly secret: false;
|
|
@@ -50,158 +33,60 @@ export declare const ClimateControlScheduleCCValues: Readonly<{
|
|
|
50
33
|
};
|
|
51
34
|
};
|
|
52
35
|
overrideState: {
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
id: {
|
|
37
|
+
readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"];
|
|
38
|
+
readonly property: "overrideState";
|
|
39
|
+
};
|
|
40
|
+
endpoint: (endpoint?: number) => {
|
|
55
41
|
readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"];
|
|
56
42
|
readonly endpoint: number;
|
|
57
43
|
readonly property: "overrideState";
|
|
58
44
|
};
|
|
59
|
-
|
|
60
|
-
readonly meta:
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
65
|
-
readonly type: "any";
|
|
66
|
-
readonly readable: true;
|
|
67
|
-
readonly writeable: true;
|
|
68
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
69
|
-
readonly type: "any";
|
|
70
|
-
readonly readable: true;
|
|
71
|
-
readonly writeable: true;
|
|
72
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
73
|
-
readonly type: "any";
|
|
74
|
-
readonly readable: true;
|
|
75
|
-
readonly writeable: true;
|
|
76
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
77
|
-
readonly type: "any";
|
|
78
|
-
readonly readable: true;
|
|
79
|
-
readonly writeable: true;
|
|
80
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
81
|
-
readonly type: "any";
|
|
45
|
+
is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
46
|
+
readonly meta: {
|
|
47
|
+
readonly label: "Override state";
|
|
48
|
+
readonly min: -12.8;
|
|
49
|
+
readonly type: "number";
|
|
82
50
|
readonly readable: true;
|
|
83
51
|
readonly writeable: true;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
readonly internal: false;
|
|
87
|
-
readonly minVersion: 1;
|
|
88
|
-
readonly secret: false;
|
|
89
|
-
readonly stateful: true;
|
|
90
|
-
readonly supportsEndpoints: true;
|
|
91
|
-
readonly autoCreate: true;
|
|
92
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
93
|
-
readonly internal: false;
|
|
94
|
-
readonly minVersion: 1;
|
|
95
|
-
readonly secret: false;
|
|
96
|
-
readonly stateful: true;
|
|
97
|
-
readonly supportsEndpoints: true;
|
|
98
|
-
readonly autoCreate: true;
|
|
99
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
100
|
-
readonly internal: false;
|
|
101
|
-
readonly minVersion: 1;
|
|
102
|
-
readonly secret: false;
|
|
103
|
-
readonly stateful: true;
|
|
104
|
-
readonly supportsEndpoints: true;
|
|
105
|
-
readonly autoCreate: true;
|
|
106
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
107
|
-
readonly internal: false;
|
|
108
|
-
readonly minVersion: 1;
|
|
109
|
-
readonly secret: false;
|
|
110
|
-
readonly stateful: true;
|
|
111
|
-
readonly supportsEndpoints: true;
|
|
112
|
-
readonly autoCreate: true;
|
|
113
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
114
|
-
readonly internal: false;
|
|
115
|
-
readonly minVersion: 1;
|
|
116
|
-
readonly secret: false;
|
|
117
|
-
readonly stateful: true;
|
|
118
|
-
readonly supportsEndpoints: true;
|
|
119
|
-
readonly autoCreate: true;
|
|
120
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
52
|
+
};
|
|
53
|
+
options: {
|
|
121
54
|
readonly internal: false;
|
|
122
55
|
readonly minVersion: 1;
|
|
123
56
|
readonly secret: false;
|
|
124
57
|
readonly stateful: true;
|
|
125
58
|
readonly supportsEndpoints: true;
|
|
126
59
|
readonly autoCreate: true;
|
|
127
|
-
}
|
|
60
|
+
};
|
|
128
61
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
62
|
+
schedule: ((weekday: Weekday) => {
|
|
63
|
+
id: {
|
|
64
|
+
readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"];
|
|
65
|
+
readonly property: "schedule";
|
|
66
|
+
readonly propertyKey: Weekday;
|
|
67
|
+
};
|
|
68
|
+
endpoint: (endpoint?: number) => {
|
|
132
69
|
readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"];
|
|
133
70
|
readonly endpoint: number;
|
|
134
|
-
readonly property: "
|
|
71
|
+
readonly property: "schedule";
|
|
72
|
+
readonly propertyKey: Weekday;
|
|
135
73
|
};
|
|
136
|
-
readonly
|
|
137
|
-
|
|
138
|
-
readonly type: "any";
|
|
139
|
-
readonly readable: true;
|
|
140
|
-
readonly writeable: true;
|
|
141
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
142
|
-
readonly type: "any";
|
|
143
|
-
readonly readable: true;
|
|
144
|
-
readonly writeable: true;
|
|
145
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
146
|
-
readonly type: "any";
|
|
147
|
-
readonly readable: true;
|
|
148
|
-
readonly writeable: true;
|
|
149
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
150
|
-
readonly type: "any";
|
|
151
|
-
readonly readable: true;
|
|
152
|
-
readonly writeable: true;
|
|
153
|
-
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
154
|
-
readonly type: "any";
|
|
155
|
-
readonly readable: true;
|
|
156
|
-
readonly writeable: true;
|
|
157
|
-
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
74
|
+
readonly meta: {
|
|
75
|
+
readonly label: `Schedule (${string})`;
|
|
158
76
|
readonly type: "any";
|
|
159
77
|
readonly readable: true;
|
|
160
78
|
readonly writeable: true;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
readonly secret: false;
|
|
166
|
-
readonly stateful: true;
|
|
167
|
-
readonly supportsEndpoints: true;
|
|
168
|
-
readonly autoCreate: true;
|
|
169
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
170
|
-
readonly internal: false;
|
|
171
|
-
readonly minVersion: 1;
|
|
172
|
-
readonly secret: false;
|
|
173
|
-
readonly stateful: true;
|
|
174
|
-
readonly supportsEndpoints: true;
|
|
175
|
-
readonly autoCreate: true;
|
|
176
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
177
|
-
readonly internal: false;
|
|
178
|
-
readonly minVersion: 1;
|
|
179
|
-
readonly secret: false;
|
|
180
|
-
readonly stateful: true;
|
|
181
|
-
readonly supportsEndpoints: true;
|
|
182
|
-
readonly autoCreate: true;
|
|
183
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
184
|
-
readonly internal: false;
|
|
185
|
-
readonly minVersion: 1;
|
|
186
|
-
readonly secret: false;
|
|
187
|
-
readonly stateful: true;
|
|
188
|
-
readonly supportsEndpoints: true;
|
|
189
|
-
readonly autoCreate: true;
|
|
190
|
-
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
191
|
-
readonly internal: false;
|
|
192
|
-
readonly minVersion: 1;
|
|
193
|
-
readonly secret: false;
|
|
194
|
-
readonly stateful: true;
|
|
195
|
-
readonly supportsEndpoints: true;
|
|
196
|
-
readonly autoCreate: true;
|
|
197
|
-
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
79
|
+
};
|
|
80
|
+
}) & {
|
|
81
|
+
is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
82
|
+
options: {
|
|
198
83
|
readonly internal: false;
|
|
199
84
|
readonly minVersion: 1;
|
|
200
85
|
readonly secret: false;
|
|
201
86
|
readonly stateful: true;
|
|
202
87
|
readonly supportsEndpoints: true;
|
|
203
88
|
readonly autoCreate: true;
|
|
204
|
-
}
|
|
89
|
+
};
|
|
205
90
|
};
|
|
206
91
|
}>;
|
|
207
92
|
export declare class ClimateControlScheduleCCAPI extends CCAPI {
|
|
@@ -39,7 +39,7 @@ __export(ClimateControlScheduleCC_exports, {
|
|
|
39
39
|
ClimateControlScheduleCCOverrideSet: () => ClimateControlScheduleCCOverrideSet,
|
|
40
40
|
ClimateControlScheduleCCReport: () => ClimateControlScheduleCCReport,
|
|
41
41
|
ClimateControlScheduleCCSet: () => ClimateControlScheduleCCSet,
|
|
42
|
-
ClimateControlScheduleCCValues: () => ClimateControlScheduleCCValues
|
|
42
|
+
ClimateControlScheduleCCValues: () => import_CCValues_generated.ClimateControlScheduleCCValues
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(ClimateControlScheduleCC_exports);
|
|
45
45
|
var __validateArgs = __toESM(require("./ClimateControlScheduleCC._validateArgs.js"), 1);
|
|
@@ -52,6 +52,7 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
|
52
52
|
var import_Values = require("../lib/Values.js");
|
|
53
53
|
var import_Types = require("../lib/_Types.js");
|
|
54
54
|
var import_serializers = require("../lib/serializers.js");
|
|
55
|
+
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
55
56
|
var __runInitializers = function(thisArg, initializers, value) {
|
|
56
57
|
var useValue = arguments.length > 2;
|
|
57
58
|
for (var i = 0; i < initializers.length; i++) {
|
|
@@ -93,26 +94,6 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
|
|
|
93
94
|
done = true;
|
|
94
95
|
};
|
|
95
96
|
const { validateArgs_ClimateControlScheduleCCAPI_set, validateArgs_ClimateControlScheduleCCAPI_get, validateArgs_ClimateControlScheduleCCAPI_setOverride } = __validateArgs;
|
|
96
|
-
const ClimateControlScheduleCCValues = Object.freeze({
|
|
97
|
-
...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["Climate Control Schedule"], {
|
|
98
|
-
...import_Values.V.staticProperty("overrideType", {
|
|
99
|
-
...import_safe.ValueMetadata.Number,
|
|
100
|
-
label: "Override type",
|
|
101
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ScheduleOverrideType)
|
|
102
|
-
}),
|
|
103
|
-
...import_Values.V.staticProperty("overrideState", {
|
|
104
|
-
...import_safe.ValueMetadata.Number,
|
|
105
|
-
label: "Override state",
|
|
106
|
-
min: -12.8
|
|
107
|
-
})
|
|
108
|
-
}),
|
|
109
|
-
...import_Values.V.defineDynamicCCValues(import_safe.CommandClasses["Climate Control Schedule"], {
|
|
110
|
-
...import_Values.V.dynamicPropertyAndKeyWithName("schedule", "schedule", (weekday) => weekday, ({ property, propertyKey }) => property === "switchPoints" && typeof propertyKey === "number" && propertyKey >= import_Types.Weekday.Monday && propertyKey <= import_Types.Weekday.Sunday, (weekday) => ({
|
|
111
|
-
...import_safe.ValueMetadata.Any,
|
|
112
|
-
label: `Schedule (${(0, import_safe3.getEnumMemberName)(import_Types.Weekday, weekday)})`
|
|
113
|
-
}))
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
97
|
let ClimateControlScheduleCCAPI = (() => {
|
|
117
98
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Climate Control Schedule"])];
|
|
118
99
|
let _classDescriptor;
|
|
@@ -218,7 +199,7 @@ let ClimateControlScheduleCCAPI = (() => {
|
|
|
218
199
|
return ClimateControlScheduleCCAPI2 = _classThis;
|
|
219
200
|
})();
|
|
220
201
|
let ClimateControlScheduleCC = (() => {
|
|
221
|
-
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Climate Control Schedule"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(ClimateControlScheduleCCValues)];
|
|
202
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Climate Control Schedule"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.ClimateControlScheduleCCValues)];
|
|
222
203
|
let _classDescriptor;
|
|
223
204
|
let _classExtraInitializers = [];
|
|
224
205
|
let _classThis;
|
|
@@ -299,7 +280,7 @@ let ClimateControlScheduleCCSet = (() => {
|
|
|
299
280
|
return ClimateControlScheduleCCSet2 = _classThis;
|
|
300
281
|
})();
|
|
301
282
|
let ClimateControlScheduleCCReport = (() => {
|
|
302
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ClimateControlScheduleCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("schedule", ClimateControlScheduleCCValues.schedule, (self) => [self.weekday])];
|
|
283
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ClimateControlScheduleCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("schedule", import_CCValues_generated.ClimateControlScheduleCCValues.schedule, (self) => [self.weekday])];
|
|
303
284
|
let _classDescriptor;
|
|
304
285
|
let _classExtraInitializers = [];
|
|
305
286
|
let _classThis;
|
|
@@ -459,7 +440,7 @@ let ClimateControlScheduleCCChangedGet = (() => {
|
|
|
459
440
|
return ClimateControlScheduleCCChangedGet2 = _classThis;
|
|
460
441
|
})();
|
|
461
442
|
let ClimateControlScheduleCCOverrideReport = (() => {
|
|
462
|
-
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ClimateControlScheduleCommand.OverrideReport), (0, import_CommandClassDecorators.ccValueProperty)("overrideType", ClimateControlScheduleCCValues.overrideType), (0, import_CommandClassDecorators.ccValueProperty)("overrideState", ClimateControlScheduleCCValues.overrideState)];
|
|
443
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ClimateControlScheduleCommand.OverrideReport), (0, import_CommandClassDecorators.ccValueProperty)("overrideType", import_CCValues_generated.ClimateControlScheduleCCValues.overrideType), (0, import_CommandClassDecorators.ccValueProperty)("overrideState", import_CCValues_generated.ClimateControlScheduleCCValues.overrideState)];
|
|
463
444
|
let _classDescriptor;
|
|
464
445
|
let _classExtraInitializers = [];
|
|
465
446
|
let _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/ClimateControlScheduleCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tClimateControlScheduleCommand,\n\tScheduleOverrideType,\n\ttype SetbackState,\n\ttype Switchpoint,\n\tWeekday,\n} from \"../lib/_Types.js\";\nimport {\n\tdecodeSetbackState,\n\tdecodeSwitchpoint,\n\tencodeSetbackState,\n\tencodeSwitchpoint,\n} from \"../lib/serializers.js\";\n\nexport const ClimateControlScheduleCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Climate Control Schedule\"], {\n\t\t...V.staticProperty(\n\t\t\t\"overrideType\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Override type\",\n\t\t\t\tstates: enumValuesToMetadataStates(ScheduleOverrideType),\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"overrideState\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Override state\",\n\t\t\t\tmin: -12.8,\n\t\t\t} as const,\n\t\t),\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Climate Control Schedule\"], {\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"schedule\",\n\t\t\t\"schedule\",\n\t\t\t(weekday: Weekday) => weekday,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"switchPoints\"\n\t\t\t\t&& typeof propertyKey === \"number\"\n\t\t\t\t&& propertyKey >= Weekday.Monday\n\t\t\t\t&& propertyKey <= Weekday.Sunday,\n\t\t\t(weekday: Weekday) => ({\n\t\t\t\t...ValueMetadata.Any,\n\t\t\t\tlabel: `Schedule (${getEnumMemberName(Weekday, weekday)})`,\n\t\t\t} as const),\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Climate Control Schedule\"])\nexport class ClimateControlScheduleCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ClimateControlScheduleCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ClimateControlScheduleCommand.Set:\n\t\t\tcase ClimateControlScheduleCommand.OverrideSet:\n\t\t\t\treturn true; // mandatory\n\t\t\tcase ClimateControlScheduleCommand.Get:\n\t\t\tcase ClimateControlScheduleCommand.ChangedGet:\n\t\t\tcase ClimateControlScheduleCommand.OverrideGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tweekday: Weekday,\n\t\tswitchPoints: Switchpoint[],\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.Set,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tweekday,\n\t\t\tswitchPoints,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async get(\n\t\tweekday: Weekday,\n\t): Promise<MaybeNotKnown<readonly Switchpoint[]>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.Get,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tweekday,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tClimateControlScheduleCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.schedule;\n\t}\n\n\tpublic async getChangeCounter(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.ChangedGet,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCChangedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tClimateControlScheduleCCChangedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.changeCounter;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getOverride() {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.OverrideGet,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCOverrideGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tClimateControlScheduleCCOverrideReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\ttype: response.overrideType,\n\t\t\t\tstate: response.overrideState,\n\t\t\t};\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async setOverride(\n\t\ttype: ScheduleOverrideType,\n\t\tstate: SetbackState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.OverrideSet,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCOverrideSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\toverrideType: type,\n\t\t\toverrideState: state,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Climate Control Schedule\"])\n@implementedVersion(1)\n@ccValues(ClimateControlScheduleCCValues)\nexport class ClimateControlScheduleCC extends CommandClass {\n\tdeclare ccCommand: ClimateControlScheduleCommand;\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCSetOptions {\n\tweekday: Weekday;\n\tswitchPoints: Switchpoint[];\n}\n\n@CCCommand(ClimateControlScheduleCommand.Set)\n@useSupervision()\nexport class ClimateControlScheduleCCSet extends ClimateControlScheduleCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.switchPoints = options.switchPoints;\n\t\tthis.weekday = options.weekday;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ClimateControlScheduleCCSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ClimateControlScheduleCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic switchPoints: Switchpoint[];\n\tpublic weekday: Weekday;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\t// Make sure we have exactly 9 entries\n\t\tconst allSwitchPoints = this.switchPoints.slice(0, 9); // maximum 9\n\t\twhile (allSwitchPoints.length < 9) {\n\t\t\tallSwitchPoints.push({\n\t\t\t\thour: 0,\n\t\t\t\tminute: 0,\n\t\t\t\tstate: \"Unused\",\n\t\t\t});\n\t\t}\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.weekday & 0b111]),\n\t\t\t...allSwitchPoints.map((sp) => encodeSwitchpoint(sp)),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tweekday: getEnumMemberName(Weekday, this.weekday),\n\t\t\t\tswitchpoints: `${\n\t\t\t\t\tthis.switchPoints\n\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t(sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${\n\t\t\t\t\t\t\t\tsp.minute.toString().padStart(\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\"0\",\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t} --> ${sp.state}`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCReportOptions {\n\tweekday: Weekday;\n\tschedule: Switchpoint[];\n}\n\n@CCCommand(ClimateControlScheduleCommand.Report)\n@ccValueProperty(\n\t\"schedule\",\n\tClimateControlScheduleCCValues.schedule,\n\t(self) => [self.weekday],\n)\nexport class ClimateControlScheduleCCReport extends ClimateControlScheduleCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.weekday = options.weekday;\n\t\tthis.schedule = options.schedule;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ClimateControlScheduleCCReport {\n\t\tvalidatePayload(raw.payload.length >= 28);\n\t\tconst weekday: Weekday = raw.payload[0] & 0b111;\n\t\tconst allSwitchpoints: Switchpoint[] = [];\n\t\tfor (let i = 0; i <= 8; i++) {\n\t\t\tallSwitchpoints.push(\n\t\t\t\tdecodeSwitchpoint(raw.payload.subarray(1 + 3 * i)),\n\t\t\t);\n\t\t}\n\n\t\tconst schedule: Switchpoint[] = allSwitchpoints.filter((sp) =>\n\t\t\tsp.state !== \"Unused\"\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tweekday,\n\t\t\tschedule,\n\t\t});\n\t}\n\n\tpublic readonly weekday: Weekday;\n\n\tpublic readonly schedule: readonly Switchpoint[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tweekday: getEnumMemberName(Weekday, this.weekday),\n\t\t\t\tschedule: `${\n\t\t\t\t\tthis.schedule\n\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t(sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${\n\t\t\t\t\t\t\t\tsp.minute.toString().padStart(\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\"0\",\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t} --> ${sp.state}`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCGetOptions {\n\tweekday: Weekday;\n}\n\n@CCCommand(ClimateControlScheduleCommand.Get)\n@expectedCCResponse(ClimateControlScheduleCCReport)\nexport class ClimateControlScheduleCCGet extends ClimateControlScheduleCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.weekday = options.weekday;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ClimateControlScheduleCCGet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ClimateControlScheduleCCGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic weekday: Weekday;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.weekday & 0b111]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { weekday: getEnumMemberName(Weekday, this.weekday) },\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCChangedReportOptions {\n\tchangeCounter: number;\n}\n\n@CCCommand(ClimateControlScheduleCommand.ChangedReport)\nexport class ClimateControlScheduleCCChangedReport\n\textends ClimateControlScheduleCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCChangedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.changeCounter = options.changeCounter;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ClimateControlScheduleCCChangedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst changeCounter = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tchangeCounter,\n\t\t});\n\t}\n\n\tpublic readonly changeCounter: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"change counter\": this.changeCounter },\n\t\t};\n\t}\n}\n\n@CCCommand(ClimateControlScheduleCommand.ChangedGet)\n@expectedCCResponse(ClimateControlScheduleCCChangedReport)\nexport class ClimateControlScheduleCCChangedGet\n\textends ClimateControlScheduleCC\n{}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideReportOptions {\n\toverrideType: ScheduleOverrideType;\n\toverrideState: SetbackState;\n}\n\n@CCCommand(ClimateControlScheduleCommand.OverrideReport)\n@ccValueProperty(\"overrideType\", ClimateControlScheduleCCValues.overrideType)\n@ccValueProperty(\"overrideState\", ClimateControlScheduleCCValues.overrideState)\nexport class ClimateControlScheduleCCOverrideReport\n\textends ClimateControlScheduleCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCOverrideReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.overrideType = options.overrideType;\n\t\tthis.overrideState = options.overrideState;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ClimateControlScheduleCCOverrideReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst overrideType: ScheduleOverrideType = raw.payload[0] & 0b11;\n\t\tconst overrideState: SetbackState = decodeSetbackState(raw.payload, 1)\n\t\t\t// If we receive an unknown setback state, return the raw value\n\t\t\t|| raw.payload.readInt8(1);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\toverrideType,\n\t\t\toverrideState,\n\t\t});\n\t}\n\n\tpublic readonly overrideType: ScheduleOverrideType;\n\n\tpublic readonly overrideState: SetbackState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"override type\": getEnumMemberName(\n\t\t\t\t\tScheduleOverrideType,\n\t\t\t\t\tthis.overrideType,\n\t\t\t\t),\n\t\t\t\t\"override state\": this.overrideState,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ClimateControlScheduleCommand.OverrideGet)\n@expectedCCResponse(ClimateControlScheduleCCOverrideReport)\nexport class ClimateControlScheduleCCOverrideGet\n\textends ClimateControlScheduleCC\n{}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideSetOptions {\n\toverrideType: ScheduleOverrideType;\n\toverrideState: SetbackState;\n}\n\n@CCCommand(ClimateControlScheduleCommand.OverrideSet)\n@useSupervision()\nexport class ClimateControlScheduleCCOverrideSet\n\textends ClimateControlScheduleCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCOverrideSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.overrideType = options.overrideType;\n\t\tthis.overrideState = options.overrideState;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ClimateControlScheduleCCOverrideSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ClimateControlScheduleCCOverrideSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic overrideType: ScheduleOverrideType;\n\tpublic overrideState: SetbackState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\t[this.overrideType & 0b11],\n\t\t\tencodeSetbackState(this.overrideState),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"override type\": getEnumMemberName(\n\t\t\t\t\tScheduleOverrideType,\n\t\t\t\t\tthis.overrideType,\n\t\t\t\t),\n\t\t\t\t\"override state\": this.overrideState,\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAYO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAkC;AAElC,iBAAsB;AACtB,0BAAyC;AACzC,oCASO;AACP,oBAAkB;AAClB,mBAMO;AACP,yBAKO
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tClimateControlScheduleCommand,\n\tScheduleOverrideType,\n\ttype SetbackState,\n\ttype Switchpoint,\n\tWeekday,\n} from \"../lib/_Types.js\";\nimport {\n\tdecodeSetbackState,\n\tdecodeSwitchpoint,\n\tencodeSetbackState,\n\tencodeSwitchpoint,\n} from \"../lib/serializers.js\";\n\nexport const ClimateControlScheduleCCValues = V.defineCCValues(\n\tCommandClasses[\"Climate Control Schedule\"],\n\t{\n\t\t...V.staticProperty(\n\t\t\t\"overrideType\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Override type\",\n\t\t\t\tstates: enumValuesToMetadataStates(ScheduleOverrideType),\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"overrideState\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Override state\",\n\t\t\t\tmin: -12.8,\n\t\t\t} as const,\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"schedule\",\n\t\t\t\"schedule\",\n\t\t\t(weekday: Weekday) => weekday,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"switchPoints\"\n\t\t\t\t&& typeof propertyKey === \"number\"\n\t\t\t\t&& propertyKey >= Weekday.Monday\n\t\t\t\t&& propertyKey <= Weekday.Sunday,\n\t\t\t(weekday: Weekday) => ({\n\t\t\t\t...ValueMetadata.Any,\n\t\t\t\tlabel: `Schedule (${getEnumMemberName(Weekday, weekday)})`,\n\t\t\t} as const),\n\t\t),\n\t},\n);\n\n@API(CommandClasses[\"Climate Control Schedule\"])\nexport class ClimateControlScheduleCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ClimateControlScheduleCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ClimateControlScheduleCommand.Set:\n\t\t\tcase ClimateControlScheduleCommand.OverrideSet:\n\t\t\t\treturn true; // mandatory\n\t\t\tcase ClimateControlScheduleCommand.Get:\n\t\t\tcase ClimateControlScheduleCommand.ChangedGet:\n\t\t\tcase ClimateControlScheduleCommand.OverrideGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tweekday: Weekday,\n\t\tswitchPoints: Switchpoint[],\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.Set,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tweekday,\n\t\t\tswitchPoints,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async get(\n\t\tweekday: Weekday,\n\t): Promise<MaybeNotKnown<readonly Switchpoint[]>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.Get,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tweekday,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tClimateControlScheduleCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.schedule;\n\t}\n\n\tpublic async getChangeCounter(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.ChangedGet,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCChangedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tClimateControlScheduleCCChangedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.changeCounter;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getOverride() {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.OverrideGet,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCOverrideGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tClimateControlScheduleCCOverrideReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\ttype: response.overrideType,\n\t\t\t\tstate: response.overrideState,\n\t\t\t};\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async setOverride(\n\t\ttype: ScheduleOverrideType,\n\t\tstate: SetbackState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tClimateControlScheduleCommand,\n\t\t\tClimateControlScheduleCommand.OverrideSet,\n\t\t);\n\n\t\tconst cc = new ClimateControlScheduleCCOverrideSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\toverrideType: type,\n\t\t\toverrideState: state,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Climate Control Schedule\"])\n@implementedVersion(1)\n@ccValues(ClimateControlScheduleCCValues)\nexport class ClimateControlScheduleCC extends CommandClass {\n\tdeclare ccCommand: ClimateControlScheduleCommand;\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCSetOptions {\n\tweekday: Weekday;\n\tswitchPoints: Switchpoint[];\n}\n\n@CCCommand(ClimateControlScheduleCommand.Set)\n@useSupervision()\nexport class ClimateControlScheduleCCSet extends ClimateControlScheduleCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.switchPoints = options.switchPoints;\n\t\tthis.weekday = options.weekday;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ClimateControlScheduleCCSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ClimateControlScheduleCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic switchPoints: Switchpoint[];\n\tpublic weekday: Weekday;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\t// Make sure we have exactly 9 entries\n\t\tconst allSwitchPoints = this.switchPoints.slice(0, 9); // maximum 9\n\t\twhile (allSwitchPoints.length < 9) {\n\t\t\tallSwitchPoints.push({\n\t\t\t\thour: 0,\n\t\t\t\tminute: 0,\n\t\t\t\tstate: \"Unused\",\n\t\t\t});\n\t\t}\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.weekday & 0b111]),\n\t\t\t...allSwitchPoints.map((sp) => encodeSwitchpoint(sp)),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tweekday: getEnumMemberName(Weekday, this.weekday),\n\t\t\t\tswitchpoints: `${\n\t\t\t\t\tthis.switchPoints\n\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t(sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${\n\t\t\t\t\t\t\t\tsp.minute.toString().padStart(\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\"0\",\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t} --> ${sp.state}`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCReportOptions {\n\tweekday: Weekday;\n\tschedule: Switchpoint[];\n}\n\n@CCCommand(ClimateControlScheduleCommand.Report)\n@ccValueProperty(\n\t\"schedule\",\n\tClimateControlScheduleCCValues.schedule,\n\t(self) => [self.weekday],\n)\nexport class ClimateControlScheduleCCReport extends ClimateControlScheduleCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.weekday = options.weekday;\n\t\tthis.schedule = options.schedule;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ClimateControlScheduleCCReport {\n\t\tvalidatePayload(raw.payload.length >= 28);\n\t\tconst weekday: Weekday = raw.payload[0] & 0b111;\n\t\tconst allSwitchpoints: Switchpoint[] = [];\n\t\tfor (let i = 0; i <= 8; i++) {\n\t\t\tallSwitchpoints.push(\n\t\t\t\tdecodeSwitchpoint(raw.payload.subarray(1 + 3 * i)),\n\t\t\t);\n\t\t}\n\n\t\tconst schedule: Switchpoint[] = allSwitchpoints.filter((sp) =>\n\t\t\tsp.state !== \"Unused\"\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tweekday,\n\t\t\tschedule,\n\t\t});\n\t}\n\n\tpublic readonly weekday: Weekday;\n\n\tpublic readonly schedule: readonly Switchpoint[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tweekday: getEnumMemberName(Weekday, this.weekday),\n\t\t\t\tschedule: `${\n\t\t\t\t\tthis.schedule\n\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t(sp) => `\n\u00B7 ${sp.hour.toString().padStart(2, \"0\")}:${\n\t\t\t\t\t\t\t\tsp.minute.toString().padStart(\n\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\"0\",\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t} --> ${sp.state}`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCGetOptions {\n\tweekday: Weekday;\n}\n\n@CCCommand(ClimateControlScheduleCommand.Get)\n@expectedCCResponse(ClimateControlScheduleCCReport)\nexport class ClimateControlScheduleCCGet extends ClimateControlScheduleCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.weekday = options.weekday;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ClimateControlScheduleCCGet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ClimateControlScheduleCCGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic weekday: Weekday;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.weekday & 0b111]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { weekday: getEnumMemberName(Weekday, this.weekday) },\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCChangedReportOptions {\n\tchangeCounter: number;\n}\n\n@CCCommand(ClimateControlScheduleCommand.ChangedReport)\nexport class ClimateControlScheduleCCChangedReport\n\textends ClimateControlScheduleCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCChangedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.changeCounter = options.changeCounter;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ClimateControlScheduleCCChangedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst changeCounter = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tchangeCounter,\n\t\t});\n\t}\n\n\tpublic readonly changeCounter: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"change counter\": this.changeCounter },\n\t\t};\n\t}\n}\n\n@CCCommand(ClimateControlScheduleCommand.ChangedGet)\n@expectedCCResponse(ClimateControlScheduleCCChangedReport)\nexport class ClimateControlScheduleCCChangedGet\n\textends ClimateControlScheduleCC\n{}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideReportOptions {\n\toverrideType: ScheduleOverrideType;\n\toverrideState: SetbackState;\n}\n\n@CCCommand(ClimateControlScheduleCommand.OverrideReport)\n@ccValueProperty(\"overrideType\", ClimateControlScheduleCCValues.overrideType)\n@ccValueProperty(\"overrideState\", ClimateControlScheduleCCValues.overrideState)\nexport class ClimateControlScheduleCCOverrideReport\n\textends ClimateControlScheduleCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCOverrideReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.overrideType = options.overrideType;\n\t\tthis.overrideState = options.overrideState;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ClimateControlScheduleCCOverrideReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst overrideType: ScheduleOverrideType = raw.payload[0] & 0b11;\n\t\tconst overrideState: SetbackState = decodeSetbackState(raw.payload, 1)\n\t\t\t// If we receive an unknown setback state, return the raw value\n\t\t\t|| raw.payload.readInt8(1);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\toverrideType,\n\t\t\toverrideState,\n\t\t});\n\t}\n\n\tpublic readonly overrideType: ScheduleOverrideType;\n\n\tpublic readonly overrideState: SetbackState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"override type\": getEnumMemberName(\n\t\t\t\t\tScheduleOverrideType,\n\t\t\t\t\tthis.overrideType,\n\t\t\t\t),\n\t\t\t\t\"override state\": this.overrideState,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ClimateControlScheduleCommand.OverrideGet)\n@expectedCCResponse(ClimateControlScheduleCCOverrideReport)\nexport class ClimateControlScheduleCCOverrideGet\n\textends ClimateControlScheduleCC\n{}\n\n// @publicAPI\nexport interface ClimateControlScheduleCCOverrideSetOptions {\n\toverrideType: ScheduleOverrideType;\n\toverrideState: SetbackState;\n}\n\n@CCCommand(ClimateControlScheduleCommand.OverrideSet)\n@useSupervision()\nexport class ClimateControlScheduleCCOverrideSet\n\textends ClimateControlScheduleCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ClimateControlScheduleCCOverrideSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.overrideType = options.overrideType;\n\t\tthis.overrideState = options.overrideState;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ClimateControlScheduleCCOverrideSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ClimateControlScheduleCCOverrideSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic overrideType: ScheduleOverrideType;\n\tpublic overrideState: SetbackState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.concat([\n\t\t\t[this.overrideType & 0b11],\n\t\t\tencodeSetbackState(this.overrideState),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"override type\": getEnumMemberName(\n\t\t\t\t\tScheduleOverrideType,\n\t\t\t\t\tthis.overrideType,\n\t\t\t\t),\n\t\t\t\t\"override state\": this.overrideState,\n\t\t\t},\n\t\t};\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAYO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAkC;AAElC,iBAAsB;AACtB,0BAAyC;AACzC,oCASO;AACP,oBAAkB;AAClB,mBAMO;AACP,yBAKO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuCM,+BAA2B,MAAA;8BADvC,mCAAI,2BAAe,0BAA0B,CAAC,CAAC;;;;oBACC;;;;;mDAAA,YAAK;WAAA;;;;;;;;yBAgBpD,6CAAa,EAAE,aAAa,KAAI,CAAE,CAAC;yBAmBnC,6CAAa,EAAE,aAAa,KAAI,CAAE,CAAC;iCAmEnC,qDAAa,EAAE,aAAa,KAAI,CAAE,CAAC;AArFpC,mBAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KA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