@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
|
@@ -26,6 +26,7 @@ __export(SupervisionCC_exports, {
|
|
|
26
26
|
SupervisionCCValues: () => import_CCValues_generated.SupervisionCCValues
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(SupervisionCC_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 SupervisionCCAPI = (() => {
|
|
77
38
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses.Supervision)];
|
|
78
39
|
let _classDescriptor;
|
|
@@ -88,10 +49,10 @@ let SupervisionCCAPI = (() => {
|
|
|
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
|
SupervisionCCAPI2 = _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) {
|
|
@@ -149,10 +110,10 @@ let SupervisionCC = (() => {
|
|
|
149
110
|
}
|
|
150
111
|
static {
|
|
151
112
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
152
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
113
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
153
114
|
SupervisionCC2 = _classThis = _classDescriptor.value;
|
|
154
115
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
155
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
116
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
156
117
|
}
|
|
157
118
|
/** Tests if a command should be supervised and thus requires encapsulation */
|
|
158
119
|
static requiresEncapsulation(cc) {
|
|
@@ -233,10 +194,10 @@ let SupervisionCCReport = (() => {
|
|
|
233
194
|
}
|
|
234
195
|
static {
|
|
235
196
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
236
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
197
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
237
198
|
SupervisionCCReport2 = _classThis = _classDescriptor.value;
|
|
238
199
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
239
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
200
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
240
201
|
}
|
|
241
202
|
constructor(options) {
|
|
242
203
|
super(options);
|
|
@@ -344,10 +305,10 @@ let SupervisionCCGet = (() => {
|
|
|
344
305
|
}
|
|
345
306
|
static {
|
|
346
307
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
347
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
308
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
348
309
|
SupervisionCCGet2 = _classThis = _classDescriptor.value;
|
|
349
310
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
350
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
311
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
351
312
|
}
|
|
352
313
|
constructor(options) {
|
|
353
314
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/SupervisionCC.ts"],
|
|
4
4
|
"sourcesContent": ["import { CommandClasses, Duration, EncapsulationFlags, type EndpointId, type GetEndpoint, type GetNode, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type NodeId, type SinglecastCC, type SupervisionResult, SupervisionStatus, type SupportsCC, TransmitOptions, type WithAddress, ZWaveError, ZWaveErrorCodes, isTransmissionError, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { PhysicalCCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, commandClass, expectedCCResponse, implementedVersion, shouldUseSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { SupervisionCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { SupervisionCCValues } from \"./_CCValues.generated.js\";\nexport { SupervisionCCValues };\n// @noSetValueAPI - This CC has no values to set\n// @noInterview - This CC is only used for encapsulation\n// Encapsulation CCs are used internally and too frequently that we\n// want to pay the cost of validating each call\n/* eslint-disable @zwave-js/ccapi-validate-args */\n@API(CommandClasses.Supervision)\nexport class SupervisionCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: SupervisionCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case SupervisionCommand.Get:\n case SupervisionCommand.Report:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n public async sendReport(options: SupervisionCCReportOptions & {\n encapsulationFlags?: EncapsulationFlags;\n lowPriority?: boolean;\n }): Promise<void> {\n // Here we don't assert support - some devices only half-support Supervision, so we treat them\n // as if they don't support it. We still need to be able to respond to the Get command though.\n const { encapsulationFlags = EncapsulationFlags.None, lowPriority = false, ...cmdOptions } = options;\n const cc = new SupervisionCCReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...cmdOptions,\n });\n // The report must be sent back with the same encapsulation order\n cc.encapsulationFlags = encapsulationFlags;\n try {\n await this.host.sendCommand(cc, {\n ...this.commandOptions,\n // Supervision Reports must be prioritized over normal messages\n priority: lowPriority\n ? MessagePriority.ImmediateLow\n : MessagePriority.Immediate,\n // But we don't want to wait for an ACK because this can lock up the network for seconds\n // if the target node is asleep or unreachable\n transmitOptions: TransmitOptions.DEFAULT_NOACK,\n // Only try sending the report once. If it fails, the node will ask again\n maxSendAttempts: 1,\n // Don't keep the transaction alive to verify S2 delivery, or receiving\n // other commands from the node may interfere with it\n s2VerifyDelivery: false,\n });\n }\n catch (e) {\n if (isTransmissionError(e)) {\n // Swallow errors related to transmission failures\n return;\n }\n else {\n // Pass other errors through\n throw e;\n }\n }\n }\n}\n@commandClass(CommandClasses.Supervision)\n@implementedVersion(2)\nexport class SupervisionCC extends CommandClass {\n declare ccCommand: SupervisionCommand;\n // Force singlecast for the supervision CC\n declare nodeId: number;\n /** Tests if a command should be supervised and thus requires encapsulation */\n public static requiresEncapsulation(cc: CommandClass): boolean {\n return (!!(cc.encapsulationFlags & EncapsulationFlags.Supervision)\n && !(cc instanceof SupervisionCCGet)\n && !(cc instanceof SupervisionCCReport));\n }\n /** Encapsulates a command that targets a specific endpoint */\n public static encapsulate(cc: CommandClass, sessionId: number, requestStatusUpdates: boolean = true): SupervisionCCGet {\n if (!cc.isSinglecast()) {\n throw new ZWaveError(`Supervision is only possible for singlecast commands!`, ZWaveErrorCodes.Argument_Invalid);\n }\n const ret = new SupervisionCCGet({\n nodeId: cc.nodeId,\n // Supervision CC is wrapped inside MultiChannel CCs, so the endpoint must be copied\n endpointIndex: cc.endpointIndex,\n encapsulated: cc,\n sessionId,\n requestStatusUpdates,\n });\n // Copy the encapsulation flags from the encapsulated command\n // but omit Supervision, since we're doing that right now\n ret.encapsulationFlags = cc.encapsulationFlags\n & ~EncapsulationFlags.Supervision;\n return ret;\n }\n /**\n * Given a CC instance, this returns the Supervision session ID which is used for this command.\n * Returns `undefined` when there is no session ID or the command was sent as multicast.\n */\n public static getSessionId(command: CommandClass): number | undefined {\n if (command.isEncapsulatedWith(CommandClasses.Supervision, SupervisionCommand.Get)) {\n const supervisionEncapsulation = command.getEncapsulatingCC(CommandClasses.Supervision, SupervisionCommand.Get) as SupervisionCCGet;\n if (supervisionEncapsulation.frameType !== \"broadcast\"\n && supervisionEncapsulation.frameType !== \"multicast\") {\n return supervisionEncapsulation.sessionId;\n }\n }\n }\n /**\n * Returns whether a node supports the given CC with Supervision encapsulation.\n */\n public static getCCSupportedWithSupervision(ctx: GetValueDB, endpoint: EndpointId, ccId: CommandClasses): boolean {\n // By default assume supervision is supported for all CCs, unless we've remembered one not to be\n return (ctx\n .getValueDB(endpoint.nodeId)\n .getValue(SupervisionCCValues.ccSupported(ccId).endpoint(endpoint.index)) ?? true);\n }\n /**\n * Remembers whether a node supports the given CC with Supervision encapsulation.\n */\n public static setCCSupportedWithSupervision(ctx: GetValueDB, endpoint: EndpointId, ccId: CommandClasses, supported: boolean): void {\n ctx\n .getValueDB(endpoint.nodeId)\n .setValue(SupervisionCCValues.ccSupported(ccId).endpoint(endpoint.index), supported);\n }\n /** Returns whether this is a valid command to send supervised */\n public static mayUseSupervision<T extends CommandClass>(ctx: GetValueDB & GetNode<NodeId & SupportsCC & GetEndpoint<EndpointId>>, command: T): command is SinglecastCC<T> {\n // Supervision may only be used for singlecast CCs that expect no response\n // The specs mention that Supervision CAN be used for S2 multicast, but conveniently fail to explain how to respond to that.\n if (!command.isSinglecast())\n return false;\n if (command.expectsCCResponse(ctx))\n return false;\n // with a valid node and endpoint\n const node = command.getNode(ctx);\n if (!node)\n return false;\n const endpoint = command.getEndpoint(ctx);\n if (!endpoint)\n return false;\n // and only if ...\n return (\n // ... the node supports it\n node.supportsCC(CommandClasses.Supervision)\n // ... the command is marked as \"should use supervision\"\n && shouldUseSupervision(command)\n // ... and we haven't previously determined that the node doesn't properly support it\n && SupervisionCC.getCCSupportedWithSupervision(ctx, endpoint, command.ccId));\n }\n}\n// @publicAPI\nexport type SupervisionCCReportOptions = {\n moreUpdatesFollow: boolean;\n requestWakeUpOnDemand?: boolean;\n sessionId: number;\n} & ({\n status: SupervisionStatus.Working;\n duration: Duration;\n} | {\n status: SupervisionStatus.NoSupport | SupervisionStatus.Fail | SupervisionStatus.Success;\n});\n@CCCommand(SupervisionCommand.Report)\nexport class SupervisionCCReport extends SupervisionCC {\n public constructor(options: WithAddress<SupervisionCCReportOptions>) {\n super(options);\n this.moreUpdatesFollow = options.moreUpdatesFollow;\n this.requestWakeUpOnDemand = !!options.requestWakeUpOnDemand;\n this.sessionId = options.sessionId;\n this.status = options.status;\n if (options.status === SupervisionStatus.Working) {\n this.duration = options.duration;\n }\n else {\n this.duration = new Duration(0, \"seconds\");\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): SupervisionCCReport {\n validatePayload(raw.payload.length >= 3);\n const moreUpdatesFollow = !!(raw.payload[0] & 128);\n const requestWakeUpOnDemand = !!(raw.payload[0] & 64);\n const sessionId = raw.payload[0] & 0b111111;\n const status: SupervisionStatus = raw.payload[1];\n if (status === SupervisionStatus.Working) {\n const duration = Duration.parseReport(raw.payload[2])\n ?? new Duration(0, \"seconds\");\n return new this({\n nodeId: ctx.sourceNodeId,\n moreUpdatesFollow,\n requestWakeUpOnDemand,\n sessionId,\n status,\n duration,\n });\n }\n else {\n return new this({\n nodeId: ctx.sourceNodeId,\n moreUpdatesFollow,\n requestWakeUpOnDemand,\n sessionId,\n status,\n });\n }\n }\n public readonly moreUpdatesFollow: boolean;\n public readonly requestWakeUpOnDemand: boolean;\n public readonly sessionId: number;\n public readonly status: SupervisionStatus;\n public readonly duration: Duration | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [\n (this.moreUpdatesFollow ? 128 : 0)\n | (this.requestWakeUpOnDemand ? 64 : 0)\n | (this.sessionId & 0b111111),\n this.status,\n ],\n ]);\n if (this.duration) {\n this.payload = Bytes.concat([\n this.payload,\n [this.duration.serializeReport()],\n ]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"session id\": this.sessionId,\n \"more updates follow\": this.moreUpdatesFollow,\n status: getEnumMemberName(SupervisionStatus, this.status),\n };\n if (this.duration) {\n message.duration = this.duration.toString();\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n public toSupervisionResult(): SupervisionResult {\n if (this.status === SupervisionStatus.Working) {\n return {\n status: this.status,\n remainingDuration: this.duration!,\n };\n }\n else {\n return {\n status: this.status,\n };\n }\n }\n}\n// @publicAPI\nexport interface SupervisionCCGetOptions {\n requestStatusUpdates: boolean;\n encapsulated: CommandClass;\n sessionId: number;\n}\nfunction testResponseForSupervisionCCGet(sent: SupervisionCCGet, received: SupervisionCCReport) {\n return received.sessionId === sent.sessionId;\n}\n@CCCommand(SupervisionCommand.Get)\n@expectedCCResponse(SupervisionCCReport, testResponseForSupervisionCCGet)\nexport class SupervisionCCGet extends SupervisionCC {\n public constructor(options: WithAddress<SupervisionCCGetOptions>) {\n super(options);\n this.sessionId = options.sessionId;\n this.requestStatusUpdates = options.requestStatusUpdates;\n this.encapsulated = options.encapsulated;\n // Supervision is inside MultiChannel CCs, so the endpoint must be copied\n this.encapsulated.endpointIndex = this.endpointIndex;\n this.encapsulated.encapsulatingCC = this as any;\n }\n public static async from(raw: CCRaw, ctx: CCParsingContext): Promise<SupervisionCCGet> {\n validatePayload(raw.payload.length >= 3);\n const requestStatusUpdates = !!(raw.payload[0] & 128);\n const sessionId = raw.payload[0] & 0b111111;\n const encapsulated = await CommandClass.parse(raw.payload.subarray(2), ctx);\n return new this({\n nodeId: ctx.sourceNodeId,\n requestStatusUpdates,\n sessionId,\n encapsulated,\n });\n }\n public requestStatusUpdates: boolean;\n public sessionId: number;\n public encapsulated: CommandClass;\n public async serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const encapCC = await this.encapsulated.serialize(ctx);\n this.payload = Bytes.concat([\n [\n (this.requestStatusUpdates ? 128 : 0)\n | (this.sessionId & 0b111111),\n encapCC.length,\n ],\n encapCC,\n ]);\n return super.serialize(ctx);\n }\n protected computeEncapsulationOverhead(): number {\n // Supervision CC adds two bytes (control byte + cc length)\n return super.computeEncapsulationOverhead() + 2;\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"session id\": this.sessionId,\n \"request updates\": this.requestStatusUpdates,\n },\n };\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAqZ;AACrZ,oBAAyC;AACzC,iBAA8B;AAC9B,0BAAyC;AACzC,oCAA4G;AAE5G,mBAAmC;AAEnC,gCAAoC;IAQvB,oBAAgB,MAAA;8BAD5B,mCAAI,2BAAe,WAAW,CAAC;;;;oBACM;wCAAA,YAAa;WAAA;;;;;;;;AAAnD,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,KAAuB;AAC1C,cAAQ,KAAK;QACT,KAAK,gCAAmB;QACxB,KAAK,gCAAmB;AACpB,iBAAO;MACf;AACA,aAAO,MAAM,gBAAgB,GAAG;IACpC;IACO,MAAM,WAAW,SAGvB;AAGG,YAAM,EAAE,qBAAqB,+BAAmB,MAAM,cAAc,OA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AACD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACU,+BAA4B;AAElC,aAAO,MAAM,6BAA4B,IAAK;IAClD;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,cAAc,KAAK;UACnB,mBAAmB,KAAK;;;IAGpC;;;;",
|
|
6
6
|
"names": ["SupervisionCC"]
|
|
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, 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 { ThermostatFanMode, ThermostatFanModeCommand } from "../lib/_Types.js";
|
|
6
6
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
7
7
|
import { ThermostatFanModeCCValues } from "./_CCValues.generated.js";
|
|
@@ -17,7 +17,7 @@ export declare class ThermostatFanModeCCAPI extends CCAPI {
|
|
|
17
17
|
export declare class ThermostatFanModeCC extends CommandClass {
|
|
18
18
|
ccCommand: ThermostatFanModeCommand;
|
|
19
19
|
interview(ctx: InterviewContext): Promise<void>;
|
|
20
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
20
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
21
21
|
}
|
|
22
22
|
export interface ThermostatFanModeCCSetOptions {
|
|
23
23
|
mode: ThermostatFanMode;
|
|
@@ -39,6 +39,7 @@ __export(ThermostatFanModeCC_exports, {
|
|
|
39
39
|
ThermostatFanModeCCValues: () => import_CCValues_generated.ThermostatFanModeCCValues
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(ThermostatFanModeCC_exports);
|
|
42
|
+
var import_tslib = require("tslib");
|
|
42
43
|
var __validateArgs = __toESM(require("./ThermostatFanModeCC._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_ThermostatFanModeCCAPI_set } = __validateArgs;
|
|
91
52
|
let ThermostatFanModeCCAPI = (() => {
|
|
92
53
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Thermostat Fan Mode"])];
|
|
@@ -106,11 +67,11 @@ let ThermostatFanModeCCAPI = (() => {
|
|
|
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_ThermostatFanModeCCAPI_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
|
ThermostatFanModeCCAPI2 = _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) {
|
|
@@ -194,7 +155,7 @@ let ThermostatFanModeCCAPI = (() => {
|
|
|
194
155
|
}
|
|
195
156
|
constructor() {
|
|
196
157
|
super(...arguments);
|
|
197
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
158
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
198
159
|
}
|
|
199
160
|
};
|
|
200
161
|
return ThermostatFanModeCCAPI2 = _classThis;
|
|
@@ -214,10 +175,10 @@ let ThermostatFanModeCC = (() => {
|
|
|
214
175
|
}
|
|
215
176
|
static {
|
|
216
177
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
217
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
178
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
218
179
|
ThermostatFanModeCC2 = _classThis = _classDescriptor.value;
|
|
219
180
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
220
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
181
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
221
182
|
}
|
|
222
183
|
async interview(ctx) {
|
|
223
184
|
const node = this.getNode(ctx);
|
|
@@ -254,11 +215,11 @@ let ThermostatFanModeCC = (() => {
|
|
|
254
215
|
await this.refreshValues(ctx);
|
|
255
216
|
this.setInterviewComplete(ctx, true);
|
|
256
217
|
}
|
|
257
|
-
async refreshValues(ctx) {
|
|
218
|
+
async refreshValues(ctx, options) {
|
|
258
219
|
const node = this.getNode(ctx);
|
|
259
220
|
const endpoint = this.getEndpoint(ctx);
|
|
260
221
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Thermostat Fan Mode"], ctx, endpoint).withOptions({
|
|
261
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
222
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
262
223
|
});
|
|
263
224
|
ctx.logNode(node.id, {
|
|
264
225
|
endpoint: this.endpointIndex,
|
|
@@ -296,10 +257,10 @@ let ThermostatFanModeCCSet = (() => {
|
|
|
296
257
|
}
|
|
297
258
|
static {
|
|
298
259
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
299
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
260
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
300
261
|
ThermostatFanModeCCSet2 = _classThis = _classDescriptor.value;
|
|
301
262
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
302
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
263
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
303
264
|
}
|
|
304
265
|
constructor(options) {
|
|
305
266
|
super(options);
|
|
@@ -344,10 +305,10 @@ let ThermostatFanModeCCReport = (() => {
|
|
|
344
305
|
}
|
|
345
306
|
static {
|
|
346
307
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
347
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
308
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
348
309
|
ThermostatFanModeCCReport2 = _classThis = _classDescriptor.value;
|
|
349
310
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
350
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
311
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
351
312
|
}
|
|
352
313
|
constructor(options) {
|
|
353
314
|
super(options);
|
|
@@ -396,10 +357,10 @@ let ThermostatFanModeCCGet = (() => {
|
|
|
396
357
|
}
|
|
397
358
|
static {
|
|
398
359
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
399
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
360
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
400
361
|
ThermostatFanModeCCGet2 = _classThis = _classDescriptor.value;
|
|
401
362
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
402
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
363
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
403
364
|
}
|
|
404
365
|
};
|
|
405
366
|
return ThermostatFanModeCCGet2 = _classThis;
|
|
@@ -419,10 +380,10 @@ let ThermostatFanModeCCSupportedReport = (() => {
|
|
|
419
380
|
}
|
|
420
381
|
static {
|
|
421
382
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
422
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
383
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
423
384
|
ThermostatFanModeCCSupportedReport2 = _classThis = _classDescriptor.value;
|
|
424
385
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
425
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
386
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
426
387
|
}
|
|
427
388
|
constructor(options) {
|
|
428
389
|
super(options);
|
|
@@ -473,10 +434,10 @@ let ThermostatFanModeCCSupportedGet = (() => {
|
|
|
473
434
|
}
|
|
474
435
|
static {
|
|
475
436
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
476
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
437
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
477
438
|
ThermostatFanModeCCSupportedGet2 = _classThis = _classDescriptor.value;
|
|
478
439
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
479
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
440
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
480
441
|
}
|
|
481
442
|
};
|
|
482
443
|
return ThermostatFanModeCCSupportedGet2 = _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/ThermostatFanModeCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./ThermostatFanModeCC._validateArgs.js\";\nconst { validateArgs_ThermostatFanModeCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, 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 { ThermostatFanMode, ThermostatFanModeCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatFanModeCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatFanModeCCValues };\n@API(CommandClasses[\"Thermostat Fan Mode\"])\nexport class ThermostatFanModeCCAPI extends CCAPI {\n public supportsCommand(cmd: ThermostatFanModeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatFanModeCommand.Get:\n case ThermostatFanModeCommand.SupportedGet:\n return this.isSinglecast();\n case ThermostatFanModeCommand.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: ThermostatFanModeCCAPI, { property }, value) {\n const valueDB = this.getValueDB();\n let result: SupervisionResult | undefined;\n if (property === \"mode\") {\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n // Preserve the value of the \"off\" flag\n const off = valueDB.getValue<boolean>(ThermostatFanModeCCValues.turnedOff.endpoint(this.endpoint.index));\n result = await this.set(value, off);\n }\n else if (property === \"off\") {\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n const mode = valueDB.getValue<ThermostatFanMode>(ThermostatFanModeCCValues.fanMode.endpoint(this.endpoint.index));\n if (mode == undefined) {\n throw new ZWaveError(`The \"off\" property cannot be changed before the fan mode is known!`, ZWaveErrorCodes.Argument_Invalid);\n }\n result = await this.set(mode, value);\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\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: ThermostatFanModeCCAPI, { property }) {\n switch (property) {\n case \"mode\":\n case \"off\":\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(ThermostatFanModeCommand, ThermostatFanModeCommand.Get);\n const cc = new ThermostatFanModeCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatFanModeCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"mode\", \"off\"]);\n }\n }\n @validateArgs_ThermostatFanModeCCAPI_set()\n public async set(mode: ThermostatFanMode, off?: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ThermostatFanModeCommand, ThermostatFanModeCommand.Set);\n const cc = new ThermostatFanModeCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n mode,\n off,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getSupportedModes(): Promise<MaybeNotKnown<readonly ThermostatFanMode[]>> {\n this.assertSupportsCommand(ThermostatFanModeCommand, ThermostatFanModeCommand.SupportedGet);\n const cc = new ThermostatFanModeCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatFanModeCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedModes;\n }\n}\n@commandClass(CommandClasses[\"Thermostat Fan Mode\"])\n@implementedVersion(5)\n@ccValues(ThermostatFanModeCCValues)\nexport class ThermostatFanModeCC extends CommandClass {\n declare ccCommand: ThermostatFanModeCommand;\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 Fan 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 fan modes...\",\n direction: \"outbound\",\n });\n const supportedModes = await api.getSupportedModes();\n if (supportedModes) {\n const logMessage = `received supported thermostat fan modes:${supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(ThermostatFanMode, 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 fan modes timed out, skipping interview...\",\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 Fan 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 fan mode...\",\n direction: \"outbound\",\n });\n const currentStatus = await api.get();\n if (currentStatus) {\n let logMessage = `received current thermostat fan mode: ${getEnumMemberName(ThermostatFanMode, currentStatus.mode)}`;\n if (currentStatus.off != undefined) {\n logMessage += ` (turned off)`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ThermostatFanModeCCSetOptions {\n mode: ThermostatFanMode;\n off?: boolean;\n}\n@CCCommand(ThermostatFanModeCommand.Set)\n@useSupervision()\nexport class ThermostatFanModeCCSet extends ThermostatFanModeCC {\n public constructor(options: WithAddress<ThermostatFanModeCCSetOptions>) {\n super(options);\n this.mode = options.mode;\n this.off = options.off;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): ThermostatFanModeCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new ThermostatFanModeCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public mode: ThermostatFanMode;\n public off: boolean | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n (this.off ? 128 : 0)\n | (this.mode & 0b1111),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatFanMode, this.mode),\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface ThermostatFanModeCCReportOptions {\n mode: ThermostatFanMode;\n off?: boolean;\n}\n@CCCommand(ThermostatFanModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatFanModeCCValues.fanMode)\n@ccValueProperty(\"off\", ThermostatFanModeCCValues.turnedOff)\nexport class ThermostatFanModeCCReport extends ThermostatFanModeCC {\n public constructor(options: WithAddress<ThermostatFanModeCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.mode = options.mode;\n this.off = options.off;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatFanModeCCReport {\n validatePayload(raw.payload.length >= 1);\n const mode: ThermostatFanMode = raw.payload[0] & 0b1111;\n // V3+\n const off = !!(raw.payload[0] & 128);\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n off,\n });\n }\n public readonly mode: ThermostatFanMode;\n public readonly off: boolean | undefined;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatFanMode, this.mode),\n };\n if (this.off != undefined) {\n message.off = this.off;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ThermostatFanModeCommand.Get)\n@expectedCCResponse(ThermostatFanModeCCReport)\nexport class ThermostatFanModeCCGet extends ThermostatFanModeCC {\n}\n// @publicAPI\nexport interface ThermostatFanModeCCSupportedReportOptions {\n supportedModes: ThermostatFanMode[];\n}\n@CCCommand(ThermostatFanModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatFanModeCCValues.supportedFanModes)\nexport class ThermostatFanModeCCSupportedReport extends ThermostatFanModeCC {\n public constructor(options: WithAddress<ThermostatFanModeCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedModes = options.supportedModes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatFanModeCCSupportedReport {\n const supportedModes: ThermostatFanMode[] = parseBitMask(raw.payload, ThermostatFanMode[\"Auto low\"]);\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 // Remember which fan modes are supported\n const fanModeValue = ThermostatFanModeCCValues.fanMode;\n this.setMetadata(ctx, fanModeValue, {\n ...fanModeValue.meta,\n states: enumValuesToMetadataStates(ThermostatFanMode, this.supportedModes),\n });\n return true;\n }\n public readonly supportedModes: ThermostatFanMode[];\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(ThermostatFanMode, mode)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(ThermostatFanModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatFanModeCCSupportedReport)\nexport class ThermostatFanModeCCSupportedGet extends ThermostatFanModeCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./ThermostatFanModeCC._validateArgs.js\";\nconst { validateArgs_ThermostatFanModeCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, 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 { ThermostatFanMode, ThermostatFanModeCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { ThermostatFanModeCCValues } from \"./_CCValues.generated.js\";\nexport { ThermostatFanModeCCValues };\n@API(CommandClasses[\"Thermostat Fan Mode\"])\nexport class ThermostatFanModeCCAPI extends CCAPI {\n public supportsCommand(cmd: ThermostatFanModeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ThermostatFanModeCommand.Get:\n case ThermostatFanModeCommand.SupportedGet:\n return this.isSinglecast();\n case ThermostatFanModeCommand.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: ThermostatFanModeCCAPI, { property }, value) {\n const valueDB = this.getValueDB();\n let result: SupervisionResult | undefined;\n if (property === \"mode\") {\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n // Preserve the value of the \"off\" flag\n const off = valueDB.getValue<boolean>(ThermostatFanModeCCValues.turnedOff.endpoint(this.endpoint.index));\n result = await this.set(value, off);\n }\n else if (property === \"off\") {\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n const mode = valueDB.getValue<ThermostatFanMode>(ThermostatFanModeCCValues.fanMode.endpoint(this.endpoint.index));\n if (mode == undefined) {\n throw new ZWaveError(`The \"off\" property cannot be changed before the fan mode is known!`, ZWaveErrorCodes.Argument_Invalid);\n }\n result = await this.set(mode, value);\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\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: ThermostatFanModeCCAPI, { property }) {\n switch (property) {\n case \"mode\":\n case \"off\":\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(ThermostatFanModeCommand, ThermostatFanModeCommand.Get);\n const cc = new ThermostatFanModeCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatFanModeCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"mode\", \"off\"]);\n }\n }\n @validateArgs_ThermostatFanModeCCAPI_set()\n public async set(mode: ThermostatFanMode, off?: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ThermostatFanModeCommand, ThermostatFanModeCommand.Set);\n const cc = new ThermostatFanModeCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n mode,\n off,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getSupportedModes(): Promise<MaybeNotKnown<readonly ThermostatFanMode[]>> {\n this.assertSupportsCommand(ThermostatFanModeCommand, ThermostatFanModeCommand.SupportedGet);\n const cc = new ThermostatFanModeCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<ThermostatFanModeCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedModes;\n }\n}\n@commandClass(CommandClasses[\"Thermostat Fan Mode\"])\n@implementedVersion(5)\n@ccValues(ThermostatFanModeCCValues)\nexport class ThermostatFanModeCC extends CommandClass {\n declare ccCommand: ThermostatFanModeCommand;\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 Fan 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 fan modes...\",\n direction: \"outbound\",\n });\n const supportedModes = await api.getSupportedModes();\n if (supportedModes) {\n const logMessage = `received supported thermostat fan modes:${supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(ThermostatFanMode, 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 fan modes timed out, skipping interview...\",\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 Fan 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 fan mode...\",\n direction: \"outbound\",\n });\n const currentStatus = await api.get();\n if (currentStatus) {\n let logMessage = `received current thermostat fan mode: ${getEnumMemberName(ThermostatFanMode, currentStatus.mode)}`;\n if (currentStatus.off != undefined) {\n logMessage += ` (turned off)`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface ThermostatFanModeCCSetOptions {\n mode: ThermostatFanMode;\n off?: boolean;\n}\n@CCCommand(ThermostatFanModeCommand.Set)\n@useSupervision()\nexport class ThermostatFanModeCCSet extends ThermostatFanModeCC {\n public constructor(options: WithAddress<ThermostatFanModeCCSetOptions>) {\n super(options);\n this.mode = options.mode;\n this.off = options.off;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): ThermostatFanModeCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new ThermostatFanModeCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public mode: ThermostatFanMode;\n public off: boolean | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n (this.off ? 128 : 0)\n | (this.mode & 0b1111),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatFanMode, this.mode),\n };\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface ThermostatFanModeCCReportOptions {\n mode: ThermostatFanMode;\n off?: boolean;\n}\n@CCCommand(ThermostatFanModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatFanModeCCValues.fanMode)\n@ccValueProperty(\"off\", ThermostatFanModeCCValues.turnedOff)\nexport class ThermostatFanModeCCReport extends ThermostatFanModeCC {\n public constructor(options: WithAddress<ThermostatFanModeCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.mode = options.mode;\n this.off = options.off;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatFanModeCCReport {\n validatePayload(raw.payload.length >= 1);\n const mode: ThermostatFanMode = raw.payload[0] & 0b1111;\n // V3+\n const off = !!(raw.payload[0] & 128);\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n off,\n });\n }\n public readonly mode: ThermostatFanMode;\n public readonly off: boolean | undefined;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n mode: getEnumMemberName(ThermostatFanMode, this.mode),\n };\n if (this.off != undefined) {\n message.off = this.off;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ThermostatFanModeCommand.Get)\n@expectedCCResponse(ThermostatFanModeCCReport)\nexport class ThermostatFanModeCCGet extends ThermostatFanModeCC {\n}\n// @publicAPI\nexport interface ThermostatFanModeCCSupportedReportOptions {\n supportedModes: ThermostatFanMode[];\n}\n@CCCommand(ThermostatFanModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatFanModeCCValues.supportedFanModes)\nexport class ThermostatFanModeCCSupportedReport extends ThermostatFanModeCC {\n public constructor(options: WithAddress<ThermostatFanModeCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedModes = options.supportedModes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ThermostatFanModeCCSupportedReport {\n const supportedModes: ThermostatFanMode[] = parseBitMask(raw.payload, ThermostatFanMode[\"Auto low\"]);\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 // Remember which fan modes are supported\n const fanModeValue = ThermostatFanModeCCValues.fanMode;\n this.setMetadata(ctx, fanModeValue, {\n ...fanModeValue.meta,\n states: enumValuesToMetadataStates(ThermostatFanMode, this.supportedModes),\n });\n return true;\n }\n public readonly supportedModes: ThermostatFanMode[];\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(ThermostatFanMode, mode)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(ThermostatFanModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatFanModeCCSupportedReport)\nexport class ThermostatFanModeCCSupportedGet extends ThermostatFanModeCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAiT;AACjT,oBAA+C;AAC/C,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAA4D;AAE5D,gCAA0C;AAT1C,MAAM,EAAE,wCAAuC,IAAK;IAYvC,0BAAsB,MAAA;8BADlC,mCAAI,2BAAe,qBAAqB,CAAC,CAAC;;;;oBACC;;;8CAAA,YAAK;WAAA;;;;;;;;yBAoE5C,wCAAuC,CAAE;AAC1C,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;AArEpB,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,KAA6B;AAChD,cAAQ,KAAK;QACT,KAAK,sCAAyB;QAC9B,KAAK,sCAAyB;AAC1B,iBAAO,KAAK,aAAY;QAC5B,KAAK,sCAAyB;AAC1B,iBAAO;MACf;AACA,aAAO,MAAM,gBAAgB,GAAG;IACpC;IACA,KAAwB,oBAAS,IAAC;AAC9B,aAAO,eAA8C,EAAE,SAAQ,GAAI,OAAK;AACpE,cAAM,UAAU,KAAK,WAAU;AAC/B,YAAI;AACJ,YAAI,aAAa,QAAQ;AACrB,cAAI,OAAO,UAAU,UAAU;AAC3B,gDAAoB,KAAK,MA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;;oBACF;uDAAA,YAAmB;WAAA;;;;;;;;AAAxE,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 { CCAPI, POLL_VALUE, 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 { ThermostatFanState, ThermostatFanStateCommand } from "../lib/_Types.js";
|
|
5
5
|
import type { CCParsingContext } from "../lib/traits.js";
|
|
6
6
|
import { ThermostatFanStateCCValues } from "./_CCValues.generated.js";
|
|
@@ -13,7 +13,7 @@ export declare class ThermostatFanStateCCAPI extends CCAPI {
|
|
|
13
13
|
export declare class ThermostatFanStateCC extends CommandClass {
|
|
14
14
|
ccCommand: ThermostatFanStateCommand;
|
|
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 ThermostatFanStateCCReportOptions {
|
|
19
19
|
state: ThermostatFanState;
|
|
@@ -26,6 +26,7 @@ __export(ThermostatFanStateCC_exports, {
|
|
|
26
26
|
ThermostatFanStateCCValues: () => import_CCValues_generated.ThermostatFanStateCCValues
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(ThermostatFanStateCC_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 ThermostatFanStateCCAPI = (() => {
|
|
77
38
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Thermostat Fan State"])];
|
|
78
39
|
let _classDescriptor;
|
|
@@ -88,10 +49,10 @@ let ThermostatFanStateCCAPI = (() => {
|
|
|
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
|
ThermostatFanStateCCAPI2 = _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) {
|
|
@@ -140,10 +101,10 @@ let ThermostatFanStateCC = (() => {
|
|
|
140
101
|
}
|
|
141
102
|
static {
|
|
142
103
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
143
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
104
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
144
105
|
ThermostatFanStateCC2 = _classThis = _classDescriptor.value;
|
|
145
106
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
146
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
107
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
147
108
|
}
|
|
148
109
|
async interview(ctx) {
|
|
149
110
|
const node = this.getNode(ctx);
|
|
@@ -155,11 +116,11 @@ let ThermostatFanStateCC = (() => {
|
|
|
155
116
|
await this.refreshValues(ctx);
|
|
156
117
|
this.setInterviewComplete(ctx, true);
|
|
157
118
|
}
|
|
158
|
-
async refreshValues(ctx) {
|
|
119
|
+
async refreshValues(ctx, options) {
|
|
159
120
|
const node = this.getNode(ctx);
|
|
160
121
|
const endpoint = this.getEndpoint(ctx);
|
|
161
122
|
const api = import_API.CCAPI.create(import_core.CommandClasses["Thermostat Fan State"], ctx, endpoint).withOptions({
|
|
162
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
123
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
163
124
|
});
|
|
164
125
|
ctx.logNode(node.id, {
|
|
165
126
|
endpoint: this.endpointIndex,
|
|
@@ -193,10 +154,10 @@ let ThermostatFanStateCCReport = (() => {
|
|
|
193
154
|
}
|
|
194
155
|
static {
|
|
195
156
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
196
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
157
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
197
158
|
ThermostatFanStateCCReport2 = _classThis = _classDescriptor.value;
|
|
198
159
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
199
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
160
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
200
161
|
}
|
|
201
162
|
constructor(options) {
|
|
202
163
|
super(options);
|
|
@@ -238,10 +199,10 @@ let ThermostatFanStateCCGet = (() => {
|
|
|
238
199
|
}
|
|
239
200
|
static {
|
|
240
201
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
241
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
202
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
242
203
|
ThermostatFanStateCCGet2 = _classThis = _classDescriptor.value;
|
|
243
204
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
244
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
205
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
245
206
|
}
|
|
246
207
|
};
|
|
247
208
|
return ThermostatFanStateCCGet2 = _classThis;
|