@zwave-js/cc 14.0.0-beta.4 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.js +381 -266
- package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
- package/build/cjs/cc/AssociationCC.js +669 -503
- package/build/cjs/cc/AssociationCC.js.map +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +595 -429
- package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
- package/build/cjs/cc/BasicCC.js +354 -260
- package/build/cjs/cc/BasicCC.js.map +3 -3
- package/build/cjs/cc/BatteryCC.js +427 -345
- package/build/cjs/cc/BatteryCC.js.map +3 -3
- package/build/cjs/cc/BinarySensorCC.js +391 -276
- package/build/cjs/cc/BinarySensorCC.js.map +3 -3
- package/build/cjs/cc/BinarySwitchCC.js +347 -253
- package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
- package/build/cjs/cc/CRC16CC.js +160 -85
- package/build/cjs/cc/CRC16CC.js.map +3 -3
- package/build/cjs/cc/CentralSceneCC.js +459 -324
- package/build/cjs/cc/CentralSceneCC.js.map +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
- package/build/cjs/cc/ClockCC.js +254 -150
- package/build/cjs/cc/ClockCC.js.map +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +758 -610
- package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
- package/build/cjs/cc/ConfigurationCC.js +1700 -1453
- package/build/cjs/cc/ConfigurationCC.js.map +3 -3
- package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
- package/build/cjs/cc/DoorLockCC.js +904 -777
- package/build/cjs/cc/DoorLockCC.js.map +3 -3
- package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
- package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
- package/build/cjs/cc/EnergyProductionCC.js +249 -160
- package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
- package/build/cjs/cc/EntryControlCC.js +619 -458
- package/build/cjs/cc/EntryControlCC.js.map +3 -3
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
- package/build/cjs/cc/HailCC.js +57 -11
- package/build/cjs/cc/HailCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +359 -233
- package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
- package/build/cjs/cc/InclusionControllerCC.js +205 -114
- package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
- package/build/cjs/cc/IndicatorCC.js +897 -736
- package/build/cjs/cc/IndicatorCC.js.map +3 -3
- package/build/cjs/cc/IrrigationCC.js +1651 -1405
- package/build/cjs/cc/IrrigationCC.js.map +3 -3
- package/build/cjs/cc/LanguageCC.js +268 -171
- package/build/cjs/cc/LanguageCC.js.map +3 -3
- package/build/cjs/cc/LockCC.js +254 -154
- package/build/cjs/cc/LockCC.js.map +3 -3
- package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
- package/build/cjs/cc/MeterCC.js +827 -707
- package/build/cjs/cc/MeterCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
- package/build/cjs/cc/MultiChannelCC.js +1037 -819
- package/build/cjs/cc/MultiChannelCC.js.map +3 -3
- package/build/cjs/cc/MultiCommandCC.js +172 -97
- package/build/cjs/cc/MultiCommandCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSensorCC.js +589 -449
- package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
- package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
- package/build/cjs/cc/NoOperationCC.js +89 -27
- package/build/cjs/cc/NoOperationCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.js +417 -277
- package/build/cjs/cc/NodeNamingCC.js.map +3 -3
- package/build/cjs/cc/NotificationCC.js +972 -818
- package/build/cjs/cc/NotificationCC.js.map +3 -3
- package/build/cjs/cc/PowerlevelCC.js +450 -303
- package/build/cjs/cc/PowerlevelCC.js.map +3 -3
- package/build/cjs/cc/ProtectionCC.js +686 -494
- package/build/cjs/cc/ProtectionCC.js.map +3 -3
- package/build/cjs/cc/SceneActivationCC.js +165 -97
- package/build/cjs/cc/SceneActivationCC.js.map +3 -3
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
- package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
- package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
- package/build/cjs/cc/Security2CC.js +1483 -1219
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.js +839 -619
- package/build/cjs/cc/SecurityCC.js.map +3 -3
- package/build/cjs/cc/SoundSwitchCC.js +707 -515
- package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
- package/build/cjs/cc/SupervisionCC.js +327 -237
- package/build/cjs/cc/SupervisionCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
- package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
- package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatModeCC.js +425 -302
- package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
- package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
- package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
- package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
- package/build/cjs/cc/TimeCC.js +515 -353
- package/build/cjs/cc/TimeCC.js.map +3 -3
- package/build/cjs/cc/TimeParametersCC.js +302 -202
- package/build/cjs/cc/TimeParametersCC.js.map +3 -3
- package/build/cjs/cc/TransportServiceCC.js +433 -315
- package/build/cjs/cc/TransportServiceCC.js.map +3 -3
- package/build/cjs/cc/UserCodeCC.js +1385 -1102
- package/build/cjs/cc/UserCodeCC.js.map +3 -3
- package/build/cjs/cc/VersionCC.js +696 -562
- package/build/cjs/cc/VersionCC.js.map +3 -3
- package/build/cjs/cc/WakeUpCC.js +499 -346
- package/build/cjs/cc/WakeUpCC.js.map +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +626 -478
- package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
- package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.js +233 -159
- package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
- package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
- package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
- package/build/cjs/lib/CommandClassDecorators.js +19 -20
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.d.ts +1 -1
- package/build/cjs/lib/Security2/Extension.js +217 -126
- package/build/cjs/lib/Security2/Extension.js.map +3 -3
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +389 -291
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +678 -537
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +634 -493
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +380 -302
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +449 -384
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +395 -297
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +353 -274
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +162 -98
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +465 -351
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.js +248 -159
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +802 -677
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +1899 -1687
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +951 -849
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +316 -218
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +240 -164
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +629 -493
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +51 -12
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +357 -250
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +197 -119
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.js +973 -835
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +1697 -1496
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +266 -184
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +247 -162
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +896 -795
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1106 -921
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +166 -102
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +616 -497
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +621 -496
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +82 -29
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +413 -294
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +1097 -966
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +437 -311
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +704 -543
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +157 -100
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1633 -1406
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +876 -687
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +689 -526
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +349 -272
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +388 -284
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +184 -111
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +435 -331
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +274 -185
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +674 -543
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +499 -360
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +296 -211
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +464 -363
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +1443 -1205
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +744 -635
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +494 -364
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +655 -530
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +223 -162
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +24 -24
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
- package/build/esm/lib/Security2/Extension.js +207 -123
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,10 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
6
34
|
};
|
|
7
|
-
var SceneActuatorConfigurationCCReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -79,296 +106,357 @@ export const SceneActuatorConfigurationCCValues = Object.freeze({
|
|
|
79
106
|
})),
|
|
80
107
|
}),
|
|
81
108
|
});
|
|
82
|
-
let SceneActuatorConfigurationCCAPI =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
109
|
+
let SceneActuatorConfigurationCCAPI = (() => {
|
|
110
|
+
let _classDecorators = [API(CommandClasses["Scene Actuator Configuration"])];
|
|
111
|
+
let _classDescriptor;
|
|
112
|
+
let _classExtraInitializers = [];
|
|
113
|
+
let _classThis;
|
|
114
|
+
let _classSuper = CCAPI;
|
|
115
|
+
var SceneActuatorConfigurationCCAPI = class extends _classSuper {
|
|
116
|
+
static { _classThis = this; }
|
|
117
|
+
static {
|
|
118
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
119
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
120
|
+
SceneActuatorConfigurationCCAPI = _classThis = _classDescriptor.value;
|
|
121
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
122
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
89
123
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
else if (typeof propertyKey !== "number") {
|
|
98
|
-
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
124
|
+
supportsCommand(cmd) {
|
|
125
|
+
switch (cmd) {
|
|
126
|
+
case SceneActuatorConfigurationCommand.Get:
|
|
127
|
+
return this.isSinglecast();
|
|
128
|
+
case SceneActuatorConfigurationCommand.Set:
|
|
129
|
+
return true;
|
|
99
130
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
return super.supportsCommand(cmd);
|
|
132
|
+
}
|
|
133
|
+
get [SET_VALUE]() {
|
|
134
|
+
return async function ({ property, propertyKey }, value, options) {
|
|
135
|
+
if (propertyKey == undefined) {
|
|
136
|
+
throwMissingPropertyKey(this.ccId, property);
|
|
103
137
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
// 1. options.transitionDuration
|
|
107
|
-
// 2. current stored value
|
|
108
|
-
// 3. default
|
|
109
|
-
const dimmingDuration = Duration.from(options?.transitionDuration)
|
|
110
|
-
?? this.tryGetValueDB()?.getValue(SceneActuatorConfigurationCCValues.dimmingDuration(propertyKey).endpoint(this.endpoint.index));
|
|
111
|
-
return this.set(propertyKey, dimmingDuration, value);
|
|
112
|
-
}
|
|
113
|
-
else if (property === "dimmingDuration") {
|
|
114
|
-
if (typeof value !== "string" && !(value instanceof Duration)) {
|
|
115
|
-
throwWrongValueType(this.ccId, property, "duration", typeof value);
|
|
138
|
+
else if (typeof propertyKey !== "number") {
|
|
139
|
+
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
116
140
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
141
|
+
if (property === "level") {
|
|
142
|
+
if (typeof value !== "number") {
|
|
143
|
+
throwWrongValueType(this.ccId, property, "number", typeof value);
|
|
144
|
+
}
|
|
145
|
+
// We need to set the dimming duration along with the level.
|
|
146
|
+
// Dimming duration is chosen with the following precedence:
|
|
147
|
+
// 1. options.transitionDuration
|
|
148
|
+
// 2. current stored value
|
|
149
|
+
// 3. default
|
|
150
|
+
const dimmingDuration = Duration.from(options?.transitionDuration)
|
|
151
|
+
?? this.tryGetValueDB()?.getValue(SceneActuatorConfigurationCCValues.dimmingDuration(propertyKey).endpoint(this.endpoint.index));
|
|
152
|
+
return this.set(propertyKey, dimmingDuration, value);
|
|
120
153
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const level = this.tryGetValueDB()?.getValue(SceneActuatorConfigurationCCValues.level(propertyKey).endpoint(this.endpoint.index));
|
|
125
|
-
return this.set(propertyKey, dimmingDuration, level);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
throwUnsupportedProperty(this.ccId, property);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
get [POLL_VALUE]() {
|
|
133
|
-
return async function ({ property, propertyKey }) {
|
|
134
|
-
switch (property) {
|
|
135
|
-
case "level":
|
|
136
|
-
case "dimmingDuration": {
|
|
137
|
-
if (propertyKey == undefined) {
|
|
138
|
-
throwMissingPropertyKey(this.ccId, property);
|
|
154
|
+
else if (property === "dimmingDuration") {
|
|
155
|
+
if (typeof value !== "string" && !(value instanceof Duration)) {
|
|
156
|
+
throwWrongValueType(this.ccId, property, "duration", typeof value);
|
|
139
157
|
}
|
|
140
|
-
|
|
141
|
-
|
|
158
|
+
const dimmingDuration = Duration.from(value);
|
|
159
|
+
if (dimmingDuration == undefined) {
|
|
160
|
+
throw new ZWaveError(`${getCCName(this.ccId)}: "${property}" could not be set. ${JSON.stringify(value)} is not a valid duration.`, ZWaveErrorCodes.Argument_Invalid);
|
|
142
161
|
}
|
|
143
|
-
|
|
162
|
+
// Must set the level along with the dimmingDuration,
|
|
163
|
+
// Use saved value, if it's defined. Otherwise the default
|
|
164
|
+
// will be used.
|
|
165
|
+
const level = this.tryGetValueDB()?.getValue(SceneActuatorConfigurationCCValues.level(propertyKey).endpoint(this.endpoint.index));
|
|
166
|
+
return this.set(propertyKey, dimmingDuration, level);
|
|
144
167
|
}
|
|
145
|
-
|
|
168
|
+
else {
|
|
146
169
|
throwUnsupportedProperty(this.ccId, property);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
async set(sceneId, dimmingDuration, level) {
|
|
151
|
-
__assertType("sceneId", "number", __assertType__number.bind(void 0, sceneId));
|
|
152
|
-
__assertType("dimmingDuration", undefined, __assertType__optional_su__string__2_eu.bind(void 0, dimmingDuration));
|
|
153
|
-
__assertType("level", "(optional) number", __assertType__optional_number.bind(void 0, level));
|
|
154
|
-
this.assertSupportsCommand(SceneActuatorConfigurationCommand, SceneActuatorConfigurationCommand.Set);
|
|
155
|
-
// Undefined `dimmingDuration` defaults to 0 seconds to simplify the call
|
|
156
|
-
// for actuators that don't support non-instant `dimmingDuration`
|
|
157
|
-
// Undefined `level` uses the actuator's current value (override = 0).
|
|
158
|
-
const cc = new SceneActuatorConfigurationCCSet({
|
|
159
|
-
nodeId: this.endpoint.nodeId,
|
|
160
|
-
endpointIndex: this.endpoint.index,
|
|
161
|
-
sceneId,
|
|
162
|
-
dimmingDuration: Duration.from(dimmingDuration)
|
|
163
|
-
?? new Duration(0, "seconds"),
|
|
164
|
-
level,
|
|
165
|
-
});
|
|
166
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
167
|
-
}
|
|
168
|
-
async getActive() {
|
|
169
|
-
this.assertSupportsCommand(SceneActuatorConfigurationCommand, SceneActuatorConfigurationCommand.Get);
|
|
170
|
-
const cc = new SceneActuatorConfigurationCCGet({
|
|
171
|
-
nodeId: this.endpoint.nodeId,
|
|
172
|
-
endpointIndex: this.endpoint.index,
|
|
173
|
-
sceneId: 0,
|
|
174
|
-
});
|
|
175
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
176
|
-
if (response) {
|
|
177
|
-
return pick(response, ["sceneId", "level", "dimmingDuration"]);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
178
172
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
173
|
+
get [POLL_VALUE]() {
|
|
174
|
+
return async function ({ property, propertyKey }) {
|
|
175
|
+
switch (property) {
|
|
176
|
+
case "level":
|
|
177
|
+
case "dimmingDuration": {
|
|
178
|
+
if (propertyKey == undefined) {
|
|
179
|
+
throwMissingPropertyKey(this.ccId, property);
|
|
180
|
+
}
|
|
181
|
+
else if (typeof propertyKey !== "number") {
|
|
182
|
+
throwUnsupportedPropertyKey(this.ccId, property, propertyKey);
|
|
183
|
+
}
|
|
184
|
+
return (await this.get(propertyKey))?.[property];
|
|
185
|
+
}
|
|
186
|
+
default:
|
|
187
|
+
throwUnsupportedProperty(this.ccId, property);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
185
190
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
async set(sceneId, dimmingDuration, level) {
|
|
192
|
+
__assertType("sceneId", "number", __assertType__number.bind(void 0, sceneId));
|
|
193
|
+
__assertType("dimmingDuration", undefined, __assertType__optional_su__string__2_eu.bind(void 0, dimmingDuration));
|
|
194
|
+
__assertType("level", "(optional) number", __assertType__optional_number.bind(void 0, level));
|
|
195
|
+
this.assertSupportsCommand(SceneActuatorConfigurationCommand, SceneActuatorConfigurationCommand.Set);
|
|
196
|
+
// Undefined `dimmingDuration` defaults to 0 seconds to simplify the call
|
|
197
|
+
// for actuators that don't support non-instant `dimmingDuration`
|
|
198
|
+
// Undefined `level` uses the actuator's current value (override = 0).
|
|
199
|
+
const cc = new SceneActuatorConfigurationCCSet({
|
|
200
|
+
nodeId: this.endpoint.nodeId,
|
|
201
|
+
endpointIndex: this.endpoint.index,
|
|
202
|
+
sceneId,
|
|
203
|
+
dimmingDuration: Duration.from(dimmingDuration)
|
|
204
|
+
?? new Duration(0, "seconds"),
|
|
205
|
+
level,
|
|
206
|
+
});
|
|
207
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
194
208
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
209
|
+
async getActive() {
|
|
210
|
+
this.assertSupportsCommand(SceneActuatorConfigurationCommand, SceneActuatorConfigurationCommand.Get);
|
|
211
|
+
const cc = new SceneActuatorConfigurationCCGet({
|
|
212
|
+
nodeId: this.endpoint.nodeId,
|
|
213
|
+
endpointIndex: this.endpoint.index,
|
|
214
|
+
sceneId: 0,
|
|
215
|
+
});
|
|
216
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
217
|
+
if (response) {
|
|
218
|
+
return pick(response, ["sceneId", "level", "dimmingDuration"]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async get(sceneId) {
|
|
222
|
+
__assertType("sceneId", "number", __assertType__number.bind(void 0, sceneId));
|
|
223
|
+
this.assertSupportsCommand(SceneActuatorConfigurationCommand, SceneActuatorConfigurationCommand.Get);
|
|
224
|
+
if (sceneId === 0) {
|
|
225
|
+
throw new ZWaveError(`Invalid scene ID 0. To get the currently active scene, use getActive() instead.`, ZWaveErrorCodes.Argument_Invalid);
|
|
226
|
+
}
|
|
227
|
+
const cc = new SceneActuatorConfigurationCCGet({
|
|
228
|
+
nodeId: this.endpoint.nodeId,
|
|
229
|
+
endpointIndex: this.endpoint.index,
|
|
230
|
+
sceneId: sceneId,
|
|
231
|
+
});
|
|
232
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
233
|
+
if (response) {
|
|
234
|
+
return pick(response, ["level", "dimmingDuration"]);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
return SceneActuatorConfigurationCCAPI = _classThis;
|
|
239
|
+
})();
|
|
200
240
|
export { SceneActuatorConfigurationCCAPI };
|
|
201
|
-
let SceneActuatorConfigurationCC =
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
this.ensureMetadata(ctx, dimmingDurationValue);
|
|
241
|
+
let SceneActuatorConfigurationCC = (() => {
|
|
242
|
+
let _classDecorators = [commandClass(CommandClasses["Scene Actuator Configuration"]), implementedVersion(1), ccValues(SceneActuatorConfigurationCCValues)];
|
|
243
|
+
let _classDescriptor;
|
|
244
|
+
let _classExtraInitializers = [];
|
|
245
|
+
let _classThis;
|
|
246
|
+
let _classSuper = CommandClass;
|
|
247
|
+
var SceneActuatorConfigurationCC = class extends _classSuper {
|
|
248
|
+
static { _classThis = this; }
|
|
249
|
+
static {
|
|
250
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
251
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
252
|
+
SceneActuatorConfigurationCC = _classThis = _classDescriptor.value;
|
|
253
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
254
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
216
255
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
256
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
257
|
+
async interview(ctx) {
|
|
258
|
+
const node = this.getNode(ctx);
|
|
259
|
+
ctx.logNode(node.id, {
|
|
260
|
+
message: `${this.constructor.name}: setting metadata`,
|
|
261
|
+
direction: "none",
|
|
262
|
+
});
|
|
263
|
+
// Create Metadata for all scenes
|
|
264
|
+
for (let sceneId = 1; sceneId <= 255; sceneId++) {
|
|
265
|
+
const levelValue = SceneActuatorConfigurationCCValues.level(sceneId);
|
|
266
|
+
this.ensureMetadata(ctx, levelValue);
|
|
267
|
+
const dimmingDurationValue = SceneActuatorConfigurationCCValues
|
|
268
|
+
.dimmingDuration(sceneId);
|
|
269
|
+
this.ensureMetadata(ctx, dimmingDurationValue);
|
|
270
|
+
}
|
|
271
|
+
this.setInterviewComplete(ctx, true);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
return SceneActuatorConfigurationCC = _classThis;
|
|
275
|
+
})();
|
|
225
276
|
export { SceneActuatorConfigurationCC };
|
|
226
|
-
let SceneActuatorConfigurationCCSet =
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
277
|
+
let SceneActuatorConfigurationCCSet = (() => {
|
|
278
|
+
let _classDecorators = [CCCommand(SceneActuatorConfigurationCommand.Set), useSupervision()];
|
|
279
|
+
let _classDescriptor;
|
|
280
|
+
let _classExtraInitializers = [];
|
|
281
|
+
let _classThis;
|
|
282
|
+
let _classSuper = SceneActuatorConfigurationCC;
|
|
283
|
+
var SceneActuatorConfigurationCCSet = class extends _classSuper {
|
|
284
|
+
static { _classThis = this; }
|
|
285
|
+
static {
|
|
286
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
287
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
288
|
+
SceneActuatorConfigurationCCSet = _classThis = _classDescriptor.value;
|
|
289
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
290
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
231
291
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
// nodeId: ctx.sourceNodeId,
|
|
241
|
-
// });
|
|
242
|
-
}
|
|
243
|
-
sceneId;
|
|
244
|
-
dimmingDuration;
|
|
245
|
-
level;
|
|
246
|
-
serialize(ctx) {
|
|
247
|
-
this.payload = Bytes.from([
|
|
248
|
-
this.sceneId,
|
|
249
|
-
this.dimmingDuration.serializeSet(),
|
|
250
|
-
this.level != undefined ? 0b1000_0000 : 0,
|
|
251
|
-
this.level ?? 0xff,
|
|
252
|
-
]);
|
|
253
|
-
return super.serialize(ctx);
|
|
254
|
-
}
|
|
255
|
-
toLogEntry(ctx) {
|
|
256
|
-
const message = {
|
|
257
|
-
sceneId: this.sceneId,
|
|
258
|
-
dimmingDuration: this.dimmingDuration.toString(),
|
|
259
|
-
};
|
|
260
|
-
if (this.level != undefined) {
|
|
261
|
-
message.level = this.level;
|
|
292
|
+
constructor(options) {
|
|
293
|
+
super(options);
|
|
294
|
+
if (options.sceneId < 1 || options.sceneId > 255) {
|
|
295
|
+
throw new ZWaveError(`The scene id ${options.sceneId} must be between 1 and 255!`, ZWaveErrorCodes.Argument_Invalid);
|
|
296
|
+
}
|
|
297
|
+
this.sceneId = options.sceneId;
|
|
298
|
+
this.dimmingDuration = options.dimmingDuration;
|
|
299
|
+
this.level = options.level;
|
|
262
300
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
301
|
+
static from(_raw, _ctx) {
|
|
302
|
+
// TODO: Deserialize payload
|
|
303
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
304
|
+
// return new SceneActuatorConfigurationCCSet({
|
|
305
|
+
// nodeId: ctx.sourceNodeId,
|
|
306
|
+
// });
|
|
307
|
+
}
|
|
308
|
+
sceneId;
|
|
309
|
+
dimmingDuration;
|
|
310
|
+
level;
|
|
311
|
+
serialize(ctx) {
|
|
312
|
+
this.payload = Bytes.from([
|
|
313
|
+
this.sceneId,
|
|
314
|
+
this.dimmingDuration.serializeSet(),
|
|
315
|
+
this.level != undefined ? 0b1000_0000 : 0,
|
|
316
|
+
this.level ?? 0xff,
|
|
317
|
+
]);
|
|
318
|
+
return super.serialize(ctx);
|
|
319
|
+
}
|
|
320
|
+
toLogEntry(ctx) {
|
|
321
|
+
const message = {
|
|
322
|
+
sceneId: this.sceneId,
|
|
323
|
+
dimmingDuration: this.dimmingDuration.toString(),
|
|
324
|
+
};
|
|
325
|
+
if (this.level != undefined) {
|
|
326
|
+
message.level = this.level;
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
...super.toLogEntry(ctx),
|
|
330
|
+
message,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
return SceneActuatorConfigurationCCSet = _classThis;
|
|
335
|
+
})();
|
|
273
336
|
export { SceneActuatorConfigurationCCSet };
|
|
274
|
-
let SceneActuatorConfigurationCCReport =
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
level = raw.payload[1];
|
|
289
|
-
dimmingDuration = Duration.parseReport(raw.payload[2])
|
|
290
|
-
?? Duration.unknown();
|
|
337
|
+
let SceneActuatorConfigurationCCReport = (() => {
|
|
338
|
+
let _classDecorators = [CCCommand(SceneActuatorConfigurationCommand.Report)];
|
|
339
|
+
let _classDescriptor;
|
|
340
|
+
let _classExtraInitializers = [];
|
|
341
|
+
let _classThis;
|
|
342
|
+
let _classSuper = SceneActuatorConfigurationCC;
|
|
343
|
+
var SceneActuatorConfigurationCCReport = class extends _classSuper {
|
|
344
|
+
static { _classThis = this; }
|
|
345
|
+
static {
|
|
346
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
347
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
348
|
+
SceneActuatorConfigurationCCReport = _classThis = _classDescriptor.value;
|
|
349
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
350
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
291
351
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
sceneId;
|
|
300
|
-
level;
|
|
301
|
-
dimmingDuration;
|
|
302
|
-
persistValues(ctx) {
|
|
303
|
-
if (!super.persistValues(ctx))
|
|
304
|
-
return false;
|
|
305
|
-
// Do not persist values for an inactive scene
|
|
306
|
-
if (this.sceneId === 0
|
|
307
|
-
|| this.level == undefined
|
|
308
|
-
|| this.dimmingDuration == undefined) {
|
|
309
|
-
return false;
|
|
352
|
+
constructor(options) {
|
|
353
|
+
super(options);
|
|
354
|
+
// TODO: Check implementation:
|
|
355
|
+
this.sceneId = options.sceneId;
|
|
356
|
+
this.level = options.level;
|
|
357
|
+
this.dimmingDuration = options.dimmingDuration;
|
|
310
358
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
359
|
+
static from(raw, ctx) {
|
|
360
|
+
validatePayload(raw.payload.length >= 3);
|
|
361
|
+
const sceneId = raw.payload[0];
|
|
362
|
+
let level;
|
|
363
|
+
let dimmingDuration;
|
|
364
|
+
if (sceneId !== 0) {
|
|
365
|
+
level = raw.payload[1];
|
|
366
|
+
dimmingDuration = Duration.parseReport(raw.payload[2])
|
|
367
|
+
?? Duration.unknown();
|
|
368
|
+
}
|
|
369
|
+
return new this({
|
|
370
|
+
nodeId: ctx.sourceNodeId,
|
|
371
|
+
sceneId,
|
|
372
|
+
level,
|
|
373
|
+
dimmingDuration,
|
|
374
|
+
});
|
|
326
375
|
}
|
|
327
|
-
|
|
328
|
-
|
|
376
|
+
sceneId;
|
|
377
|
+
level;
|
|
378
|
+
dimmingDuration;
|
|
379
|
+
persistValues(ctx) {
|
|
380
|
+
if (!super.persistValues(ctx))
|
|
381
|
+
return false;
|
|
382
|
+
// Do not persist values for an inactive scene
|
|
383
|
+
if (this.sceneId === 0
|
|
384
|
+
|| this.level == undefined
|
|
385
|
+
|| this.dimmingDuration == undefined) {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
const levelValue = SceneActuatorConfigurationCCValues.level(this.sceneId);
|
|
389
|
+
this.ensureMetadata(ctx, levelValue);
|
|
390
|
+
const dimmingDurationValue = SceneActuatorConfigurationCCValues
|
|
391
|
+
.dimmingDuration(this.sceneId);
|
|
392
|
+
this.ensureMetadata(ctx, dimmingDurationValue);
|
|
393
|
+
this.setValue(ctx, levelValue, this.level);
|
|
394
|
+
this.setValue(ctx, dimmingDurationValue, this.dimmingDuration);
|
|
395
|
+
return true;
|
|
329
396
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
397
|
+
toLogEntry(ctx) {
|
|
398
|
+
const message = {
|
|
399
|
+
sceneId: this.sceneId,
|
|
400
|
+
};
|
|
401
|
+
if (this.dimmingDuration != undefined) {
|
|
402
|
+
message.dimmingDuration = this.dimmingDuration.toString();
|
|
403
|
+
}
|
|
404
|
+
if (this.level != undefined) {
|
|
405
|
+
message.level = this.level;
|
|
406
|
+
}
|
|
407
|
+
return {
|
|
408
|
+
...super.toLogEntry(ctx),
|
|
409
|
+
message,
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
return SceneActuatorConfigurationCCReport = _classThis;
|
|
414
|
+
})();
|
|
339
415
|
export { SceneActuatorConfigurationCCReport };
|
|
340
416
|
function testResponseForSceneActuatorConfigurationGet(sent, received) {
|
|
341
417
|
// We expect a Scene Actuator Configuration Report that matches
|
|
342
418
|
// the requested sceneId, unless groupId 0 was requested
|
|
343
419
|
return sent.sceneId === 0 || received.sceneId === sent.sceneId;
|
|
344
420
|
}
|
|
345
|
-
let SceneActuatorConfigurationCCGet =
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
421
|
+
let SceneActuatorConfigurationCCGet = (() => {
|
|
422
|
+
let _classDecorators = [CCCommand(SceneActuatorConfigurationCommand.Get), expectedCCResponse(SceneActuatorConfigurationCCReport, testResponseForSceneActuatorConfigurationGet)];
|
|
423
|
+
let _classDescriptor;
|
|
424
|
+
let _classExtraInitializers = [];
|
|
425
|
+
let _classThis;
|
|
426
|
+
let _classSuper = SceneActuatorConfigurationCC;
|
|
427
|
+
var SceneActuatorConfigurationCCGet = class extends _classSuper {
|
|
428
|
+
static { _classThis = this; }
|
|
429
|
+
static {
|
|
430
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
431
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
432
|
+
SceneActuatorConfigurationCCGet = _classThis = _classDescriptor.value;
|
|
433
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
434
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
435
|
+
}
|
|
436
|
+
constructor(options) {
|
|
437
|
+
super(options);
|
|
438
|
+
this.sceneId = options.sceneId;
|
|
439
|
+
}
|
|
440
|
+
static from(_raw, _ctx) {
|
|
441
|
+
// TODO: Deserialize payload
|
|
442
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
443
|
+
// return new SceneActuatorConfigurationCCGet({
|
|
444
|
+
// nodeId: ctx.sourceNodeId,
|
|
445
|
+
// });
|
|
446
|
+
}
|
|
447
|
+
sceneId;
|
|
448
|
+
serialize(ctx) {
|
|
449
|
+
this.payload = Bytes.from([this.sceneId]);
|
|
450
|
+
return super.serialize(ctx);
|
|
451
|
+
}
|
|
452
|
+
toLogEntry(ctx) {
|
|
453
|
+
return {
|
|
454
|
+
...super.toLogEntry(ctx),
|
|
455
|
+
message: { "scene id": this.sceneId },
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
return SceneActuatorConfigurationCCGet = _classThis;
|
|
460
|
+
})();
|
|
373
461
|
export { SceneActuatorConfigurationCCGet };
|
|
374
462
|
//# sourceMappingURL=SceneActuatorConfigurationCC.js.map
|