@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
package/build/esm/cc/TimeCC.js
CHANGED
|
@@ -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 TimeCCTimeReport_1, TimeCCDateReport_1, TimeCCTimeOffsetReport_1;
|
|
8
35
|
function __assertType(argName, typeName, boundHasError) {
|
|
9
36
|
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
10
37
|
if (boundHasError()) {
|
|
@@ -78,374 +105,486 @@ import { TimeCommand } from "../lib/_Types.js";
|
|
|
78
105
|
import { encodeTimezone, parseTimezone } from "../lib/serializers.js";
|
|
79
106
|
// @noSetValueAPI
|
|
80
107
|
// Only the timezone information can be set and that accepts a non-primitive value
|
|
81
|
-
let TimeCCAPI =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return super.supportsCommand(cmd);
|
|
96
|
-
}
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
98
|
-
async getTime() {
|
|
99
|
-
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeGet);
|
|
100
|
-
const cc = new TimeCCTimeGet({
|
|
101
|
-
nodeId: this.endpoint.nodeId,
|
|
102
|
-
endpointIndex: this.endpoint.index,
|
|
103
|
-
});
|
|
104
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
105
|
-
if (response) {
|
|
106
|
-
return pick(response, ["hour", "minute", "second"]);
|
|
108
|
+
let TimeCCAPI = (() => {
|
|
109
|
+
let _classDecorators = [API(CommandClasses.Time)];
|
|
110
|
+
let _classDescriptor;
|
|
111
|
+
let _classExtraInitializers = [];
|
|
112
|
+
let _classThis;
|
|
113
|
+
let _classSuper = CCAPI;
|
|
114
|
+
var TimeCCAPI = class extends _classSuper {
|
|
115
|
+
static { _classThis = this; }
|
|
116
|
+
static {
|
|
117
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
118
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
119
|
+
TimeCCAPI = _classThis = _classDescriptor.value;
|
|
120
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
121
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
107
122
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
124
|
-
async getDate() {
|
|
125
|
-
this.assertSupportsCommand(TimeCommand, TimeCommand.DateGet);
|
|
126
|
-
const cc = new TimeCCDateGet({
|
|
127
|
-
nodeId: this.endpoint.nodeId,
|
|
128
|
-
endpointIndex: this.endpoint.index,
|
|
129
|
-
});
|
|
130
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
131
|
-
if (response) {
|
|
132
|
-
return pick(response, ["day", "month", "year"]);
|
|
123
|
+
supportsCommand(cmd) {
|
|
124
|
+
switch (cmd) {
|
|
125
|
+
case TimeCommand.TimeGet:
|
|
126
|
+
case TimeCommand.TimeReport:
|
|
127
|
+
case TimeCommand.DateGet:
|
|
128
|
+
case TimeCommand.DateReport:
|
|
129
|
+
return this.isSinglecast(); // "mandatory"
|
|
130
|
+
case TimeCommand.TimeOffsetGet:
|
|
131
|
+
case TimeCommand.TimeOffsetReport:
|
|
132
|
+
return this.version >= 2 && this.isSinglecast();
|
|
133
|
+
case TimeCommand.TimeOffsetSet:
|
|
134
|
+
return this.version >= 2;
|
|
135
|
+
}
|
|
136
|
+
return super.supportsCommand(cmd);
|
|
133
137
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
day,
|
|
146
|
-
});
|
|
147
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
148
|
-
}
|
|
149
|
-
async setTimezone(timezone) {
|
|
150
|
-
__assertType("timezone", "DSTInfo", __assertType__DSTInfo.bind(void 0, timezone));
|
|
151
|
-
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetSet);
|
|
152
|
-
const cc = new TimeCCTimeOffsetSet({
|
|
153
|
-
nodeId: this.endpoint.nodeId,
|
|
154
|
-
endpointIndex: this.endpoint.index,
|
|
155
|
-
standardOffset: timezone.standardOffset,
|
|
156
|
-
dstOffset: timezone.dstOffset,
|
|
157
|
-
dstStart: timezone.startDate,
|
|
158
|
-
dstEnd: timezone.endDate,
|
|
159
|
-
});
|
|
160
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
161
|
-
}
|
|
162
|
-
async getTimezone() {
|
|
163
|
-
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetGet);
|
|
164
|
-
const cc = new TimeCCTimeOffsetGet({
|
|
165
|
-
nodeId: this.endpoint.nodeId,
|
|
166
|
-
endpointIndex: this.endpoint.index,
|
|
167
|
-
});
|
|
168
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
169
|
-
if (response) {
|
|
170
|
-
return {
|
|
171
|
-
standardOffset: response.standardOffset,
|
|
172
|
-
dstOffset: response.dstOffset,
|
|
173
|
-
startDate: response.dstStartDate,
|
|
174
|
-
endDate: response.dstEndDate,
|
|
175
|
-
};
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
139
|
+
async getTime() {
|
|
140
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeGet);
|
|
141
|
+
const cc = new TimeCCTimeGet({
|
|
142
|
+
nodeId: this.endpoint.nodeId,
|
|
143
|
+
endpointIndex: this.endpoint.index,
|
|
144
|
+
});
|
|
145
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
146
|
+
if (response) {
|
|
147
|
+
return pick(response, ["hour", "minute", "second"]);
|
|
148
|
+
}
|
|
176
149
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
150
|
+
async reportTime(hour, minute, second) {
|
|
151
|
+
__assertType("hour", "number", __assertType__number.bind(void 0, hour));
|
|
152
|
+
__assertType("minute", "number", __assertType__number.bind(void 0, minute));
|
|
153
|
+
__assertType("second", "number", __assertType__number.bind(void 0, second));
|
|
154
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeReport);
|
|
155
|
+
const cc = new TimeCCTimeReport({
|
|
156
|
+
nodeId: this.endpoint.nodeId,
|
|
157
|
+
endpointIndex: this.endpoint.index,
|
|
158
|
+
hour,
|
|
159
|
+
minute,
|
|
160
|
+
second,
|
|
161
|
+
});
|
|
162
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
163
|
+
}
|
|
164
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
165
|
+
async getDate() {
|
|
166
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.DateGet);
|
|
167
|
+
const cc = new TimeCCDateGet({
|
|
168
|
+
nodeId: this.endpoint.nodeId,
|
|
169
|
+
endpointIndex: this.endpoint.index,
|
|
170
|
+
});
|
|
171
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
172
|
+
if (response) {
|
|
173
|
+
return pick(response, ["day", "month", "year"]);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
async reportDate(year, month, day) {
|
|
177
|
+
__assertType("year", "number", __assertType__number.bind(void 0, year));
|
|
178
|
+
__assertType("month", "number", __assertType__number.bind(void 0, month));
|
|
179
|
+
__assertType("day", "number", __assertType__number.bind(void 0, day));
|
|
180
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.DateReport);
|
|
181
|
+
const cc = new TimeCCDateReport({
|
|
182
|
+
nodeId: this.endpoint.nodeId,
|
|
183
|
+
endpointIndex: this.endpoint.index,
|
|
184
|
+
year,
|
|
185
|
+
month,
|
|
186
|
+
day,
|
|
187
|
+
});
|
|
188
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
189
|
+
}
|
|
190
|
+
async setTimezone(timezone) {
|
|
191
|
+
__assertType("timezone", "DSTInfo", __assertType__DSTInfo.bind(void 0, timezone));
|
|
192
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetSet);
|
|
193
|
+
const cc = new TimeCCTimeOffsetSet({
|
|
194
|
+
nodeId: this.endpoint.nodeId,
|
|
195
|
+
endpointIndex: this.endpoint.index,
|
|
196
|
+
standardOffset: timezone.standardOffset,
|
|
197
|
+
dstOffset: timezone.dstOffset,
|
|
198
|
+
dstStart: timezone.startDate,
|
|
199
|
+
dstEnd: timezone.endDate,
|
|
200
|
+
});
|
|
201
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
202
|
+
}
|
|
203
|
+
async getTimezone() {
|
|
204
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetGet);
|
|
205
|
+
const cc = new TimeCCTimeOffsetGet({
|
|
206
|
+
nodeId: this.endpoint.nodeId,
|
|
207
|
+
endpointIndex: this.endpoint.index,
|
|
208
|
+
});
|
|
209
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
210
|
+
if (response) {
|
|
211
|
+
return {
|
|
212
|
+
standardOffset: response.standardOffset,
|
|
213
|
+
dstOffset: response.dstOffset,
|
|
214
|
+
startDate: response.dstStartDate,
|
|
215
|
+
endDate: response.dstEndDate,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
async reportTimezone(timezone) {
|
|
220
|
+
__assertType("timezone", "DSTInfo", __assertType__DSTInfo.bind(void 0, timezone));
|
|
221
|
+
this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetReport);
|
|
222
|
+
const cc = new TimeCCTimeOffsetReport({
|
|
223
|
+
nodeId: this.endpoint.nodeId,
|
|
224
|
+
endpointIndex: this.endpoint.index,
|
|
225
|
+
standardOffset: timezone.standardOffset,
|
|
226
|
+
dstOffset: timezone.dstOffset,
|
|
227
|
+
dstStart: timezone.startDate,
|
|
228
|
+
dstEnd: timezone.endDate,
|
|
229
|
+
});
|
|
230
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
return TimeCCAPI = _classThis;
|
|
234
|
+
})();
|
|
195
235
|
export { TimeCCAPI };
|
|
196
|
-
let TimeCC =
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
236
|
+
let TimeCC = (() => {
|
|
237
|
+
let _classDecorators = [commandClass(CommandClasses.Time), implementedVersion(2)];
|
|
238
|
+
let _classDescriptor;
|
|
239
|
+
let _classExtraInitializers = [];
|
|
240
|
+
let _classThis;
|
|
241
|
+
let _classSuper = CommandClass;
|
|
242
|
+
var TimeCC = class extends _classSuper {
|
|
243
|
+
static { _classThis = this; }
|
|
244
|
+
static {
|
|
245
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
246
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
247
|
+
TimeCC = _classThis = _classDescriptor.value;
|
|
248
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
249
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
250
|
+
}
|
|
251
|
+
async interview(ctx) {
|
|
252
|
+
const node = this.getNode(ctx);
|
|
253
|
+
const endpoint = this.getEndpoint(ctx);
|
|
254
|
+
const api = CCAPI.create(CommandClasses.Time, ctx, endpoint).withOptions({
|
|
255
|
+
priority: MessagePriority.NodeQuery,
|
|
256
|
+
});
|
|
210
257
|
ctx.logNode(node.id, {
|
|
211
258
|
endpoint: this.endpointIndex,
|
|
212
|
-
message:
|
|
213
|
-
direction: "
|
|
259
|
+
message: `Interviewing ${this.ccName}...`,
|
|
260
|
+
direction: "none",
|
|
214
261
|
});
|
|
215
|
-
//
|
|
216
|
-
|
|
217
|
-
|
|
262
|
+
// Synchronize the slave's time
|
|
263
|
+
if (api.version >= 2) {
|
|
264
|
+
ctx.logNode(node.id, {
|
|
265
|
+
endpoint: this.endpointIndex,
|
|
266
|
+
message: "setting timezone information...",
|
|
267
|
+
direction: "outbound",
|
|
268
|
+
});
|
|
269
|
+
// Set the correct timezone on this node
|
|
270
|
+
const timezone = getDSTInfo();
|
|
271
|
+
await api.setTimezone(timezone);
|
|
272
|
+
}
|
|
273
|
+
// Remember that the interview is complete
|
|
274
|
+
this.setInterviewComplete(ctx, true);
|
|
218
275
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
};
|
|
223
|
-
TimeCC = __decorate([
|
|
224
|
-
commandClass(CommandClasses.Time),
|
|
225
|
-
implementedVersion(2)
|
|
226
|
-
], TimeCC);
|
|
276
|
+
};
|
|
277
|
+
return TimeCC = _classThis;
|
|
278
|
+
})();
|
|
227
279
|
export { TimeCC };
|
|
228
|
-
let TimeCCTimeReport =
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
this
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
]
|
|
280
|
+
let TimeCCTimeReport = (() => {
|
|
281
|
+
let _classDecorators = [CCCommand(TimeCommand.TimeReport)];
|
|
282
|
+
let _classDescriptor;
|
|
283
|
+
let _classExtraInitializers = [];
|
|
284
|
+
let _classThis;
|
|
285
|
+
let _classSuper = TimeCC;
|
|
286
|
+
var TimeCCTimeReport = class extends _classSuper {
|
|
287
|
+
static { _classThis = this; }
|
|
288
|
+
static {
|
|
289
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
290
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
291
|
+
TimeCCTimeReport = _classThis = _classDescriptor.value;
|
|
292
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
293
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
294
|
+
}
|
|
295
|
+
constructor(options) {
|
|
296
|
+
super(options);
|
|
297
|
+
this.hour = options.hour;
|
|
298
|
+
this.minute = options.minute;
|
|
299
|
+
this.second = options.second;
|
|
300
|
+
}
|
|
301
|
+
static from(raw, ctx) {
|
|
302
|
+
validatePayload(raw.payload.length >= 3);
|
|
303
|
+
const hour = raw.payload[0] & 0b11111;
|
|
304
|
+
const minute = raw.payload[1];
|
|
305
|
+
const second = raw.payload[2];
|
|
306
|
+
validatePayload(hour >= 0, hour <= 23, minute >= 0, minute <= 59, second >= 0, second <= 59);
|
|
307
|
+
return new this({
|
|
308
|
+
nodeId: ctx.sourceNodeId,
|
|
309
|
+
hour,
|
|
310
|
+
minute,
|
|
311
|
+
second,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
hour;
|
|
315
|
+
minute;
|
|
316
|
+
second;
|
|
317
|
+
serialize(ctx) {
|
|
318
|
+
this.payload = Bytes.from([
|
|
319
|
+
this.hour & 0b11111,
|
|
320
|
+
this.minute,
|
|
321
|
+
this.second,
|
|
322
|
+
]);
|
|
323
|
+
return super.serialize(ctx);
|
|
324
|
+
}
|
|
325
|
+
toLogEntry(ctx) {
|
|
326
|
+
return {
|
|
327
|
+
...super.toLogEntry(ctx),
|
|
328
|
+
message: {
|
|
329
|
+
time: `${padStart(this.hour.toString(), 2, "0")}:${padStart(this.minute.toString(), 2, "0")}:${padStart(this.second.toString(), 2, "0")}`,
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
return TimeCCTimeReport = _classThis;
|
|
335
|
+
})();
|
|
271
336
|
export { TimeCCTimeReport };
|
|
272
|
-
let TimeCCTimeGet =
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
337
|
+
let TimeCCTimeGet = (() => {
|
|
338
|
+
let _classDecorators = [CCCommand(TimeCommand.TimeGet), expectedCCResponse(TimeCCTimeReport)];
|
|
339
|
+
let _classDescriptor;
|
|
340
|
+
let _classExtraInitializers = [];
|
|
341
|
+
let _classThis;
|
|
342
|
+
let _classSuper = TimeCC;
|
|
343
|
+
var TimeCCTimeGet = 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
|
+
TimeCCTimeGet = _classThis = _classDescriptor.value;
|
|
349
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
350
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
return TimeCCTimeGet = _classThis;
|
|
354
|
+
})();
|
|
278
355
|
export { TimeCCTimeGet };
|
|
279
|
-
let TimeCCDateReport =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
356
|
+
let TimeCCDateReport = (() => {
|
|
357
|
+
let _classDecorators = [CCCommand(TimeCommand.DateReport)];
|
|
358
|
+
let _classDescriptor;
|
|
359
|
+
let _classExtraInitializers = [];
|
|
360
|
+
let _classThis;
|
|
361
|
+
let _classSuper = TimeCC;
|
|
362
|
+
var TimeCCDateReport = class extends _classSuper {
|
|
363
|
+
static { _classThis = this; }
|
|
364
|
+
static {
|
|
365
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
366
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
367
|
+
TimeCCDateReport = _classThis = _classDescriptor.value;
|
|
368
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
369
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
370
|
+
}
|
|
371
|
+
constructor(options) {
|
|
372
|
+
super(options);
|
|
373
|
+
this.year = options.year;
|
|
374
|
+
this.month = options.month;
|
|
375
|
+
this.day = options.day;
|
|
376
|
+
}
|
|
377
|
+
static from(raw, ctx) {
|
|
378
|
+
validatePayload(raw.payload.length >= 4);
|
|
379
|
+
const year = raw.payload.readUInt16BE(0);
|
|
380
|
+
const month = raw.payload[2];
|
|
381
|
+
const day = raw.payload[3];
|
|
382
|
+
return new this({
|
|
383
|
+
nodeId: ctx.sourceNodeId,
|
|
384
|
+
year,
|
|
385
|
+
month,
|
|
386
|
+
day,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
year;
|
|
390
|
+
month;
|
|
391
|
+
day;
|
|
392
|
+
serialize(ctx) {
|
|
393
|
+
this.payload = Bytes.from([
|
|
394
|
+
// 2 bytes placeholder for year
|
|
395
|
+
0,
|
|
396
|
+
0,
|
|
397
|
+
this.month,
|
|
398
|
+
this.day,
|
|
399
|
+
]);
|
|
400
|
+
this.payload.writeUInt16BE(this.year, 0);
|
|
401
|
+
return super.serialize(ctx);
|
|
402
|
+
}
|
|
403
|
+
toLogEntry(ctx) {
|
|
404
|
+
return {
|
|
405
|
+
...super.toLogEntry(ctx),
|
|
406
|
+
message: {
|
|
407
|
+
date: `${padStart(this.year.toString(), 4, "0")}-${padStart(this.month.toString(), 2, "0")}-${padStart(this.day.toString(), 2, "0")}`,
|
|
408
|
+
},
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
return TimeCCDateReport = _classThis;
|
|
413
|
+
})();
|
|
324
414
|
export { TimeCCDateReport };
|
|
325
|
-
let TimeCCDateGet =
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
415
|
+
let TimeCCDateGet = (() => {
|
|
416
|
+
let _classDecorators = [CCCommand(TimeCommand.DateGet), expectedCCResponse(TimeCCDateReport)];
|
|
417
|
+
let _classDescriptor;
|
|
418
|
+
let _classExtraInitializers = [];
|
|
419
|
+
let _classThis;
|
|
420
|
+
let _classSuper = TimeCC;
|
|
421
|
+
var TimeCCDateGet = class extends _classSuper {
|
|
422
|
+
static { _classThis = this; }
|
|
423
|
+
static {
|
|
424
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
425
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
426
|
+
TimeCCDateGet = _classThis = _classDescriptor.value;
|
|
427
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
428
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
return TimeCCDateGet = _classThis;
|
|
432
|
+
})();
|
|
331
433
|
export { TimeCCDateGet };
|
|
332
|
-
let TimeCCTimeOffsetSet =
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
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
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
434
|
+
let TimeCCTimeOffsetSet = (() => {
|
|
435
|
+
let _classDecorators = [CCCommand(TimeCommand.TimeOffsetSet), useSupervision()];
|
|
436
|
+
let _classDescriptor;
|
|
437
|
+
let _classExtraInitializers = [];
|
|
438
|
+
let _classThis;
|
|
439
|
+
let _classSuper = TimeCC;
|
|
440
|
+
var TimeCCTimeOffsetSet = class extends _classSuper {
|
|
441
|
+
static { _classThis = this; }
|
|
442
|
+
static {
|
|
443
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
444
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
445
|
+
TimeCCTimeOffsetSet = _classThis = _classDescriptor.value;
|
|
446
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
447
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
448
|
+
}
|
|
449
|
+
constructor(options) {
|
|
450
|
+
super(options);
|
|
451
|
+
this.standardOffset = options.standardOffset;
|
|
452
|
+
this.dstOffset = options.dstOffset;
|
|
453
|
+
this.dstStartDate = options.dstStart;
|
|
454
|
+
this.dstEndDate = options.dstEnd;
|
|
455
|
+
}
|
|
456
|
+
static from(_raw, _ctx) {
|
|
457
|
+
// TODO: Deserialize payload
|
|
458
|
+
throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
459
|
+
// return new TimeCCTimeOffsetSet({
|
|
460
|
+
// nodeId: ctx.sourceNodeId,
|
|
461
|
+
// });
|
|
462
|
+
}
|
|
463
|
+
standardOffset;
|
|
464
|
+
dstOffset;
|
|
465
|
+
dstStartDate;
|
|
466
|
+
dstEndDate;
|
|
467
|
+
serialize(ctx) {
|
|
468
|
+
this.payload = Bytes.concat([
|
|
469
|
+
encodeTimezone({
|
|
470
|
+
standardOffset: this.standardOffset,
|
|
471
|
+
dstOffset: this.dstOffset,
|
|
472
|
+
}),
|
|
473
|
+
Bytes.from([
|
|
474
|
+
this.dstStartDate.getUTCMonth() + 1,
|
|
475
|
+
this.dstStartDate.getUTCDate(),
|
|
476
|
+
this.dstStartDate.getUTCHours(),
|
|
477
|
+
this.dstEndDate.getUTCMonth() + 1,
|
|
478
|
+
this.dstEndDate.getUTCDate(),
|
|
479
|
+
this.dstEndDate.getUTCHours(),
|
|
480
|
+
]),
|
|
481
|
+
]);
|
|
482
|
+
return super.serialize(ctx);
|
|
483
|
+
}
|
|
484
|
+
toLogEntry(ctx) {
|
|
485
|
+
return {
|
|
486
|
+
...super.toLogEntry(ctx),
|
|
487
|
+
message: {
|
|
488
|
+
"standard time offset": `${this.standardOffset} minutes`,
|
|
489
|
+
"DST offset": `${this.dstOffset} minutes`,
|
|
490
|
+
"DST start date": formatDate(this.dstStartDate, "YYYY-MM-DD"),
|
|
491
|
+
"DST end date": formatDate(this.dstEndDate, "YYYY-MM-DD"),
|
|
492
|
+
},
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
return TimeCCTimeOffsetSet = _classThis;
|
|
497
|
+
})();
|
|
384
498
|
export { TimeCCTimeOffsetSet };
|
|
385
|
-
let TimeCCTimeOffsetReport =
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
499
|
+
let TimeCCTimeOffsetReport = (() => {
|
|
500
|
+
let _classDecorators = [CCCommand(TimeCommand.TimeOffsetReport)];
|
|
501
|
+
let _classDescriptor;
|
|
502
|
+
let _classExtraInitializers = [];
|
|
503
|
+
let _classThis;
|
|
504
|
+
let _classSuper = TimeCC;
|
|
505
|
+
var TimeCCTimeOffsetReport = class extends _classSuper {
|
|
506
|
+
static { _classThis = this; }
|
|
507
|
+
static {
|
|
508
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
509
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
510
|
+
TimeCCTimeOffsetReport = _classThis = _classDescriptor.value;
|
|
511
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
512
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
513
|
+
}
|
|
514
|
+
constructor(options) {
|
|
515
|
+
super(options);
|
|
516
|
+
this.standardOffset = options.standardOffset;
|
|
517
|
+
this.dstOffset = options.dstOffset;
|
|
518
|
+
this.dstStartDate = options.dstStart;
|
|
519
|
+
this.dstEndDate = options.dstEnd;
|
|
520
|
+
}
|
|
521
|
+
static from(raw, ctx) {
|
|
522
|
+
validatePayload(raw.payload.length >= 9);
|
|
523
|
+
const { standardOffset, dstOffset } = parseTimezone(raw.payload);
|
|
524
|
+
const currentYear = new Date().getUTCFullYear();
|
|
525
|
+
const dstStartDate = new Date(Date.UTC(currentYear, raw.payload[3] - 1, raw.payload[4], raw.payload[5]));
|
|
526
|
+
const dstEndDate = new Date(Date.UTC(currentYear, raw.payload[6] - 1, raw.payload[7], raw.payload[8]));
|
|
527
|
+
return new this({
|
|
528
|
+
nodeId: ctx.sourceNodeId,
|
|
529
|
+
standardOffset,
|
|
530
|
+
dstOffset,
|
|
531
|
+
dstStart: dstStartDate,
|
|
532
|
+
dstEnd: dstEndDate,
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
standardOffset;
|
|
536
|
+
dstOffset;
|
|
537
|
+
dstStartDate;
|
|
538
|
+
dstEndDate;
|
|
539
|
+
serialize(ctx) {
|
|
540
|
+
this.payload = Bytes.concat([
|
|
541
|
+
encodeTimezone({
|
|
542
|
+
standardOffset: this.standardOffset,
|
|
543
|
+
dstOffset: this.dstOffset,
|
|
544
|
+
}),
|
|
545
|
+
Bytes.from([
|
|
546
|
+
this.dstStartDate.getUTCMonth() + 1,
|
|
547
|
+
this.dstStartDate.getUTCDate(),
|
|
548
|
+
this.dstStartDate.getUTCHours(),
|
|
549
|
+
this.dstEndDate.getUTCMonth() + 1,
|
|
550
|
+
this.dstEndDate.getUTCDate(),
|
|
551
|
+
this.dstEndDate.getUTCHours(),
|
|
552
|
+
]),
|
|
553
|
+
]);
|
|
554
|
+
return super.serialize(ctx);
|
|
555
|
+
}
|
|
556
|
+
toLogEntry(ctx) {
|
|
557
|
+
return {
|
|
558
|
+
...super.toLogEntry(ctx),
|
|
559
|
+
message: {
|
|
560
|
+
"standard time offset": `${this.standardOffset} minutes`,
|
|
561
|
+
"DST offset": `${this.dstOffset} minutes`,
|
|
562
|
+
"DST start date": formatDate(this.dstStartDate, "YYYY-MM-DD"),
|
|
563
|
+
"DST end date": formatDate(this.dstEndDate, "YYYY-MM-DD"),
|
|
564
|
+
},
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
return TimeCCTimeOffsetReport = _classThis;
|
|
569
|
+
})();
|
|
443
570
|
export { TimeCCTimeOffsetReport };
|
|
444
|
-
let TimeCCTimeOffsetGet =
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
571
|
+
let TimeCCTimeOffsetGet = (() => {
|
|
572
|
+
let _classDecorators = [CCCommand(TimeCommand.TimeOffsetGet), expectedCCResponse(TimeCCTimeOffsetReport)];
|
|
573
|
+
let _classDescriptor;
|
|
574
|
+
let _classExtraInitializers = [];
|
|
575
|
+
let _classThis;
|
|
576
|
+
let _classSuper = TimeCC;
|
|
577
|
+
var TimeCCTimeOffsetGet = class extends _classSuper {
|
|
578
|
+
static { _classThis = this; }
|
|
579
|
+
static {
|
|
580
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
581
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
582
|
+
TimeCCTimeOffsetGet = _classThis = _classDescriptor.value;
|
|
583
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
584
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
return TimeCCTimeOffsetGet = _classThis;
|
|
588
|
+
})();
|
|
450
589
|
export { TimeCCTimeOffsetGet };
|
|
451
590
|
//# sourceMappingURL=TimeCC.js.map
|