@zwave-js/cc 14.0.0-beta.4 → 14.0.0-beta.5
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
|
@@ -33,13 +33,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
33
33
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
34
34
|
var import_Values = require("../lib/Values.js");
|
|
35
35
|
var import_Types = require("../lib/_Types.js");
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
37
|
+
function accept(f) {
|
|
38
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
39
|
+
return f;
|
|
40
|
+
}
|
|
41
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
42
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
43
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
44
|
+
var _, done = false;
|
|
45
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
46
|
+
var context = {};
|
|
47
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
48
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
49
|
+
context.addInitializer = function(f) {
|
|
50
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
51
|
+
extraInitializers.push(accept(f || null));
|
|
52
|
+
};
|
|
53
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
54
|
+
if (kind === "accessor") {
|
|
55
|
+
if (result === void 0) continue;
|
|
56
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
57
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
58
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
59
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
60
|
+
} else if (_ = accept(result)) {
|
|
61
|
+
if (kind === "field") initializers.unshift(_);
|
|
62
|
+
else descriptor[key] = _;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
66
|
+
done = true;
|
|
67
|
+
};
|
|
68
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
69
|
+
var useValue = arguments.length > 2;
|
|
70
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
71
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
72
|
+
}
|
|
73
|
+
return useValue ? value : void 0;
|
|
41
74
|
};
|
|
42
|
-
var BinarySwitchCCSet_1, BinarySwitchCCReport_1;
|
|
43
75
|
function __assertType(argName, typeName, boundHasError) {
|
|
44
76
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
45
77
|
if (boundHasError()) {
|
|
@@ -95,277 +127,339 @@ const BinarySwitchCCValues = Object.freeze({
|
|
|
95
127
|
}, { minVersion: 2 })
|
|
96
128
|
})
|
|
97
129
|
});
|
|
98
|
-
let BinarySwitchCCAPI =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
130
|
+
let BinarySwitchCCAPI = (() => {
|
|
131
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Binary Switch"])];
|
|
132
|
+
let _classDescriptor;
|
|
133
|
+
let _classExtraInitializers = [];
|
|
134
|
+
let _classThis;
|
|
135
|
+
let _classSuper = import_API.CCAPI;
|
|
136
|
+
var BinarySwitchCCAPI2 = class extends _classSuper {
|
|
137
|
+
static {
|
|
138
|
+
_classThis = this;
|
|
105
139
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
nodeId: this.endpoint.nodeId,
|
|
113
|
-
endpointIndex: this.endpoint.index
|
|
114
|
-
});
|
|
115
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
116
|
-
if (response) {
|
|
117
|
-
return {
|
|
118
|
-
// interpret unknown values as false
|
|
119
|
-
currentValue: response.currentValue || false,
|
|
120
|
-
targetValue: response.targetValue,
|
|
121
|
-
duration: response.duration
|
|
122
|
-
};
|
|
140
|
+
static {
|
|
141
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
142
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
143
|
+
BinarySwitchCCAPI2 = _classThis = _classDescriptor.value;
|
|
144
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
145
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
123
146
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
async set(targetValue, duration) {
|
|
131
|
-
__assertType("targetValue", "boolean", __assertType__boolean.bind(void 0, targetValue));
|
|
132
|
-
__assertType("duration", void 0, __assertType__optional_su__string__2_eu.bind(void 0, duration));
|
|
133
|
-
this.assertSupportsCommand(import_Types.BinarySwitchCommand, import_Types.BinarySwitchCommand.Set);
|
|
134
|
-
const cc = new BinarySwitchCCSet({
|
|
135
|
-
nodeId: this.endpoint.nodeId,
|
|
136
|
-
endpointIndex: this.endpoint.index,
|
|
137
|
-
targetValue,
|
|
138
|
-
duration
|
|
139
|
-
});
|
|
140
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
141
|
-
}
|
|
142
|
-
get [import_API.SET_VALUE]() {
|
|
143
|
-
return async function({ property }, value, options) {
|
|
144
|
-
if (property !== "targetValue") {
|
|
145
|
-
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
147
|
+
supportsCommand(cmd) {
|
|
148
|
+
switch (cmd) {
|
|
149
|
+
case import_Types.BinarySwitchCommand.Get:
|
|
150
|
+
return this.isSinglecast();
|
|
151
|
+
case import_Types.BinarySwitchCommand.Set:
|
|
152
|
+
return true;
|
|
146
153
|
}
|
|
147
|
-
|
|
148
|
-
|
|
154
|
+
return super.supportsCommand(cmd);
|
|
155
|
+
}
|
|
156
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
157
|
+
async get() {
|
|
158
|
+
this.assertSupportsCommand(import_Types.BinarySwitchCommand, import_Types.BinarySwitchCommand.Get);
|
|
159
|
+
const cc = new BinarySwitchCCGet({
|
|
160
|
+
nodeId: this.endpoint.nodeId,
|
|
161
|
+
endpointIndex: this.endpoint.index
|
|
162
|
+
});
|
|
163
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
164
|
+
if (response) {
|
|
165
|
+
return {
|
|
166
|
+
// interpret unknown values as false
|
|
167
|
+
currentValue: response.currentValue || false,
|
|
168
|
+
targetValue: response.targetValue,
|
|
169
|
+
duration: response.duration
|
|
170
|
+
};
|
|
149
171
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Sets the switch to the given value
|
|
175
|
+
* @param targetValue The target value to set
|
|
176
|
+
* @param duration The duration after which the target value should be reached. Can be a Duration instance or a user-friendly duration string like `"1m17s"`. Only supported in V2 and above.
|
|
177
|
+
*/
|
|
178
|
+
async set(targetValue, duration) {
|
|
179
|
+
__assertType("targetValue", "boolean", __assertType__boolean.bind(void 0, targetValue));
|
|
180
|
+
__assertType("duration", void 0, __assertType__optional_su__string__2_eu.bind(void 0, duration));
|
|
181
|
+
this.assertSupportsCommand(import_Types.BinarySwitchCommand, import_Types.BinarySwitchCommand.Set);
|
|
182
|
+
const cc = new BinarySwitchCCSet({
|
|
183
|
+
nodeId: this.endpoint.nodeId,
|
|
184
|
+
endpointIndex: this.endpoint.index,
|
|
185
|
+
targetValue,
|
|
186
|
+
duration
|
|
187
|
+
});
|
|
188
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
189
|
+
}
|
|
190
|
+
get [import_API.SET_VALUE]() {
|
|
191
|
+
return async function({ property }, value, options) {
|
|
192
|
+
if (property !== "targetValue") {
|
|
193
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
194
|
+
}
|
|
195
|
+
if (typeof value !== "boolean") {
|
|
196
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "boolean", typeof value);
|
|
197
|
+
}
|
|
198
|
+
const duration = import_safe.Duration.from(options?.transitionDuration);
|
|
199
|
+
return this.set(value, duration);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
[import_API.SET_VALUE_HOOKS] = ({ property }, value, options) => {
|
|
203
|
+
if (property === "targetValue") {
|
|
204
|
+
const currentValueValueId = BinarySwitchCCValues.currentValue.endpoint(this.endpoint.index);
|
|
205
|
+
return {
|
|
206
|
+
optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {
|
|
207
|
+
if (this.isSinglecast()) {
|
|
208
|
+
this.tryGetValueDB()?.setValue(currentValueValueId, value);
|
|
209
|
+
} else if (this.isMulticast()) {
|
|
210
|
+
const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
|
|
211
|
+
for (const node of affectedNodes) {
|
|
212
|
+
this.host.tryGetValueDB(node.id)?.setValue(currentValueValueId, value);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
verifyChanges: () => {
|
|
217
|
+
if (this.isSinglecast()) {
|
|
218
|
+
this.schedulePoll(currentValueValueId, value, {
|
|
219
|
+
duration: import_safe.Duration.from(options?.transitionDuration),
|
|
220
|
+
// on/off "transitions" are usually fast
|
|
221
|
+
transition: "fast"
|
|
222
|
+
});
|
|
223
|
+
} else {
|
|
165
224
|
}
|
|
166
225
|
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
get [import_API.POLL_VALUE]() {
|
|
230
|
+
return async function({ property }) {
|
|
231
|
+
switch (property) {
|
|
232
|
+
case "currentValue":
|
|
233
|
+
case "targetValue":
|
|
234
|
+
case "duration":
|
|
235
|
+
return (await this.get())?.[property];
|
|
236
|
+
default:
|
|
237
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
177
238
|
}
|
|
178
239
|
};
|
|
179
240
|
}
|
|
180
241
|
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
ctx
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
242
|
+
return BinarySwitchCCAPI2 = _classThis;
|
|
243
|
+
})();
|
|
244
|
+
let BinarySwitchCC = (() => {
|
|
245
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Binary Switch"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(BinarySwitchCCValues)];
|
|
246
|
+
let _classDescriptor;
|
|
247
|
+
let _classExtraInitializers = [];
|
|
248
|
+
let _classThis;
|
|
249
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
250
|
+
var BinarySwitchCC2 = class extends _classSuper {
|
|
251
|
+
static {
|
|
252
|
+
_classThis = this;
|
|
253
|
+
}
|
|
254
|
+
static {
|
|
255
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
256
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
257
|
+
BinarySwitchCC2 = _classThis = _classDescriptor.value;
|
|
258
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
259
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
260
|
+
}
|
|
261
|
+
async interview(ctx) {
|
|
262
|
+
const node = this.getNode(ctx);
|
|
263
|
+
ctx.logNode(node.id, {
|
|
264
|
+
endpoint: this.endpointIndex,
|
|
265
|
+
message: `Interviewing ${this.ccName}...`,
|
|
266
|
+
direction: "none"
|
|
267
|
+
});
|
|
268
|
+
await this.refreshValues(ctx);
|
|
269
|
+
this.setInterviewComplete(ctx, true);
|
|
270
|
+
}
|
|
271
|
+
async refreshValues(ctx) {
|
|
272
|
+
const node = this.getNode(ctx);
|
|
273
|
+
const endpoint = this.getEndpoint(ctx);
|
|
274
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Binary Switch"], ctx, endpoint).withOptions({
|
|
275
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
276
|
+
});
|
|
277
|
+
ctx.logNode(node.id, {
|
|
278
|
+
endpoint: this.endpointIndex,
|
|
279
|
+
message: "querying Binary Switch state...",
|
|
280
|
+
direction: "outbound"
|
|
281
|
+
});
|
|
282
|
+
const resp = await api.get();
|
|
283
|
+
if (resp) {
|
|
284
|
+
let logMessage = `received Binary Switch state:
|
|
222
285
|
current value: ${resp.currentValue}`;
|
|
223
|
-
|
|
224
|
-
|
|
286
|
+
if (resp.targetValue != void 0) {
|
|
287
|
+
logMessage += `
|
|
225
288
|
target value: ${resp.targetValue}
|
|
226
289
|
remaining duration: ${resp.duration?.toString() ?? "undefined"}`;
|
|
290
|
+
}
|
|
291
|
+
ctx.logNode(node.id, {
|
|
292
|
+
endpoint: this.endpointIndex,
|
|
293
|
+
message: logMessage,
|
|
294
|
+
direction: "inbound"
|
|
295
|
+
});
|
|
227
296
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
297
|
+
}
|
|
298
|
+
setMappedBasicValue(ctx, value) {
|
|
299
|
+
this.setValue(ctx, BinarySwitchCCValues.currentValue, value > 0);
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
return BinarySwitchCC2 = _classThis;
|
|
304
|
+
})();
|
|
305
|
+
let BinarySwitchCCSet = (() => {
|
|
306
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BinarySwitchCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
307
|
+
let _classDescriptor;
|
|
308
|
+
let _classExtraInitializers = [];
|
|
309
|
+
let _classThis;
|
|
310
|
+
let _classSuper = BinarySwitchCC;
|
|
311
|
+
var BinarySwitchCCSet2 = class extends _classSuper {
|
|
312
|
+
static {
|
|
313
|
+
_classThis = this;
|
|
314
|
+
}
|
|
315
|
+
static {
|
|
316
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
317
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
318
|
+
BinarySwitchCCSet2 = _classThis = _classDescriptor.value;
|
|
319
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
320
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
321
|
+
}
|
|
322
|
+
constructor(options) {
|
|
323
|
+
super(options);
|
|
324
|
+
this.targetValue = options.targetValue;
|
|
325
|
+
this.duration = import_safe.Duration.from(options.duration);
|
|
326
|
+
}
|
|
327
|
+
static from(raw, ctx) {
|
|
328
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
329
|
+
const targetValue = !!raw.payload[0];
|
|
330
|
+
let duration;
|
|
331
|
+
if (raw.payload.length >= 2) {
|
|
332
|
+
duration = import_safe.Duration.parseSet(raw.payload[1]);
|
|
333
|
+
}
|
|
334
|
+
return new this({
|
|
335
|
+
nodeId: ctx.sourceNodeId,
|
|
336
|
+
targetValue,
|
|
337
|
+
duration
|
|
232
338
|
});
|
|
233
339
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
constructor(options) {
|
|
247
|
-
super(options);
|
|
248
|
-
this.targetValue = options.targetValue;
|
|
249
|
-
this.duration = import_safe.Duration.from(options.duration);
|
|
250
|
-
}
|
|
251
|
-
static from(raw, ctx) {
|
|
252
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
253
|
-
const targetValue = !!raw.payload[0];
|
|
254
|
-
let duration;
|
|
255
|
-
if (raw.payload.length >= 2) {
|
|
256
|
-
duration = import_safe.Duration.parseSet(raw.payload[1]);
|
|
340
|
+
targetValue;
|
|
341
|
+
duration;
|
|
342
|
+
serialize(ctx) {
|
|
343
|
+
this.payload = import_safe2.Bytes.from([
|
|
344
|
+
this.targetValue ? 255 : 0,
|
|
345
|
+
(this.duration ?? import_safe.Duration.default()).serializeSet()
|
|
346
|
+
]);
|
|
347
|
+
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
348
|
+
if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
|
|
349
|
+
this.payload = this.payload.subarray(0, 1);
|
|
350
|
+
}
|
|
351
|
+
return super.serialize(ctx);
|
|
257
352
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
(this.duration ?? import_safe.Duration.default()).serializeSet()
|
|
270
|
-
]);
|
|
271
|
-
const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
|
|
272
|
-
if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
|
|
273
|
-
this.payload = this.payload.subarray(0, 1);
|
|
353
|
+
toLogEntry(ctx) {
|
|
354
|
+
const message = {
|
|
355
|
+
"target value": this.targetValue
|
|
356
|
+
};
|
|
357
|
+
if (this.duration != void 0) {
|
|
358
|
+
message.duration = this.duration.toString();
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
...super.toLogEntry(ctx),
|
|
362
|
+
message
|
|
363
|
+
};
|
|
274
364
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
365
|
+
};
|
|
366
|
+
return BinarySwitchCCSet2 = _classThis;
|
|
367
|
+
})();
|
|
368
|
+
let BinarySwitchCCReport = (() => {
|
|
369
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BinarySwitchCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("currentValue", BinarySwitchCCValues.currentValue), (0, import_CommandClassDecorators.ccValueProperty)("targetValue", BinarySwitchCCValues.targetValue), (0, import_CommandClassDecorators.ccValueProperty)("duration", BinarySwitchCCValues.duration)];
|
|
370
|
+
let _classDescriptor;
|
|
371
|
+
let _classExtraInitializers = [];
|
|
372
|
+
let _classThis;
|
|
373
|
+
let _classSuper = BinarySwitchCC;
|
|
374
|
+
var BinarySwitchCCReport2 = class extends _classSuper {
|
|
375
|
+
static {
|
|
376
|
+
_classThis = this;
|
|
283
377
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
BinarySwitchCCSet = BinarySwitchCCSet_1 = __decorate([
|
|
291
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BinarySwitchCommand.Set),
|
|
292
|
-
(0, import_CommandClassDecorators.useSupervision)()
|
|
293
|
-
], BinarySwitchCCSet);
|
|
294
|
-
let BinarySwitchCCReport = BinarySwitchCCReport_1 = class BinarySwitchCCReport2 extends BinarySwitchCC {
|
|
295
|
-
constructor(options) {
|
|
296
|
-
super(options);
|
|
297
|
-
this.currentValue = options.currentValue;
|
|
298
|
-
this.targetValue = options.targetValue;
|
|
299
|
-
this.duration = import_safe.Duration.from(options.duration);
|
|
300
|
-
}
|
|
301
|
-
static from(raw, ctx) {
|
|
302
|
-
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
303
|
-
const currentValue = (0, import_safe.parseMaybeBoolean)(raw.payload[0]);
|
|
304
|
-
let targetValue;
|
|
305
|
-
let duration;
|
|
306
|
-
if (raw.payload.length >= 3) {
|
|
307
|
-
targetValue = (0, import_safe.parseMaybeBoolean)(raw.payload[1]);
|
|
308
|
-
duration = import_safe.Duration.parseReport(raw.payload[2]);
|
|
378
|
+
static {
|
|
379
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
380
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
381
|
+
BinarySwitchCCReport2 = _classThis = _classDescriptor.value;
|
|
382
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
383
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
309
384
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
currentValue
|
|
313
|
-
targetValue
|
|
314
|
-
duration
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
385
|
+
constructor(options) {
|
|
386
|
+
super(options);
|
|
387
|
+
this.currentValue = options.currentValue;
|
|
388
|
+
this.targetValue = options.targetValue;
|
|
389
|
+
this.duration = import_safe.Duration.from(options.duration);
|
|
390
|
+
}
|
|
391
|
+
static from(raw, ctx) {
|
|
392
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
393
|
+
const currentValue = (0, import_safe.parseMaybeBoolean)(raw.payload[0]);
|
|
394
|
+
let targetValue;
|
|
395
|
+
let duration;
|
|
396
|
+
if (raw.payload.length >= 3) {
|
|
397
|
+
targetValue = (0, import_safe.parseMaybeBoolean)(raw.payload[1]);
|
|
398
|
+
duration = import_safe.Duration.parseReport(raw.payload[2]);
|
|
399
|
+
}
|
|
400
|
+
return new this({
|
|
401
|
+
nodeId: ctx.sourceNodeId,
|
|
402
|
+
currentValue,
|
|
403
|
+
targetValue,
|
|
404
|
+
duration
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
currentValue;
|
|
408
|
+
targetValue;
|
|
409
|
+
duration;
|
|
410
|
+
serialize(ctx) {
|
|
411
|
+
this.payload = import_safe2.Bytes.from([
|
|
412
|
+
(0, import_safe.encodeMaybeBoolean)(this.currentValue ?? import_safe.UNKNOWN_STATE)
|
|
331
413
|
]);
|
|
414
|
+
if (this.targetValue !== void 0) {
|
|
415
|
+
this.payload = import_safe2.Bytes.concat([
|
|
416
|
+
this.payload,
|
|
417
|
+
import_safe2.Bytes.from([
|
|
418
|
+
(0, import_safe.encodeMaybeBoolean)(this.targetValue),
|
|
419
|
+
(this.duration ?? import_safe.Duration.default()).serializeReport()
|
|
420
|
+
])
|
|
421
|
+
]);
|
|
422
|
+
}
|
|
423
|
+
return super.serialize(ctx);
|
|
332
424
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
425
|
+
toLogEntry(ctx) {
|
|
426
|
+
const message = {
|
|
427
|
+
"current value": (0, import_safe.maybeUnknownToString)(this.currentValue)
|
|
428
|
+
};
|
|
429
|
+
if (this.targetValue !== void 0) {
|
|
430
|
+
message["target value"] = (0, import_safe.maybeUnknownToString)(this.targetValue);
|
|
431
|
+
}
|
|
432
|
+
if (this.duration != void 0) {
|
|
433
|
+
message.duration = this.duration.toString();
|
|
434
|
+
}
|
|
435
|
+
return {
|
|
436
|
+
...super.toLogEntry(ctx),
|
|
437
|
+
message
|
|
438
|
+
};
|
|
341
439
|
}
|
|
342
|
-
|
|
343
|
-
|
|
440
|
+
};
|
|
441
|
+
return BinarySwitchCCReport2 = _classThis;
|
|
442
|
+
})();
|
|
443
|
+
let BinarySwitchCCGet = (() => {
|
|
444
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BinarySwitchCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(BinarySwitchCCReport)];
|
|
445
|
+
let _classDescriptor;
|
|
446
|
+
let _classExtraInitializers = [];
|
|
447
|
+
let _classThis;
|
|
448
|
+
let _classSuper = BinarySwitchCC;
|
|
449
|
+
var BinarySwitchCCGet2 = class extends _classSuper {
|
|
450
|
+
static {
|
|
451
|
+
_classThis = this;
|
|
344
452
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
(0, import_CommandClassDecorators.ccValue)(BinarySwitchCCValues.targetValue)
|
|
356
|
-
], BinarySwitchCCReport.prototype, "targetValue", void 0);
|
|
357
|
-
__decorate([
|
|
358
|
-
(0, import_CommandClassDecorators.ccValue)(BinarySwitchCCValues.duration)
|
|
359
|
-
], BinarySwitchCCReport.prototype, "duration", void 0);
|
|
360
|
-
BinarySwitchCCReport = BinarySwitchCCReport_1 = __decorate([
|
|
361
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BinarySwitchCommand.Report)
|
|
362
|
-
], BinarySwitchCCReport);
|
|
363
|
-
let BinarySwitchCCGet = class BinarySwitchCCGet2 extends BinarySwitchCC {
|
|
364
|
-
};
|
|
365
|
-
BinarySwitchCCGet = __decorate([
|
|
366
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.BinarySwitchCommand.Get),
|
|
367
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(BinarySwitchCCReport)
|
|
368
|
-
], BinarySwitchCCGet);
|
|
453
|
+
static {
|
|
454
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
455
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
456
|
+
BinarySwitchCCGet2 = _classThis = _classDescriptor.value;
|
|
457
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
458
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
return BinarySwitchCCGet2 = _classThis;
|
|
462
|
+
})();
|
|
369
463
|
// Annotate the CommonJS export names for ESM import in node:
|
|
370
464
|
0 && (module.exports = {
|
|
371
465
|
BinarySwitchCC,
|