@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
|
@@ -36,13 +36,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
36
36
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
37
37
|
var import_Values = require("../lib/Values.js");
|
|
38
38
|
var import_Types = require("../lib/_Types.js");
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
40
|
+
function accept(f) {
|
|
41
|
+
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
42
|
+
return f;
|
|
43
|
+
}
|
|
44
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
45
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
46
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
47
|
+
var _, done = false;
|
|
48
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
49
|
+
var context = {};
|
|
50
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
51
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
52
|
+
context.addInitializer = function(f) {
|
|
53
|
+
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
54
|
+
extraInitializers.push(accept(f || null));
|
|
55
|
+
};
|
|
56
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
57
|
+
if (kind === "accessor") {
|
|
58
|
+
if (result === void 0) continue;
|
|
59
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
60
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
61
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
62
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
63
|
+
} else if (_ = accept(result)) {
|
|
64
|
+
if (kind === "field") initializers.unshift(_);
|
|
65
|
+
else descriptor[key] = _;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
69
|
+
done = true;
|
|
70
|
+
};
|
|
71
|
+
var __runInitializers = function(thisArg, initializers, value) {
|
|
72
|
+
var useValue = arguments.length > 2;
|
|
73
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
74
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
75
|
+
}
|
|
76
|
+
return useValue ? value : void 0;
|
|
44
77
|
};
|
|
45
|
-
var ThermostatModeCCSet_1, ThermostatModeCCReport_1, ThermostatModeCCSupportedReport_1;
|
|
46
78
|
function __assertType(argName, typeName, boundHasError) {
|
|
47
79
|
const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
|
|
48
80
|
if (boundHasError()) {
|
|
@@ -95,333 +127,424 @@ const ThermostatModeCCValues = Object.freeze({
|
|
|
95
127
|
...import_Values.V.staticProperty("supportedModes", void 0, { internal: true })
|
|
96
128
|
})
|
|
97
129
|
});
|
|
98
|
-
let ThermostatModeCCAPI =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
130
|
+
let ThermostatModeCCAPI = (() => {
|
|
131
|
+
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Thermostat Mode"])];
|
|
132
|
+
let _classDescriptor;
|
|
133
|
+
let _classExtraInitializers = [];
|
|
134
|
+
let _classThis;
|
|
135
|
+
let _classSuper = import_API.CCAPI;
|
|
136
|
+
var ThermostatModeCCAPI2 = class extends _classSuper {
|
|
137
|
+
static {
|
|
138
|
+
_classThis = this;
|
|
139
|
+
}
|
|
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
|
+
ThermostatModeCCAPI2 = _classThis = _classDescriptor.value;
|
|
144
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
145
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
146
|
+
}
|
|
147
|
+
supportsCommand(cmd) {
|
|
148
|
+
switch (cmd) {
|
|
149
|
+
case import_Types.ThermostatModeCommand.Get:
|
|
150
|
+
case import_Types.ThermostatModeCommand.SupportedGet:
|
|
151
|
+
return this.isSinglecast();
|
|
152
|
+
case import_Types.ThermostatModeCommand.Set:
|
|
153
|
+
return true;
|
|
120
154
|
}
|
|
121
|
-
return
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
switch (property) {
|
|
127
|
-
case "mode":
|
|
128
|
-
return (await this.get())?.[property];
|
|
129
|
-
default:
|
|
155
|
+
return super.supportsCommand(cmd);
|
|
156
|
+
}
|
|
157
|
+
get [import_API.SET_VALUE]() {
|
|
158
|
+
return async function({ property }, value) {
|
|
159
|
+
if (property !== "mode") {
|
|
130
160
|
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
161
|
+
}
|
|
162
|
+
if (typeof value !== "number") {
|
|
163
|
+
(0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
164
|
+
}
|
|
165
|
+
const result = await this.set(value);
|
|
166
|
+
if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
|
|
167
|
+
this.schedulePoll({ property }, value);
|
|
168
|
+
}
|
|
169
|
+
return result;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
get [import_API.POLL_VALUE]() {
|
|
173
|
+
return async function({ property }) {
|
|
174
|
+
switch (property) {
|
|
175
|
+
case "mode":
|
|
176
|
+
return (await this.get())?.[property];
|
|
177
|
+
default:
|
|
178
|
+
(0, import_API.throwUnsupportedProperty)(this.ccId, property);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
183
|
+
async get() {
|
|
184
|
+
this.assertSupportsCommand(import_Types.ThermostatModeCommand, import_Types.ThermostatModeCommand.Get);
|
|
185
|
+
const cc = new ThermostatModeCCGet({
|
|
186
|
+
nodeId: this.endpoint.nodeId,
|
|
187
|
+
endpointIndex: this.endpoint.index
|
|
188
|
+
});
|
|
189
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
190
|
+
if (response) {
|
|
191
|
+
return (0, import_safe3.pick)(response, ["mode", "manufacturerData"]);
|
|
131
192
|
}
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
135
|
-
async get() {
|
|
136
|
-
this.assertSupportsCommand(import_Types.ThermostatModeCommand, import_Types.ThermostatModeCommand.Get);
|
|
137
|
-
const cc = new ThermostatModeCCGet({
|
|
138
|
-
nodeId: this.endpoint.nodeId,
|
|
139
|
-
endpointIndex: this.endpoint.index
|
|
140
|
-
});
|
|
141
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
142
|
-
if (response) {
|
|
143
|
-
return (0, import_safe3.pick)(response, ["mode", "manufacturerData"]);
|
|
144
193
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
194
|
+
async set(mode, manufacturerData) {
|
|
195
|
+
__assertType("mode", "ThermostatMode", __assertType__ThermostatMode.bind(void 0, mode));
|
|
196
|
+
__assertType("manufacturerData", void 0, __assertType__optional_su__string__uint8array_eu.bind(void 0, manufacturerData));
|
|
197
|
+
this.assertSupportsCommand(import_Types.ThermostatModeCommand, import_Types.ThermostatModeCommand.Set);
|
|
198
|
+
if (typeof manufacturerData === "string") {
|
|
199
|
+
if (manufacturerData.length % 2 !== 0 || !/^[0-9a-f]+$/i.test(manufacturerData)) {
|
|
200
|
+
throw new import_safe.ZWaveError(`Manufacturer data must be represented as hexadecimal when passed as a string!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
|
|
201
|
+
}
|
|
202
|
+
manufacturerData = import_safe2.Bytes.from(manufacturerData, "hex");
|
|
153
203
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
(0, import_CommandClassDecorators.
|
|
176
|
-
|
|
177
|
-
let
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, mode)}`).join("")}`;
|
|
204
|
+
const cc = new ThermostatModeCCSet({
|
|
205
|
+
nodeId: this.endpoint.nodeId,
|
|
206
|
+
endpointIndex: this.endpoint.index,
|
|
207
|
+
mode,
|
|
208
|
+
manufacturerData
|
|
209
|
+
});
|
|
210
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
211
|
+
}
|
|
212
|
+
async getSupportedModes() {
|
|
213
|
+
this.assertSupportsCommand(import_Types.ThermostatModeCommand, import_Types.ThermostatModeCommand.SupportedGet);
|
|
214
|
+
const cc = new ThermostatModeCCSupportedGet({
|
|
215
|
+
nodeId: this.endpoint.nodeId,
|
|
216
|
+
endpointIndex: this.endpoint.index
|
|
217
|
+
});
|
|
218
|
+
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
219
|
+
return response?.supportedModes;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
return ThermostatModeCCAPI2 = _classThis;
|
|
223
|
+
})();
|
|
224
|
+
let ThermostatModeCC = (() => {
|
|
225
|
+
let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Mode"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(ThermostatModeCCValues)];
|
|
226
|
+
let _classDescriptor;
|
|
227
|
+
let _classExtraInitializers = [];
|
|
228
|
+
let _classThis;
|
|
229
|
+
let _classSuper = import_CommandClass.CommandClass;
|
|
230
|
+
var ThermostatModeCC2 = class extends _classSuper {
|
|
231
|
+
static {
|
|
232
|
+
_classThis = this;
|
|
233
|
+
}
|
|
234
|
+
static {
|
|
235
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
236
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
237
|
+
ThermostatModeCC2 = _classThis = _classDescriptor.value;
|
|
238
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
239
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
240
|
+
}
|
|
241
|
+
async interview(ctx) {
|
|
242
|
+
const node = this.getNode(ctx);
|
|
243
|
+
const endpoint = this.getEndpoint(ctx);
|
|
244
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Thermostat Mode"], ctx, endpoint).withOptions({
|
|
245
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
246
|
+
});
|
|
198
247
|
ctx.logNode(node.id, {
|
|
199
248
|
endpoint: this.endpointIndex,
|
|
200
|
-
message:
|
|
201
|
-
direction: "
|
|
249
|
+
message: `Interviewing ${this.ccName}...`,
|
|
250
|
+
direction: "none"
|
|
202
251
|
});
|
|
203
|
-
} else {
|
|
204
252
|
ctx.logNode(node.id, {
|
|
205
253
|
endpoint: this.endpointIndex,
|
|
206
|
-
message: "
|
|
207
|
-
|
|
254
|
+
message: "querying supported thermostat modes...",
|
|
255
|
+
direction: "outbound"
|
|
208
256
|
});
|
|
209
|
-
|
|
257
|
+
const supportedModes = await api.getSupportedModes();
|
|
258
|
+
if (supportedModes) {
|
|
259
|
+
const logMessage = `received supported thermostat modes:${supportedModes.map((mode) => `
|
|
260
|
+
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, mode)}`).join("")}`;
|
|
261
|
+
ctx.logNode(node.id, {
|
|
262
|
+
endpoint: this.endpointIndex,
|
|
263
|
+
message: logMessage,
|
|
264
|
+
direction: "inbound"
|
|
265
|
+
});
|
|
266
|
+
} else {
|
|
267
|
+
ctx.logNode(node.id, {
|
|
268
|
+
endpoint: this.endpointIndex,
|
|
269
|
+
message: "Querying supported thermostat modes timed out, skipping interview...",
|
|
270
|
+
level: "warn"
|
|
271
|
+
});
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
await this.refreshValues(ctx);
|
|
275
|
+
this.setInterviewComplete(ctx, true);
|
|
210
276
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
const api = import_API.CCAPI.create(import_safe.CommandClasses["Thermostat Mode"], ctx, endpoint).withOptions({
|
|
218
|
-
priority: import_safe.MessagePriority.NodeQuery
|
|
219
|
-
});
|
|
220
|
-
ctx.logNode(node.id, {
|
|
221
|
-
endpoint: this.endpointIndex,
|
|
222
|
-
message: "querying current thermostat mode...",
|
|
223
|
-
direction: "outbound"
|
|
224
|
-
});
|
|
225
|
-
const currentStatus = await api.get();
|
|
226
|
-
if (currentStatus) {
|
|
277
|
+
async refreshValues(ctx) {
|
|
278
|
+
const node = this.getNode(ctx);
|
|
279
|
+
const endpoint = this.getEndpoint(ctx);
|
|
280
|
+
const api = import_API.CCAPI.create(import_safe.CommandClasses["Thermostat Mode"], ctx, endpoint).withOptions({
|
|
281
|
+
priority: import_safe.MessagePriority.NodeQuery
|
|
282
|
+
});
|
|
227
283
|
ctx.logNode(node.id, {
|
|
228
284
|
endpoint: this.endpointIndex,
|
|
229
|
-
message: "
|
|
230
|
-
direction: "
|
|
285
|
+
message: "querying current thermostat mode...",
|
|
286
|
+
direction: "outbound"
|
|
231
287
|
});
|
|
288
|
+
const currentStatus = await api.get();
|
|
289
|
+
if (currentStatus) {
|
|
290
|
+
ctx.logNode(node.id, {
|
|
291
|
+
endpoint: this.endpointIndex,
|
|
292
|
+
message: "received current thermostat mode: " + (0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, currentStatus.mode),
|
|
293
|
+
direction: "inbound"
|
|
294
|
+
});
|
|
295
|
+
}
|
|
232
296
|
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
(0, import_CommandClassDecorators.
|
|
238
|
-
|
|
239
|
-
]
|
|
240
|
-
let
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
297
|
+
};
|
|
298
|
+
return ThermostatModeCC2 = _classThis;
|
|
299
|
+
})();
|
|
300
|
+
let ThermostatModeCCSet = (() => {
|
|
301
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
|
|
302
|
+
let _classDescriptor;
|
|
303
|
+
let _classExtraInitializers = [];
|
|
304
|
+
let _classThis;
|
|
305
|
+
let _classSuper = ThermostatModeCC;
|
|
306
|
+
var ThermostatModeCCSet2 = class extends _classSuper {
|
|
307
|
+
static {
|
|
308
|
+
_classThis = this;
|
|
309
|
+
}
|
|
310
|
+
static {
|
|
311
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
312
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
313
|
+
ThermostatModeCCSet2 = _classThis = _classDescriptor.value;
|
|
314
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
315
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
316
|
+
}
|
|
317
|
+
constructor(options) {
|
|
318
|
+
super(options);
|
|
319
|
+
this.mode = options.mode;
|
|
320
|
+
if ("manufacturerData" in options) {
|
|
321
|
+
this.manufacturerData = options.manufacturerData;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
static from(raw, ctx) {
|
|
325
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
326
|
+
const mode = raw.payload[0] & 31;
|
|
327
|
+
if (mode !== import_Types.ThermostatMode["Manufacturer specific"]) {
|
|
328
|
+
return new this({
|
|
329
|
+
nodeId: ctx.sourceNodeId,
|
|
330
|
+
mode
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
const manufacturerDataLength = raw.payload[0] >>> 5 & 7;
|
|
334
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1 + manufacturerDataLength);
|
|
335
|
+
const manufacturerData = raw.payload.subarray(1, 1 + manufacturerDataLength);
|
|
336
|
+
return new this({
|
|
337
|
+
nodeId: ctx.sourceNodeId,
|
|
338
|
+
mode,
|
|
339
|
+
manufacturerData
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
mode;
|
|
343
|
+
manufacturerData;
|
|
344
|
+
serialize(ctx) {
|
|
345
|
+
const manufacturerData = this.mode === import_Types.ThermostatMode["Manufacturer specific"] && this.manufacturerData ? this.manufacturerData : new Uint8Array();
|
|
346
|
+
const manufacturerDataLength = manufacturerData.length;
|
|
347
|
+
this.payload = import_safe2.Bytes.concat([
|
|
348
|
+
import_safe2.Bytes.from([
|
|
349
|
+
((manufacturerDataLength & 7) << 5) + (this.mode & 31)
|
|
350
|
+
]),
|
|
351
|
+
manufacturerData
|
|
352
|
+
]);
|
|
353
|
+
return super.serialize(ctx);
|
|
354
|
+
}
|
|
355
|
+
toLogEntry(ctx) {
|
|
356
|
+
const message = {
|
|
357
|
+
mode: (0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, this.mode)
|
|
358
|
+
};
|
|
359
|
+
if (this.manufacturerData != void 0) {
|
|
360
|
+
message["manufacturer data"] = (0, import_safe3.buffer2hex)(this.manufacturerData);
|
|
361
|
+
}
|
|
362
|
+
return {
|
|
363
|
+
...super.toLogEntry(ctx),
|
|
364
|
+
message
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
return ThermostatModeCCSet2 = _classThis;
|
|
369
|
+
})();
|
|
370
|
+
let ThermostatModeCCReport = (() => {
|
|
371
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("mode", ThermostatModeCCValues.thermostatMode), (0, import_CommandClassDecorators.ccValueProperty)("manufacturerData", ThermostatModeCCValues.manufacturerData)];
|
|
372
|
+
let _classDescriptor;
|
|
373
|
+
let _classExtraInitializers = [];
|
|
374
|
+
let _classThis;
|
|
375
|
+
let _classSuper = ThermostatModeCC;
|
|
376
|
+
var ThermostatModeCCReport2 = class extends _classSuper {
|
|
377
|
+
static {
|
|
378
|
+
_classThis = this;
|
|
379
|
+
}
|
|
380
|
+
static {
|
|
381
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
382
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
383
|
+
ThermostatModeCCReport2 = _classThis = _classDescriptor.value;
|
|
384
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
385
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
386
|
+
}
|
|
387
|
+
constructor(options) {
|
|
388
|
+
super(options);
|
|
389
|
+
this.mode = options.mode;
|
|
245
390
|
this.manufacturerData = options.manufacturerData;
|
|
246
391
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
392
|
+
static from(raw, ctx) {
|
|
393
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1);
|
|
394
|
+
const mode = raw.payload[0] & 31;
|
|
395
|
+
if (mode !== import_Types.ThermostatMode["Manufacturer specific"]) {
|
|
396
|
+
return new this({
|
|
397
|
+
nodeId: ctx.sourceNodeId,
|
|
398
|
+
mode
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
const manufacturerDataLength = raw.payload[0] >>> 5;
|
|
402
|
+
(0, import_safe.validatePayload)(raw.payload.length >= 1 + manufacturerDataLength);
|
|
403
|
+
const manufacturerData = raw.payload.subarray(1, 1 + manufacturerDataLength);
|
|
404
|
+
return new this({
|
|
253
405
|
nodeId: ctx.sourceNodeId,
|
|
254
|
-
mode
|
|
406
|
+
mode,
|
|
407
|
+
manufacturerData
|
|
255
408
|
});
|
|
256
409
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
((manufacturerDataLength & 7) << 5) + (this.mode & 31)
|
|
274
|
-
]),
|
|
275
|
-
manufacturerData
|
|
276
|
-
]);
|
|
277
|
-
return super.serialize(ctx);
|
|
278
|
-
}
|
|
279
|
-
toLogEntry(ctx) {
|
|
280
|
-
const message = {
|
|
281
|
-
mode: (0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, this.mode)
|
|
282
|
-
};
|
|
283
|
-
if (this.manufacturerData != void 0) {
|
|
284
|
-
message["manufacturer data"] = (0, import_safe3.buffer2hex)(this.manufacturerData);
|
|
410
|
+
persistValues(ctx) {
|
|
411
|
+
if (!super.persistValues(ctx))
|
|
412
|
+
return false;
|
|
413
|
+
const thermostatModeValue = ThermostatModeCCValues.thermostatMode;
|
|
414
|
+
const supportedModesValue = ThermostatModeCCValues.supportedModes;
|
|
415
|
+
const supportedModes = this.getValue(ctx, supportedModesValue);
|
|
416
|
+
if (supportedModes && this.mode in import_Types.ThermostatMode && !supportedModes.includes(this.mode)) {
|
|
417
|
+
supportedModes.push(this.mode);
|
|
418
|
+
supportedModes.sort();
|
|
419
|
+
this.setMetadata(ctx, thermostatModeValue, {
|
|
420
|
+
...thermostatModeValue.meta,
|
|
421
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatMode, supportedModes)
|
|
422
|
+
});
|
|
423
|
+
this.setValue(ctx, supportedModesValue, supportedModes);
|
|
424
|
+
}
|
|
425
|
+
return true;
|
|
285
426
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
427
|
+
mode;
|
|
428
|
+
manufacturerData;
|
|
429
|
+
serialize(ctx) {
|
|
430
|
+
const manufacturerDataLength = this.mode === import_Types.ThermostatMode["Manufacturer specific"] && this.manufacturerData ? Math.min(7, this.manufacturerData.length) : 0;
|
|
431
|
+
this.payload = new import_safe2.Bytes(1 + manufacturerDataLength);
|
|
432
|
+
this.payload[0] = (manufacturerDataLength << 5) + (this.mode & 31);
|
|
433
|
+
if (manufacturerDataLength && this.manufacturerData) {
|
|
434
|
+
this.payload.set(this.manufacturerData.subarray(0, manufacturerDataLength), 1);
|
|
435
|
+
}
|
|
436
|
+
return super.serialize(ctx);
|
|
437
|
+
}
|
|
438
|
+
toLogEntry(ctx) {
|
|
439
|
+
const message = {
|
|
440
|
+
mode: (0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, this.mode)
|
|
441
|
+
};
|
|
442
|
+
if (this.manufacturerData != void 0) {
|
|
443
|
+
message["manufacturer data"] = (0, import_safe3.buffer2hex)(this.manufacturerData);
|
|
444
|
+
}
|
|
445
|
+
return {
|
|
446
|
+
...super.toLogEntry(ctx),
|
|
447
|
+
message
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
return ThermostatModeCCReport2 = _classThis;
|
|
452
|
+
})();
|
|
453
|
+
let ThermostatModeCCGet = (() => {
|
|
454
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(ThermostatModeCCReport)];
|
|
455
|
+
let _classDescriptor;
|
|
456
|
+
let _classExtraInitializers = [];
|
|
457
|
+
let _classThis;
|
|
458
|
+
let _classSuper = ThermostatModeCC;
|
|
459
|
+
var ThermostatModeCCGet2 = class extends _classSuper {
|
|
460
|
+
static {
|
|
461
|
+
_classThis = this;
|
|
462
|
+
}
|
|
463
|
+
static {
|
|
464
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
465
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
466
|
+
ThermostatModeCCGet2 = _classThis = _classDescriptor.value;
|
|
467
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
468
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
return ThermostatModeCCGet2 = _classThis;
|
|
472
|
+
})();
|
|
473
|
+
let ThermostatModeCCSupportedReport = (() => {
|
|
474
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedModes", ThermostatModeCCValues.supportedModes)];
|
|
475
|
+
let _classDescriptor;
|
|
476
|
+
let _classExtraInitializers = [];
|
|
477
|
+
let _classThis;
|
|
478
|
+
let _classSuper = ThermostatModeCC;
|
|
479
|
+
var ThermostatModeCCSupportedReport2 = class extends _classSuper {
|
|
480
|
+
static {
|
|
481
|
+
_classThis = this;
|
|
482
|
+
}
|
|
483
|
+
static {
|
|
484
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
485
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
486
|
+
ThermostatModeCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
487
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
488
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
489
|
+
}
|
|
490
|
+
constructor(options) {
|
|
491
|
+
super(options);
|
|
492
|
+
this.supportedModes = options.supportedModes;
|
|
493
|
+
}
|
|
494
|
+
static from(raw, ctx) {
|
|
495
|
+
const supportedModes = (0, import_safe.parseBitMask)(raw.payload, import_Types.ThermostatMode.Off);
|
|
496
|
+
return new this({
|
|
307
497
|
nodeId: ctx.sourceNodeId,
|
|
308
|
-
|
|
498
|
+
supportedModes
|
|
309
499
|
});
|
|
310
500
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
nodeId: ctx.sourceNodeId,
|
|
316
|
-
mode,
|
|
317
|
-
manufacturerData
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
persistValues(ctx) {
|
|
321
|
-
if (!super.persistValues(ctx))
|
|
322
|
-
return false;
|
|
323
|
-
const thermostatModeValue = ThermostatModeCCValues.thermostatMode;
|
|
324
|
-
const supportedModesValue = ThermostatModeCCValues.supportedModes;
|
|
325
|
-
const supportedModes = this.getValue(ctx, supportedModesValue);
|
|
326
|
-
if (supportedModes && this.mode in import_Types.ThermostatMode && !supportedModes.includes(this.mode)) {
|
|
327
|
-
supportedModes.push(this.mode);
|
|
328
|
-
supportedModes.sort();
|
|
501
|
+
persistValues(ctx) {
|
|
502
|
+
if (!super.persistValues(ctx))
|
|
503
|
+
return false;
|
|
504
|
+
const thermostatModeValue = ThermostatModeCCValues.thermostatMode;
|
|
329
505
|
this.setMetadata(ctx, thermostatModeValue, {
|
|
330
506
|
...thermostatModeValue.meta,
|
|
331
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatMode, supportedModes)
|
|
507
|
+
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatMode, this.supportedModes)
|
|
332
508
|
});
|
|
333
|
-
|
|
509
|
+
return true;
|
|
334
510
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
serialize(ctx) {
|
|
340
|
-
const manufacturerDataLength = this.mode === import_Types.ThermostatMode["Manufacturer specific"] && this.manufacturerData ? Math.min(7, this.manufacturerData.length) : 0;
|
|
341
|
-
this.payload = new import_safe2.Bytes(1 + manufacturerDataLength);
|
|
342
|
-
this.payload[0] = (manufacturerDataLength << 5) + (this.mode & 31);
|
|
343
|
-
if (manufacturerDataLength && this.manufacturerData) {
|
|
344
|
-
this.payload.set(this.manufacturerData.subarray(0, manufacturerDataLength), 1);
|
|
345
|
-
}
|
|
346
|
-
return super.serialize(ctx);
|
|
347
|
-
}
|
|
348
|
-
toLogEntry(ctx) {
|
|
349
|
-
const message = {
|
|
350
|
-
mode: (0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, this.mode)
|
|
351
|
-
};
|
|
352
|
-
if (this.manufacturerData != void 0) {
|
|
353
|
-
message["manufacturer data"] = (0, import_safe3.buffer2hex)(this.manufacturerData);
|
|
511
|
+
supportedModes;
|
|
512
|
+
serialize(ctx) {
|
|
513
|
+
this.payload = (0, import_safe.encodeBitMask)(this.supportedModes, import_Types.ThermostatMode["Manufacturer specific"], import_Types.ThermostatMode.Off);
|
|
514
|
+
return super.serialize(ctx);
|
|
354
515
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
};
|
|
361
|
-
__decorate([
|
|
362
|
-
(0, import_CommandClassDecorators.ccValue)(ThermostatModeCCValues.thermostatMode)
|
|
363
|
-
], ThermostatModeCCReport.prototype, "mode", void 0);
|
|
364
|
-
__decorate([
|
|
365
|
-
(0, import_CommandClassDecorators.ccValue)(ThermostatModeCCValues.manufacturerData)
|
|
366
|
-
], ThermostatModeCCReport.prototype, "manufacturerData", void 0);
|
|
367
|
-
ThermostatModeCCReport = ThermostatModeCCReport_1 = __decorate([
|
|
368
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Report)
|
|
369
|
-
], ThermostatModeCCReport);
|
|
370
|
-
let ThermostatModeCCGet = class ThermostatModeCCGet2 extends ThermostatModeCC {
|
|
371
|
-
};
|
|
372
|
-
ThermostatModeCCGet = __decorate([
|
|
373
|
-
(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Get),
|
|
374
|
-
(0, import_CommandClassDecorators.expectedCCResponse)(ThermostatModeCCReport)
|
|
375
|
-
], ThermostatModeCCGet);
|
|
376
|
-
let ThermostatModeCCSupportedReport = ThermostatModeCCSupportedReport_1 = class ThermostatModeCCSupportedReport2 extends ThermostatModeCC {
|
|
377
|
-
constructor(options) {
|
|
378
|
-
super(options);
|
|
379
|
-
this.supportedModes = options.supportedModes;
|
|
380
|
-
}
|
|
381
|
-
static from(raw, ctx) {
|
|
382
|
-
const supportedModes = (0, import_safe.parseBitMask)(raw.payload, import_Types.ThermostatMode.Off);
|
|
383
|
-
return new ThermostatModeCCSupportedReport_1({
|
|
384
|
-
nodeId: ctx.sourceNodeId,
|
|
385
|
-
supportedModes
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
persistValues(ctx) {
|
|
389
|
-
if (!super.persistValues(ctx))
|
|
390
|
-
return false;
|
|
391
|
-
const thermostatModeValue = ThermostatModeCCValues.thermostatMode;
|
|
392
|
-
this.setMetadata(ctx, thermostatModeValue, {
|
|
393
|
-
...thermostatModeValue.meta,
|
|
394
|
-
states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatMode, this.supportedModes)
|
|
395
|
-
});
|
|
396
|
-
return true;
|
|
397
|
-
}
|
|
398
|
-
supportedModes;
|
|
399
|
-
serialize(ctx) {
|
|
400
|
-
this.payload = (0, import_safe.encodeBitMask)(this.supportedModes, import_Types.ThermostatMode["Manufacturer specific"], import_Types.ThermostatMode.Off);
|
|
401
|
-
return super.serialize(ctx);
|
|
402
|
-
}
|
|
403
|
-
toLogEntry(ctx) {
|
|
404
|
-
return {
|
|
405
|
-
...super.toLogEntry(ctx),
|
|
406
|
-
message: {
|
|
407
|
-
"supported modes": this.supportedModes.map((mode) => `
|
|
516
|
+
toLogEntry(ctx) {
|
|
517
|
+
return {
|
|
518
|
+
...super.toLogEntry(ctx),
|
|
519
|
+
message: {
|
|
520
|
+
"supported modes": this.supportedModes.map((mode) => `
|
|
408
521
|
\xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.ThermostatMode, mode)}`).join("")
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
]
|
|
419
|
-
let
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
return ThermostatModeCCSupportedReport2 = _classThis;
|
|
527
|
+
})();
|
|
528
|
+
let ThermostatModeCCSupportedGet = (() => {
|
|
529
|
+
let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(ThermostatModeCCSupportedReport)];
|
|
530
|
+
let _classDescriptor;
|
|
531
|
+
let _classExtraInitializers = [];
|
|
532
|
+
let _classThis;
|
|
533
|
+
let _classSuper = ThermostatModeCC;
|
|
534
|
+
var ThermostatModeCCSupportedGet2 = class extends _classSuper {
|
|
535
|
+
static {
|
|
536
|
+
_classThis = this;
|
|
537
|
+
}
|
|
538
|
+
static {
|
|
539
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
540
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
541
|
+
ThermostatModeCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
542
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
543
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
return ThermostatModeCCSupportedGet2 = _classThis;
|
|
547
|
+
})();
|
|
425
548
|
// Annotate the CommonJS export names for ESM import in node:
|
|
426
549
|
0 && (module.exports = {
|
|
427
550
|
ThermostatModeCC,
|