@zwave-js/cc 15.21.0 → 15.22.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.d.ts +2 -2
- package/build/cjs/cc/AlarmSensorCC.js +18 -57
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/ApplicationStatusCC.js +9 -48
- package/build/cjs/cc/ApplicationStatusCC.js.map +1 -1
- package/build/cjs/cc/AssociationCC.d.ts +2 -2
- package/build/cjs/cc/AssociationCC.js +32 -71
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.js +28 -65
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +2 -2
- package/build/cjs/cc/BarrierOperatorCC.js +28 -67
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +2 -2
- package/build/cjs/cc/BasicCC.js +15 -54
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BasicWindowCoveringCC.js +12 -51
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/cjs/cc/BatteryCC.d.ts +2 -2
- package/build/cjs/cc/BatteryCC.js +15 -54
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +2 -2
- package/build/cjs/cc/BinarySensorCC.js +19 -58
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +2 -2
- package/build/cjs/cc/BinarySwitchCC.js +15 -54
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CRC16CC.js +7 -46
- package/build/cjs/cc/CRC16CC.js.map +1 -1
- package/build/cjs/cc/CentralSceneCC.js +19 -58
- package/build/cjs/cc/CentralSceneCC.js.map +1 -1
- package/build/cjs/cc/ClimateControlScheduleCC.js +25 -64
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cjs/cc/ClockCC.d.ts +2 -2
- package/build/cjs/cc/ClockCC.js +15 -54
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +26 -65
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +2 -2
- package/build/cjs/cc/ConfigurationCC.js +43 -82
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js +7 -46
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +2 -2
- package/build/cjs/cc/DoorLockCC.js +26 -65
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.js +17 -56
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +2 -2
- package/build/cjs/cc/EnergyProductionCC.js +13 -52
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +2 -2
- package/build/cjs/cc/EntryControlCC.js +25 -64
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +34 -73
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cjs/cc/HailCC.js +3 -42
- package/build/cjs/cc/HailCC.js.map +1 -1
- package/build/cjs/cc/HumidityControlModeCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +19 -58
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +11 -50
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +30 -69
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/InclusionControllerCC.js +9 -48
- package/build/cjs/cc/InclusionControllerCC.js.map +1 -1
- package/build/cjs/cc/IndicatorCC.d.ts +2 -2
- package/build/cjs/cc/IndicatorCC.js +31 -70
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +2 -2
- package/build/cjs/cc/IrrigationCC.js +54 -93
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +2 -2
- package/build/cjs/cc/LanguageCC.js +15 -54
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +2 -2
- package/build/cjs/cc/LockCC.js +15 -54
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -49
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +16 -55
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cjs/cc/MeterCC.d.ts +2 -2
- package/build/cjs/cc/MeterCC.js +23 -62
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +26 -65
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.js +34 -73
- package/build/cjs/cc/MultiChannelCC.js.map +1 -1
- package/build/cjs/cc/MultiCommandCC.js +9 -48
- package/build/cjs/cc/MultiCommandCC.js.map +1 -1
- package/build/cjs/cc/MultilevelSensorCC.d.ts +2 -2
- package/build/cjs/cc/MultilevelSensorCC.js +23 -62
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.js +24 -63
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NoOperationCC.js +5 -44
- package/build/cjs/cc/NoOperationCC.js.map +1 -1
- package/build/cjs/cc/NodeNamingCC.d.ts +6 -4
- package/build/cjs/cc/NodeNamingCC.js +70 -85
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +20 -3
- package/build/cjs/cc/NotificationCC.js +141 -104
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.js +22 -61
- package/build/cjs/cc/PowerlevelCC.js.map +1 -1
- package/build/cjs/cc/ProtectionCC.d.ts +2 -2
- package/build/cjs/cc/ProtectionCC.js +33 -72
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.js +9 -48
- package/build/cjs/cc/SceneActivationCC.js.map +1 -1
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +14 -53
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js +17 -56
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js +46 -85
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cjs/cc/Security2CC.js +33 -72
- package/build/cjs/cc/Security2CC.js.map +1 -1
- package/build/cjs/cc/SecurityCC.js +27 -66
- package/build/cjs/cc/SecurityCC.js.map +1 -1
- package/build/cjs/cc/SoundSwitchCC.js +29 -68
- package/build/cjs/cc/SoundSwitchCC.js.map +1 -1
- package/build/cjs/cc/SupervisionCC.js +9 -48
- package/build/cjs/cc/SupervisionCC.js.map +1 -1
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.js +19 -58
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.js +11 -50
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +19 -58
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.js +11 -50
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.js +15 -54
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.js +25 -64
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.js +24 -63
- package/build/cjs/cc/TimeCC.js.map +1 -1
- package/build/cjs/cc/TimeParametersCC.js +13 -52
- package/build/cjs/cc/TimeParametersCC.js.map +1 -1
- package/build/cjs/cc/TransportServiceCC.js +13 -52
- package/build/cjs/cc/TransportServiceCC.js.map +1 -1
- package/build/cjs/cc/UserCodeCC.d.ts +6 -4
- package/build/cjs/cc/UserCodeCC.js +89 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.js +25 -64
- package/build/cjs/cc/VersionCC.js.map +1 -1
- package/build/cjs/cc/WakeUpCC.js +21 -60
- package/build/cjs/cc/WakeUpCC.js.map +1 -1
- package/build/cjs/cc/WindowCoveringCC.d.ts +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +26 -65
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWaveLongRangeCC.js +3 -42
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/cjs/cc/ZWavePlusCC.js +11 -50
- package/build/cjs/cc/ZWavePlusCC.js.map +1 -1
- package/build/cjs/cc/ZWaveProtocolCC.js +73 -112
- package/build/cjs/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cjs/cc/_CCValues.generated.d.ts +131 -7
- package/build/cjs/cc/_CCValues.generated.js +68 -5
- package/build/cjs/cc/_CCValues.generated.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +22 -59
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +6 -2
- package/build/cjs/lib/CommandClass.js +1 -1
- package/build/cjs/lib/CommandClass.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.js +9 -48
- package/build/cjs/lib/Security2/Extension.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +1 -1
- package/build/cjs/lib/Values.js.map +1 -1
- package/build/esm/cc/AlarmSensorCC.d.ts +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +9 -38
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/ApplicationStatusCC.js +1 -34
- package/build/esm/cc/ApplicationStatusCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +2 -2
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +3 -36
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +2 -2
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +5 -36
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +2 -2
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +3 -36
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +2 -2
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +3 -36
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.js +1 -34
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +2 -2
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +3 -36
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +2 -2
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +3 -36
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +2 -2
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +3 -36
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +1 -34
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +1 -34
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +1 -34
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +2 -2
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +3 -36
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +2 -2
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +3 -36
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +2 -2
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +3 -36
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -34
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +2 -2
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +3 -36
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +2 -2
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +3 -36
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +2 -2
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +3 -36
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +2 -2
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +3 -36
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1 -34
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +1 -34
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +3 -36
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +3 -36
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +3 -36
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +1 -34
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +2 -2
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +3 -36
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +2 -2
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -36
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +2 -2
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +3 -36
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +2 -2
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +3 -36
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +3 -36
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +1 -34
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +2 -2
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -36
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +2 -2
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +4 -37
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1 -34
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +1 -34
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +2 -2
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +3 -36
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +2 -2
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +3 -36
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +1 -34
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +6 -4
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +52 -73
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +20 -3
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +143 -89
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +1 -34
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +2 -2
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +3 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +1 -34
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +1 -34
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +2 -2
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +3 -36
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1 -34
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1 -34
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +1 -34
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +1 -34
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +1 -34
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +2 -2
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +3 -36
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +2 -2
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +3 -36
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +2 -2
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +3 -36
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +2 -2
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +3 -36
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +2 -2
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +3 -36
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +2 -2
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +3 -36
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -34
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -34
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +1 -34
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +6 -4
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +55 -48
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.js +1 -34
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.js +1 -34
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +2 -2
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -36
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +1 -34
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +1 -34
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1 -34
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +131 -7
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +71 -4
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +7 -38
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +6 -2
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +1 -1
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/Security2/Extension.js +1 -34
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/Values.d.ts +1 -1
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/package.json +9 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ThermostatFanStateCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, ValueMetadata, type WithAddress, enumValuesToMetadataStates, validatePayload, } from \"@zwave-js/core\";\nimport { getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, throwUnsupportedProperty, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatFanState, ThermostatFanStateCommand, } from \"../lib/_Types.js\";\nimport type { CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatFanStateCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatFanStateCCValues };\n@API(CommandClasses[\"Thermostat Fan State\"])\nexport class ThermostatFanStateCCAPI extends CCAPI {\n public supportsCommand(cmd: ThermostatFanStateCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatFanStateCommand.Get:\n return this.isSinglecast();\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: ThermostatFanStateCCAPI, { property }) {\n switch (property) {\n case \"state\":\n return this.get();\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ThermostatFanStateCommand, ThermostatFanStateCommand.Get);\n const cc = new ThermostatFanStateCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatFanStateCCReport>(cc, this.commandOptions);\n if (response) {\n return response?.state;\n }\n }\n}\n@commandClass(CommandClasses[\"Thermostat Fan State\"])\n@implementedVersion(2)\n@ccValues(ThermostatFanStateCCValues)\nexport class ThermostatFanStateCC extends CommandClass {\n declare ccCommand: ThermostatFanStateCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Fan State\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n // Query the current status\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying current thermostat fan state...\",\n direction: \"outbound\",\n });\n const currentStatus = await api.get();\n if (currentStatus) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"received current thermostat fan state: \"\n + getEnumMemberName(ThermostatFanState, currentStatus),\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ThermostatFanStateCCReportOptions {\n state: ThermostatFanState;\n}\n@CCCommand(ThermostatFanStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatFanStateCCValues.fanState)\nexport class ThermostatFanStateCCReport extends ThermostatFanStateCC {\n public constructor(options: WithAddress<ThermostatFanStateCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.state = options.state;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatFanStateCCReport {\n validatePayload(raw.payload.length == 1);\n const state: ThermostatFanState = raw.payload[0] & 0b1111;\n return new this({\n nodeId: ctx.sourceNodeId,\n state,\n });\n }\n public readonly state: ThermostatFanState;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n state: getEnumMemberName(ThermostatFanState, this.state),\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ThermostatFanStateCommand.Get)\n@expectedCCResponse(ThermostatFanStateCCReport)\nexport class ThermostatFanStateCCGet extends ThermostatFanStateCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, ValueMetadata, type WithAddress, enumValuesToMetadataStates, validatePayload, } from \"@zwave-js/core\";\nimport { getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, throwUnsupportedProperty, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatFanState, ThermostatFanStateCommand, } from \"../lib/_Types.js\";\nimport type { CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatFanStateCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatFanStateCCValues };\n@API(CommandClasses[\"Thermostat Fan State\"])\nexport class ThermostatFanStateCCAPI extends CCAPI {\n public supportsCommand(cmd: ThermostatFanStateCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatFanStateCommand.Get:\n return this.isSinglecast();\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: ThermostatFanStateCCAPI, { property }) {\n switch (property) {\n case \"state\":\n return this.get();\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ThermostatFanStateCommand, ThermostatFanStateCommand.Get);\n const cc = new ThermostatFanStateCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatFanStateCCReport>(cc, this.commandOptions);\n if (response) {\n return response?.state;\n }\n }\n}\n@commandClass(CommandClasses[\"Thermostat Fan State\"])\n@implementedVersion(2)\n@ccValues(ThermostatFanStateCCValues)\nexport class ThermostatFanStateCC extends CommandClass {\n declare ccCommand: ThermostatFanStateCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Fan State\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n // Query the current status\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying current thermostat fan state...\",\n direction: \"outbound\",\n });\n const currentStatus = await api.get();\n if (currentStatus) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"received current thermostat fan state: \"\n + getEnumMemberName(ThermostatFanState, currentStatus),\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ThermostatFanStateCCReportOptions {\n state: ThermostatFanState;\n}\n@CCCommand(ThermostatFanStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatFanStateCCValues.fanState)\nexport class ThermostatFanStateCCReport extends ThermostatFanStateCC {\n public constructor(options: WithAddress<ThermostatFanStateCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.state = options.state;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatFanStateCCReport {\n validatePayload(raw.payload.length == 1);\n const state: ThermostatFanState = raw.payload[0] & 0b1111;\n return new this({\n nodeId: ctx.sourceNodeId,\n state,\n });\n }\n public readonly state: ThermostatFanState;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n state: getEnumMemberName(ThermostatFanState, this.state),\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ThermostatFanStateCommand.Get)\n@expectedCCResponse(ThermostatFanStateCCReport)\nexport class ThermostatFanStateCCGet extends ThermostatFanStateCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkN;AAClN,oBAAkC;AAClC,iBAA2F;AAC3F,0BAAuH;AACvH,oCAAiH;AAEjH,mBAA+D;AAE/D,gCAA2C;IAG9B,2BAAuB,MAAA;8BADnC,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACC;+CAAA,YAAK;WAAA;;;;;;;;AAAlD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAg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AAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { Bytes, type BytesView } from "@zwave-js/shared";
|
|
3
3
|
import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
|
|
4
|
-
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
4
|
+
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
5
5
|
import { ThermostatMode, ThermostatModeCommand } from "../lib/_Types.js";
|
|
6
6
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
7
7
|
import { ThermostatModeCCValues } from "./_CCValues.generated.js";
|
|
@@ -18,7 +18,7 @@ export declare class ThermostatModeCCAPI extends CCAPI {
|
|
|
18
18
|
export declare class ThermostatModeCC extends CommandClass {
|
|
19
19
|
ccCommand: ThermostatModeCommand;
|
|
20
20
|
interview(ctx: InterviewContext): Promise<void>;
|
|
21
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
21
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
22
22
|
}
|
|
23
23
|
export type ThermostatModeCCSetOptions = {
|
|
24
24
|
mode: Exclude<ThermostatMode, (typeof ThermostatMode)["Manufacturer specific"]>;
|
|
@@ -39,6 +39,7 @@ __export(ThermostatModeCC_exports, {
|
|
|
39
39
|
ThermostatModeCCValues: () => import_CCValues_generated.ThermostatModeCCValues
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(ThermostatModeCC_exports);
|
|
42
|
+
var import_tslib = require("tslib");
|
|
42
43
|
var __validateArgs = __toESM(require("./ThermostatModeCC._validateArgs.js"), 1);
|
|
43
44
|
var import_core = require("@zwave-js/core");
|
|
44
45
|
var import_shared = require("@zwave-js/shared");
|
|
@@ -47,46 +48,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
47
48
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
48
49
|
var import_Types = require("../lib/_Types.js");
|
|
49
50
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
50
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
51
|
-
var useValue = arguments.length > 2;
|
|
52
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
53
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
54
|
-
}
|
|
55
|
-
return useValue ? value : void 0;
|
|
56
|
-
};
|
|
57
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
58
|
-
function accept(f) {
|
|
59
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
60
|
-
return f;
|
|
61
|
-
}
|
|
62
|
-
__name(accept, "accept");
|
|
63
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
64
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
65
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
66
|
-
var _, done = false;
|
|
67
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
68
|
-
var context = {};
|
|
69
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
70
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
71
|
-
context.addInitializer = function(f) {
|
|
72
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
73
|
-
extraInitializers.push(accept(f || null));
|
|
74
|
-
};
|
|
75
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
76
|
-
if (kind === "accessor") {
|
|
77
|
-
if (result === void 0) continue;
|
|
78
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
79
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
80
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
81
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
82
|
-
} else if (_ = accept(result)) {
|
|
83
|
-
if (kind === "field") initializers.unshift(_);
|
|
84
|
-
else descriptor[key] = _;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
88
|
-
done = true;
|
|
89
|
-
};
|
|
90
51
|
const { validateArgs_ThermostatModeCCAPI_set } = __validateArgs;
|
|
91
52
|
let ThermostatModeCCAPI = (() => {
|
|
92
53
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Thermostat Mode"])];
|
|
@@ -106,11 +67,11 @@ let ThermostatModeCCAPI = (() => {
|
|
|
106
67
|
static {
|
|
107
68
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
108
69
|
_set_decorators = [validateArgs_ThermostatModeCCAPI_set()];
|
|
109
|
-
__esDecorate(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
110
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
70
|
+
(0, import_tslib.__esDecorate)(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
71
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
111
72
|
ThermostatModeCCAPI2 = _classThis = _classDescriptor.value;
|
|
112
73
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
113
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
74
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
114
75
|
}
|
|
115
76
|
supportsCommand(cmd) {
|
|
116
77
|
switch (cmd) {
|
|
@@ -186,7 +147,7 @@ let ThermostatModeCCAPI = (() => {
|
|
|
186
147
|
}
|
|
187
148
|
constructor() {
|
|
188
149
|
super(...arguments);
|
|
189
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
150
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
190
151
|
}
|
|
191
152
|
};
|
|
192
153
|
return ThermostatModeCCAPI2 = _classThis;
|
|
@@ -206,10 +167,10 @@ let ThermostatModeCC = (() => {
|
|
|
206
167
|
}
|
|
207
168
|
static {
|
|
208
169
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
209
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
170
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
210
171
|
ThermostatModeCC2 = _classThis = _classDescriptor.value;
|
|
211
172
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
212
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
173
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
213
174
|
}
|
|
214
175
|
async interview(ctx) {
|
|
215
176
|
const node = this.getNode(ctx);
|
|
@@ -247,11 +208,11 @@ let ThermostatModeCC = (() => {
|
|
|
247
208
|
await this.refreshValues(ctx);
|
|
248
209
|
this.setInterviewComplete(ctx, true);
|
|
249
210
|
}
|
|
250
|
-
async refreshValues(ctx) {
|
|
211
|
+
async refreshValues(ctx, options) {
|
|
251
212
|
const node = this.getNode(ctx);
|
|
252
213
|
const endpoint = this.getEndpoint(ctx);
|
|
253
214
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Thermostat Mode"], ctx, endpoint).withOptions({
|
|
254
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
215
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
255
216
|
});
|
|
256
217
|
ctx.logNode(node.id, {
|
|
257
218
|
endpoint: this.endpointIndex,
|
|
@@ -285,10 +246,10 @@ let ThermostatModeCCSet = (() => {
|
|
|
285
246
|
}
|
|
286
247
|
static {
|
|
287
248
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
288
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
249
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
289
250
|
ThermostatModeCCSet2 = _classThis = _classDescriptor.value;
|
|
290
251
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
291
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
252
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
292
253
|
}
|
|
293
254
|
constructor(options) {
|
|
294
255
|
super(options);
|
|
@@ -358,10 +319,10 @@ let ThermostatModeCCReport = (() => {
|
|
|
358
319
|
}
|
|
359
320
|
static {
|
|
360
321
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
361
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
322
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
362
323
|
ThermostatModeCCReport2 = _classThis = _classDescriptor.value;
|
|
363
324
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
364
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
325
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
365
326
|
}
|
|
366
327
|
constructor(options) {
|
|
367
328
|
super(options);
|
|
@@ -444,10 +405,10 @@ let ThermostatModeCCGet = (() => {
|
|
|
444
405
|
}
|
|
445
406
|
static {
|
|
446
407
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
447
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
408
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
448
409
|
ThermostatModeCCGet2 = _classThis = _classDescriptor.value;
|
|
449
410
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
450
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
411
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
451
412
|
}
|
|
452
413
|
};
|
|
453
414
|
return ThermostatModeCCGet2 = _classThis;
|
|
@@ -467,10 +428,10 @@ let ThermostatModeCCSupportedReport = (() => {
|
|
|
467
428
|
}
|
|
468
429
|
static {
|
|
469
430
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
470
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
431
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
471
432
|
ThermostatModeCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
472
433
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
473
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
434
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
474
435
|
}
|
|
475
436
|
constructor(options) {
|
|
476
437
|
super(options);
|
|
@@ -525,10 +486,10 @@ let ThermostatModeCCSupportedGet = (() => {
|
|
|
525
486
|
}
|
|
526
487
|
static {
|
|
527
488
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
528
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
489
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
529
490
|
ThermostatModeCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
530
491
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
531
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
492
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
532
493
|
}
|
|
533
494
|
};
|
|
534
495
|
return ThermostatModeCCSupportedGet2 = _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ThermostatModeCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./ThermostatModeCC._validateArgs.js\";\nconst { validateArgs_ThermostatModeCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeBitMask, enumValuesToMetadataStates, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, buffer2hex, getEnumMemberName, pick, } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatMode, ThermostatModeCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatModeCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatModeCCValues };\n@API(CommandClasses[\"Thermostat Mode\"])\nexport class ThermostatModeCCAPI extends CCAPI {\n public supportsCommand(cmd: ThermostatModeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatModeCommand.Get:\n case ThermostatModeCommand.SupportedGet:\n return this.isSinglecast();\n case ThermostatModeCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: ThermostatModeCCAPI, { property }, value) {\n if (property !== \"mode\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n const result = await this.set(value);\n // Verify the current value after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n // TODO: Ideally this would be a short delay, but some thermostats like Remotec ZXT-600\n // aren't able to handle the GET this quickly.\n this.schedulePoll({ property }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: ThermostatModeCCAPI, { property }) {\n switch (property) {\n case \"mode\":\n return (await this.get())?.[property];\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ThermostatModeCommand, ThermostatModeCommand.Get);\n const cc = new ThermostatModeCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatModeCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"mode\", \"manufacturerData\"]);\n }\n }\n public async set(mode: Exclude<ThermostatMode, (typeof ThermostatMode)[\"Manufacturer specific\"]>): Promise<SupervisionResult | undefined>;\n public async set(mode: (typeof ThermostatMode)[\"Manufacturer specific\"], manufacturerData: BytesView | string): Promise<SupervisionResult | undefined>;\n @validateArgs_ThermostatModeCCAPI_set()\n public async set(mode: ThermostatMode, manufacturerData?: BytesView | string): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ThermostatModeCommand, ThermostatModeCommand.Set);\n if (typeof manufacturerData === \"string\") {\n // We accept the manufacturer data as a hex string. Make sure it's valid\n if (manufacturerData.length % 2 !== 0\n || !/^[0-9a-f]+$/i.test(manufacturerData)) {\n throw new ZWaveError(`Manufacturer data must be represented as hexadecimal when passed as a string!`, ZWaveErrorCodes.Argument_Invalid);\n }\n manufacturerData = Bytes.from(manufacturerData, \"hex\");\n }\n const cc = new ThermostatModeCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n mode,\n manufacturerData: manufacturerData as any,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getSupportedModes(): Promise<MaybeNotKnown<readonly ThermostatMode[]>> {\n this.assertSupportsCommand(ThermostatModeCommand, ThermostatModeCommand.SupportedGet);\n const cc = new ThermostatModeCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatModeCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedModes;\n }\n}\n@commandClass(CommandClasses[\"Thermostat Mode\"])\n@implementedVersion(3)\n@ccValues(ThermostatModeCCValues)\nexport class ThermostatModeCC extends CommandClass {\n declare ccCommand: ThermostatModeCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Mode\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // First query the possible modes to set the metadata\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying supported thermostat modes...\",\n direction: \"outbound\",\n });\n const supportedModes = await api.getSupportedModes();\n if (supportedModes) {\n const logMessage = `received supported thermostat modes:${supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`)\n .join(\"\")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported thermostat modes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Mode\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n // Query the current status\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying current thermostat mode...\",\n direction: \"outbound\",\n });\n const currentStatus = await api.get();\n if (currentStatus) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"received current thermostat mode: \"\n + getEnumMemberName(ThermostatMode, currentStatus.mode),\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport type ThermostatModeCCSetOptions = {\n mode: Exclude<ThermostatMode, (typeof ThermostatMode)[\"Manufacturer specific\"]>;\n} | {\n mode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n manufacturerData: BytesView;\n};\n@CCCommand(ThermostatModeCommand.Set)\n@useSupervision()\nexport class ThermostatModeCCSet extends ThermostatModeCC {\n public constructor(options: WithAddress<ThermostatModeCCSetOptions>) {\n super(options);\n this.mode = options.mode;\n if (\"manufacturerData\" in options) {\n this.manufacturerData = options.manufacturerData;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSet {\n validatePayload(raw.payload.length >= 1);\n const mode: ThermostatMode = raw.payload[0] & 0b11111;\n if (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n });\n }\n const manufacturerDataLength = (raw.payload[0] >>> 5) & 0b111;\n validatePayload(raw.payload.length >= 1 + manufacturerDataLength);\n const manufacturerData = raw.payload.subarray(1, 1 + manufacturerDataLength);\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n manufacturerData,\n });\n }\n public mode: ThermostatMode;\n public manufacturerData?: BytesView;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const manufacturerData = this.mode === ThermostatMode[\"Manufacturer specific\"]\n && this.manufacturerData\n ? this.manufacturerData\n : new Uint8Array();\n const manufacturerDataLength = manufacturerData.length;\n this.payload = Bytes.concat([\n [\n ((manufacturerDataLength & 0b111) << 5) + (this.mode & 0b11111),\n ],\n manufacturerData,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatMode, this.mode),\n };\n if (this.manufacturerData != undefined) {\n message[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ThermostatModeCCReportOptions = {\n mode: Exclude<ThermostatMode, (typeof ThermostatMode)[\"Manufacturer specific\"]>;\n manufacturerData?: undefined;\n} | {\n mode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n manufacturerData?: BytesView;\n};\n@CCCommand(ThermostatModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatModeCCValues.thermostatMode)\n@ccValueProperty(\"manufacturerData\", ThermostatModeCCValues.manufacturerData)\nexport class ThermostatModeCCReport extends ThermostatModeCC {\n public constructor(options: WithAddress<ThermostatModeCCReportOptions>) {\n super(options);\n this.mode = options.mode;\n this.manufacturerData = options.manufacturerData;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCReport {\n validatePayload(raw.payload.length >= 1);\n const mode: ThermostatMode = raw.payload[0] & 0b11111;\n if (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n });\n }\n // V3+\n const manufacturerDataLength = raw.payload[0] >>> 5;\n validatePayload(raw.payload.length >= 1 + manufacturerDataLength);\n const manufacturerData = raw.payload.subarray(1, 1 + manufacturerDataLength);\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n manufacturerData,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Update the supported modes if a mode is used that wasn't previously\n // reported to be supported. This shouldn't happen, but well... it does anyways\n const thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n const supportedModesValue = ThermostatModeCCValues.supportedModes;\n const supportedModes = this.getValue<ThermostatMode[]>(ctx, supportedModesValue);\n if (supportedModes\n && this.mode in ThermostatMode\n && !supportedModes.includes(this.mode)) {\n supportedModes.push(this.mode);\n supportedModes.sort((a, b) => a - b);\n this.setMetadata(ctx, thermostatModeValue, {\n ...thermostatModeValue.meta,\n states: enumValuesToMetadataStates(ThermostatMode, supportedModes),\n });\n this.setValue(ctx, supportedModesValue, supportedModes);\n }\n return true;\n }\n public readonly mode: ThermostatMode;\n public readonly manufacturerData: BytesView | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const manufacturerDataLength = this.mode === ThermostatMode[\"Manufacturer specific\"]\n && this.manufacturerData\n ? Math.min(0b111, this.manufacturerData.length)\n : 0;\n this.payload = new Bytes(1 + manufacturerDataLength);\n this.payload[0] = (manufacturerDataLength << 5) + (this.mode & 0b11111);\n if (manufacturerDataLength && this.manufacturerData) {\n this.payload.set(this.manufacturerData.subarray(0, manufacturerDataLength), 1);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatMode, this.mode),\n };\n if (this.manufacturerData != undefined) {\n message[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ThermostatModeCommand.Get)\n@expectedCCResponse(ThermostatModeCCReport)\nexport class ThermostatModeCCGet extends ThermostatModeCC {\n}\n// @publicAPI\nexport interface ThermostatModeCCSupportedReportOptions {\n supportedModes: ThermostatMode[];\n}\n@CCCommand(ThermostatModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatModeCCValues.supportedModes)\nexport class ThermostatModeCCSupportedReport extends ThermostatModeCC {\n public constructor(options: WithAddress<ThermostatModeCCSupportedReportOptions>) {\n super(options);\n this.supportedModes = options.supportedModes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSupportedReport {\n const supportedModes: ThermostatMode[] = parseBitMask(raw.payload, ThermostatMode.Off);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedModes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Use this information to create the metadata for the mode property\n const thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n this.setMetadata(ctx, thermostatModeValue, {\n ...thermostatModeValue.meta,\n states: enumValuesToMetadataStates(ThermostatMode, this.supportedModes),\n });\n return true;\n }\n public readonly supportedModes: ThermostatMode[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = encodeBitMask(this.supportedModes, ThermostatMode[\"Manufacturer specific\"], ThermostatMode.Off);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported modes\": this.supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(ThermostatModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatModeCCSupportedReport)\nexport class ThermostatModeCCSupportedGet extends ThermostatModeCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./ThermostatModeCC._validateArgs.js\";\nconst { validateArgs_ThermostatModeCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeBitMask, enumValuesToMetadataStates, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, buffer2hex, getEnumMemberName, pick, } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatMode, ThermostatModeCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatModeCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatModeCCValues };\n@API(CommandClasses[\"Thermostat Mode\"])\nexport class ThermostatModeCCAPI extends CCAPI {\n public supportsCommand(cmd: ThermostatModeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatModeCommand.Get:\n case ThermostatModeCommand.SupportedGet:\n return this.isSinglecast();\n case ThermostatModeCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: ThermostatModeCCAPI, { property }, value) {\n if (property !== \"mode\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n const result = await this.set(value);\n // Verify the current value after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n // TODO: Ideally this would be a short delay, but some thermostats like Remotec ZXT-600\n // aren't able to handle the GET this quickly.\n this.schedulePoll({ property }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: ThermostatModeCCAPI, { property }) {\n switch (property) {\n case \"mode\":\n return (await this.get())?.[property];\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(ThermostatModeCommand, ThermostatModeCommand.Get);\n const cc = new ThermostatModeCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatModeCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"mode\", \"manufacturerData\"]);\n }\n }\n public async set(mode: Exclude<ThermostatMode, (typeof ThermostatMode)[\"Manufacturer specific\"]>): Promise<SupervisionResult | undefined>;\n public async set(mode: (typeof ThermostatMode)[\"Manufacturer specific\"], manufacturerData: BytesView | string): Promise<SupervisionResult | undefined>;\n @validateArgs_ThermostatModeCCAPI_set()\n public async set(mode: ThermostatMode, manufacturerData?: BytesView | string): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ThermostatModeCommand, ThermostatModeCommand.Set);\n if (typeof manufacturerData === \"string\") {\n // We accept the manufacturer data as a hex string. Make sure it's valid\n if (manufacturerData.length % 2 !== 0\n || !/^[0-9a-f]+$/i.test(manufacturerData)) {\n throw new ZWaveError(`Manufacturer data must be represented as hexadecimal when passed as a string!`, ZWaveErrorCodes.Argument_Invalid);\n }\n manufacturerData = Bytes.from(manufacturerData, \"hex\");\n }\n const cc = new ThermostatModeCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n mode,\n manufacturerData: manufacturerData as any,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getSupportedModes(): Promise<MaybeNotKnown<readonly ThermostatMode[]>> {\n this.assertSupportsCommand(ThermostatModeCommand, ThermostatModeCommand.SupportedGet);\n const cc = new ThermostatModeCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatModeCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedModes;\n }\n}\n@commandClass(CommandClasses[\"Thermostat Mode\"])\n@implementedVersion(3)\n@ccValues(ThermostatModeCCValues)\nexport class ThermostatModeCC extends CommandClass {\n declare ccCommand: ThermostatModeCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Mode\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // First query the possible modes to set the metadata\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying supported thermostat modes...\",\n direction: \"outbound\",\n });\n const supportedModes = await api.getSupportedModes();\n if (supportedModes) {\n const logMessage = `received supported thermostat modes:${supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`)\n .join(\"\")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported thermostat modes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Mode\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n // Query the current status\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying current thermostat mode...\",\n direction: \"outbound\",\n });\n const currentStatus = await api.get();\n if (currentStatus) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"received current thermostat mode: \"\n + getEnumMemberName(ThermostatMode, currentStatus.mode),\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport type ThermostatModeCCSetOptions = {\n mode: Exclude<ThermostatMode, (typeof ThermostatMode)[\"Manufacturer specific\"]>;\n} | {\n mode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n manufacturerData: BytesView;\n};\n@CCCommand(ThermostatModeCommand.Set)\n@useSupervision()\nexport class ThermostatModeCCSet extends ThermostatModeCC {\n public constructor(options: WithAddress<ThermostatModeCCSetOptions>) {\n super(options);\n this.mode = options.mode;\n if (\"manufacturerData\" in options) {\n this.manufacturerData = options.manufacturerData;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSet {\n validatePayload(raw.payload.length >= 1);\n const mode: ThermostatMode = raw.payload[0] & 0b11111;\n if (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n });\n }\n const manufacturerDataLength = (raw.payload[0] >>> 5) & 0b111;\n validatePayload(raw.payload.length >= 1 + manufacturerDataLength);\n const manufacturerData = raw.payload.subarray(1, 1 + manufacturerDataLength);\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n manufacturerData,\n });\n }\n public mode: ThermostatMode;\n public manufacturerData?: BytesView;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const manufacturerData = this.mode === ThermostatMode[\"Manufacturer specific\"]\n && this.manufacturerData\n ? this.manufacturerData\n : new Uint8Array();\n const manufacturerDataLength = manufacturerData.length;\n this.payload = Bytes.concat([\n [\n ((manufacturerDataLength & 0b111) << 5) + (this.mode & 0b11111),\n ],\n manufacturerData,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatMode, this.mode),\n };\n if (this.manufacturerData != undefined) {\n message[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ThermostatModeCCReportOptions = {\n mode: Exclude<ThermostatMode, (typeof ThermostatMode)[\"Manufacturer specific\"]>;\n manufacturerData?: undefined;\n} | {\n mode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n manufacturerData?: BytesView;\n};\n@CCCommand(ThermostatModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatModeCCValues.thermostatMode)\n@ccValueProperty(\"manufacturerData\", ThermostatModeCCValues.manufacturerData)\nexport class ThermostatModeCCReport extends ThermostatModeCC {\n public constructor(options: WithAddress<ThermostatModeCCReportOptions>) {\n super(options);\n this.mode = options.mode;\n this.manufacturerData = options.manufacturerData;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCReport {\n validatePayload(raw.payload.length >= 1);\n const mode: ThermostatMode = raw.payload[0] & 0b11111;\n if (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n });\n }\n // V3+\n const manufacturerDataLength = raw.payload[0] >>> 5;\n validatePayload(raw.payload.length >= 1 + manufacturerDataLength);\n const manufacturerData = raw.payload.subarray(1, 1 + manufacturerDataLength);\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n manufacturerData,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Update the supported modes if a mode is used that wasn't previously\n // reported to be supported. This shouldn't happen, but well... it does anyways\n const thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n const supportedModesValue = ThermostatModeCCValues.supportedModes;\n const supportedModes = this.getValue<ThermostatMode[]>(ctx, supportedModesValue);\n if (supportedModes\n && this.mode in ThermostatMode\n && !supportedModes.includes(this.mode)) {\n supportedModes.push(this.mode);\n supportedModes.sort((a, b) => a - b);\n this.setMetadata(ctx, thermostatModeValue, {\n ...thermostatModeValue.meta,\n states: enumValuesToMetadataStates(ThermostatMode, supportedModes),\n });\n this.setValue(ctx, supportedModesValue, supportedModes);\n }\n return true;\n }\n public readonly mode: ThermostatMode;\n public readonly manufacturerData: BytesView | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const manufacturerDataLength = this.mode === ThermostatMode[\"Manufacturer specific\"]\n && this.manufacturerData\n ? Math.min(0b111, this.manufacturerData.length)\n : 0;\n this.payload = new Bytes(1 + manufacturerDataLength);\n this.payload[0] = (manufacturerDataLength << 5) + (this.mode & 0b11111);\n if (manufacturerDataLength && this.manufacturerData) {\n this.payload.set(this.manufacturerData.subarray(0, manufacturerDataLength), 1);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatMode, this.mode),\n };\n if (this.manufacturerData != undefined) {\n message[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ThermostatModeCommand.Get)\n@expectedCCResponse(ThermostatModeCCReport)\nexport class ThermostatModeCCGet extends ThermostatModeCC {\n}\n// @publicAPI\nexport interface ThermostatModeCCSupportedReportOptions {\n supportedModes: ThermostatMode[];\n}\n@CCCommand(ThermostatModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatModeCCValues.supportedModes)\nexport class ThermostatModeCCSupportedReport extends ThermostatModeCC {\n public constructor(options: WithAddress<ThermostatModeCCSupportedReportOptions>) {\n super(options);\n this.supportedModes = options.supportedModes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSupportedReport {\n const supportedModes: ThermostatMode[] = parseBitMask(raw.payload, ThermostatMode.Off);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedModes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Use this information to create the metadata for the mode property\n const thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n this.setMetadata(ctx, thermostatModeValue, {\n ...thermostatModeValue.meta,\n states: enumValuesToMetadataStates(ThermostatMode, this.supportedModes),\n });\n return true;\n }\n public readonly supportedModes: ThermostatMode[];\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = encodeBitMask(this.supportedModes, ThermostatMode[\"Manufacturer specific\"], ThermostatMode.Off);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported modes\": this.supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(ThermostatModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatModeCCSupportedReport)\nexport class ThermostatModeCCSupportedGet extends ThermostatModeCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAgU;AAChU,oBAA4E;AAC5E,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAAsD;AAEtD,gCAAuC;AATvC,MAAM,EAAE,qCAAoC,IAAK;IAYpC,uBAAmB,MAAA;8BAD/B,mCAAI,2BAAe,iBAAiB,CAAC,CAAC;;;;oBACE;;;2CAAA,YAAK;WAAA;;;;;;;;yBAqDzC,qCAAoC,CAAE;AACvC,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAtDpB,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAgB,KAA0B;AAC7C,cAAQ,KAAK;QACT,KAAK,mCA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B;AAC1C,UAAI,CAAC,MAAM,cAAc,GAAG;AACxB,eAAO;AAEX,YAAM,sBAAsB,iDAAuB;AACnD,WAAK,YAAY,KAAK,qBAAqB;QACvC,GAAG,oBAAoB;QACvB,YAAQ,wCAA2B,6BAAgB,KAAK,cAAc;OACzE;AACD,aAAO;IACX;IACgB;IACT,UAAU,KAAsB;AACnC,WAAK,cAAU,2BAAc,KAAK,gBAAgB,4BAAe,uBAAuB,GAAG,4BAAe,GAAG;AAC7G,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,mBAAmB,KAAK,eACnB,IAAI,CAAC,SAAS;WAAO,iCAAkB,6BAAgB,IAAI,CAAC,EAAE,EAC9D,KAAK,EAAE;;;IAGxB;;;;IAIS,gCAA4B,MAAA;8BAFxC,yCAAU,mCAAsB,YAAY,OAC5C,kDAAmB,+BAA+B,CAAC;;;;oBACF;oDAAA,YAAgB;WAAA;;;;;;;;AAAlE,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation } from "../lib/API.js";
|
|
3
|
-
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
3
|
+
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
4
4
|
import { ThermostatOperatingState, ThermostatOperatingStateCommand } from "../lib/_Types.js";
|
|
5
5
|
import type { CCParsingContext } from "../lib/traits.js";
|
|
6
6
|
import { ThermostatOperatingStateCCValues } from "./_CCValues.generated.js";
|
|
@@ -13,7 +13,7 @@ export declare class ThermostatOperatingStateCCAPI extends PhysicalCCAPI {
|
|
|
13
13
|
export declare class ThermostatOperatingStateCC extends CommandClass {
|
|
14
14
|
ccCommand: ThermostatOperatingStateCommand;
|
|
15
15
|
interview(ctx: InterviewContext): Promise<void>;
|
|
16
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
16
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
17
17
|
}
|
|
18
18
|
export interface ThermostatOperatingStateCCReportOptions {
|
|
19
19
|
state: ThermostatOperatingState;
|
|
@@ -26,6 +26,7 @@ __export(ThermostatOperatingStateCC_exports, {
|
|
|
26
26
|
ThermostatOperatingStateCCValues: () => import_CCValues_generated.ThermostatOperatingStateCCValues
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(ThermostatOperatingStateCC_exports);
|
|
29
|
+
var import_tslib = require("tslib");
|
|
29
30
|
var import_core = require("@zwave-js/core");
|
|
30
31
|
var import_shared = require("@zwave-js/shared");
|
|
31
32
|
var import_API = require("../lib/API.js");
|
|
@@ -33,46 +34,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
33
34
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
34
35
|
var import_Types = require("../lib/_Types.js");
|
|
35
36
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
36
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
37
|
-
function accept(f) {
|
|
38
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
39
|
-
return f;
|
|
40
|
-
}
|
|
41
|
-
__name(accept, "accept");
|
|
42
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
43
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
44
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
45
|
-
var _, done = false;
|
|
46
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
47
|
-
var context = {};
|
|
48
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
49
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
50
|
-
context.addInitializer = function(f) {
|
|
51
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
52
|
-
extraInitializers.push(accept(f || null));
|
|
53
|
-
};
|
|
54
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
55
|
-
if (kind === "accessor") {
|
|
56
|
-
if (result === void 0) continue;
|
|
57
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
58
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
59
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
60
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
61
|
-
} else if (_ = accept(result)) {
|
|
62
|
-
if (kind === "field") initializers.unshift(_);
|
|
63
|
-
else descriptor[key] = _;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
67
|
-
done = true;
|
|
68
|
-
};
|
|
69
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
70
|
-
var useValue = arguments.length > 2;
|
|
71
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
72
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
73
|
-
}
|
|
74
|
-
return useValue ? value : void 0;
|
|
75
|
-
};
|
|
76
37
|
let ThermostatOperatingStateCCAPI = (() => {
|
|
77
38
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Thermostat Operating State"])];
|
|
78
39
|
let _classDescriptor;
|
|
@@ -88,10 +49,10 @@ let ThermostatOperatingStateCCAPI = (() => {
|
|
|
88
49
|
}
|
|
89
50
|
static {
|
|
90
51
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
91
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
52
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
92
53
|
ThermostatOperatingStateCCAPI2 = _classThis = _classDescriptor.value;
|
|
93
54
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
94
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
55
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
95
56
|
}
|
|
96
57
|
supportsCommand(cmd) {
|
|
97
58
|
switch (cmd) {
|
|
@@ -137,10 +98,10 @@ let ThermostatOperatingStateCC = (() => {
|
|
|
137
98
|
}
|
|
138
99
|
static {
|
|
139
100
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
140
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
101
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
141
102
|
ThermostatOperatingStateCC2 = _classThis = _classDescriptor.value;
|
|
142
103
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
143
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
104
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
144
105
|
}
|
|
145
106
|
async interview(ctx) {
|
|
146
107
|
const node = this.getNode(ctx);
|
|
@@ -152,11 +113,11 @@ let ThermostatOperatingStateCC = (() => {
|
|
|
152
113
|
await this.refreshValues(ctx);
|
|
153
114
|
this.setInterviewComplete(ctx, true);
|
|
154
115
|
}
|
|
155
|
-
async refreshValues(ctx) {
|
|
116
|
+
async refreshValues(ctx, options) {
|
|
156
117
|
const node = this.getNode(ctx);
|
|
157
118
|
const endpoint = this.getEndpoint(ctx);
|
|
158
119
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Thermostat Operating State"], ctx, endpoint).withOptions({
|
|
159
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
120
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
160
121
|
});
|
|
161
122
|
ctx.logNode(node.id, {
|
|
162
123
|
endpoint: this.endpointIndex,
|
|
@@ -190,10 +151,10 @@ let ThermostatOperatingStateCCReport = (() => {
|
|
|
190
151
|
}
|
|
191
152
|
static {
|
|
192
153
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
193
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
154
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
194
155
|
ThermostatOperatingStateCCReport2 = _classThis = _classDescriptor.value;
|
|
195
156
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
196
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
157
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
197
158
|
}
|
|
198
159
|
constructor(options) {
|
|
199
160
|
super(options);
|
|
@@ -234,10 +195,10 @@ let ThermostatOperatingStateCCGet = (() => {
|
|
|
234
195
|
}
|
|
235
196
|
static {
|
|
236
197
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
237
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
198
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
238
199
|
ThermostatOperatingStateCCGet2 = _classThis = _classDescriptor.value;
|
|
239
200
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
240
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
201
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
241
202
|
}
|
|
242
203
|
};
|
|
243
204
|
return ThermostatOperatingStateCCGet2 = _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ThermostatOperatingStateCC.ts"],
|
|
4
|
-
"sourcesContent": ["import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, ValueMetadata, type WithAddress, enumValuesToMetadataStates, validatePayload, } from \"@zwave-js/core\";\nimport { getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, throwUnsupportedProperty, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatOperatingState, ThermostatOperatingStateCommand, } from \"../lib/_Types.js\";\nimport type { CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatOperatingStateCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatOperatingStateCCValues };\n// @noSetValueAPI This CC is read-only\n@API(CommandClasses[\"Thermostat Operating State\"])\nexport class ThermostatOperatingStateCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: ThermostatOperatingStateCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatOperatingStateCommand.Get:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: ThermostatOperatingStateCCAPI, { property }) {\n switch (property) {\n case \"state\":\n return this.get();\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n public async get(): Promise<MaybeNotKnown<ThermostatOperatingState>> {\n this.assertSupportsCommand(ThermostatOperatingStateCommand, ThermostatOperatingStateCommand.Get);\n const cc = new ThermostatOperatingStateCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatOperatingStateCCReport>(cc, this.commandOptions);\n return response?.state;\n }\n}\n@commandClass(CommandClasses[\"Thermostat Operating State\"])\n@implementedVersion(2)\n@ccValues(ThermostatOperatingStateCCValues)\nexport class ThermostatOperatingStateCC extends CommandClass {\n declare ccCommand: ThermostatOperatingStateCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Operating State\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n // Query the current state\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying thermostat operating state...\",\n direction: \"outbound\",\n });\n const state = await api.get();\n if (state) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received current thermostat operating state: ${getEnumMemberName(ThermostatOperatingState, state)}`,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ThermostatOperatingStateCCReportOptions {\n state: ThermostatOperatingState;\n}\n@CCCommand(ThermostatOperatingStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatOperatingStateCCValues.operatingState)\nexport class ThermostatOperatingStateCCReport extends ThermostatOperatingStateCC {\n public constructor(options: WithAddress<ThermostatOperatingStateCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.state = options.state;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatOperatingStateCCReport {\n validatePayload(raw.payload.length >= 1);\n const state: ThermostatOperatingState = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n state,\n });\n }\n public readonly state: ThermostatOperatingState;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n state: getEnumMemberName(ThermostatOperatingState, this.state),\n },\n };\n }\n}\n@CCCommand(ThermostatOperatingStateCommand.Get)\n@expectedCCResponse(ThermostatOperatingStateCCReport)\nexport class ThermostatOperatingStateCCGet extends ThermostatOperatingStateCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, ValueMetadata, type WithAddress, enumValuesToMetadataStates, validatePayload, } from \"@zwave-js/core\";\nimport { getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, throwUnsupportedProperty, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatOperatingState, ThermostatOperatingStateCommand, } from \"../lib/_Types.js\";\nimport type { CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatOperatingStateCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatOperatingStateCCValues };\n// @noSetValueAPI This CC is read-only\n@API(CommandClasses[\"Thermostat Operating State\"])\nexport class ThermostatOperatingStateCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: ThermostatOperatingStateCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatOperatingStateCommand.Get:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: ThermostatOperatingStateCCAPI, { property }) {\n switch (property) {\n case \"state\":\n return this.get();\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n public async get(): Promise<MaybeNotKnown<ThermostatOperatingState>> {\n this.assertSupportsCommand(ThermostatOperatingStateCommand, ThermostatOperatingStateCommand.Get);\n const cc = new ThermostatOperatingStateCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatOperatingStateCCReport>(cc, this.commandOptions);\n return response?.state;\n }\n}\n@commandClass(CommandClasses[\"Thermostat Operating State\"])\n@implementedVersion(2)\n@ccValues(ThermostatOperatingStateCCValues)\nexport class ThermostatOperatingStateCC extends CommandClass {\n declare ccCommand: ThermostatOperatingStateCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Thermostat Operating State\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n // Query the current state\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying thermostat operating state...\",\n direction: \"outbound\",\n });\n const state = await api.get();\n if (state) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `received current thermostat operating state: ${getEnumMemberName(ThermostatOperatingState, state)}`,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ThermostatOperatingStateCCReportOptions {\n state: ThermostatOperatingState;\n}\n@CCCommand(ThermostatOperatingStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatOperatingStateCCValues.operatingState)\nexport class ThermostatOperatingStateCCReport extends ThermostatOperatingStateCC {\n public constructor(options: WithAddress<ThermostatOperatingStateCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.state = options.state;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatOperatingStateCCReport {\n validatePayload(raw.payload.length >= 1);\n const state: ThermostatOperatingState = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n state,\n });\n }\n public readonly state: ThermostatOperatingState;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n state: getEnumMemberName(ThermostatOperatingState, this.state),\n },\n };\n }\n}\n@CCCommand(ThermostatOperatingStateCommand.Get)\n@expectedCCResponse(ThermostatOperatingStateCCReport)\nexport class ThermostatOperatingStateCCGet extends ThermostatOperatingStateCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAA8L;AAC9L,oBAAkC;AAClC,iBAA0G;AAC1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O,iCAAkB,uCAA0B,KAAK,KAAK;;;IAGzE;;;;IAIS,iCAA6B,MAAA;8BAFzC,yCAAU,6CAAgC,GAAG,OAC7C,kDAAmB,gCAAgC,CAAC;;;;oBACF;qDAAA,YAA0B;WAAA;;;;;;;;AAA7E,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { Bytes } from "@zwave-js/shared";
|
|
3
3
|
import { CCAPI, POLL_VALUE, type PollValueImplementation } from "../lib/API.js";
|
|
4
|
-
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
4
|
+
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
5
5
|
import { type SetbackState, SetbackType, ThermostatSetbackCommand } from "../lib/_Types.js";
|
|
6
6
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
7
7
|
export declare class ThermostatSetbackCCAPI extends CCAPI {
|
|
@@ -13,7 +13,7 @@ export declare class ThermostatSetbackCCAPI extends CCAPI {
|
|
|
13
13
|
export declare class ThermostatSetbackCC extends CommandClass {
|
|
14
14
|
ccCommand: ThermostatSetbackCommand;
|
|
15
15
|
interview(ctx: InterviewContext): Promise<void>;
|
|
16
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
16
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
17
17
|
}
|
|
18
18
|
export interface ThermostatSetbackCCSetOptions {
|
|
19
19
|
setbackType: SetbackType;
|