@zwave-js/cc 14.3.10 → 15.0.0-beta.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 +139 -57
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/AssociationCC.d.ts +178 -43
- package/build/cjs/cc/AssociationCC.js +0 -4
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +138 -38
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +275 -73
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +316 -71
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BatteryCC.d.ts +759 -164
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +91 -26
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +190 -38
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CRC16CC.d.ts +4 -8
- package/build/cjs/cc/CRC16CC.js +4 -27
- package/build/cjs/cc/CRC16CC.js.map +2 -2
- package/build/cjs/cc/CentralSceneCC.d.ts +272 -53
- package/build/cjs/cc/CentralSceneCC.js.map +2 -2
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +150 -37
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
- package/build/cjs/cc/ClockCC.d.ts +3 -3
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +423 -96
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC._validateArgs.js +1 -1
- package/build/cjs/cc/ConfigurationCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/ConfigurationCC.d.ts +101 -37
- package/build/cjs/cc/ConfigurationCC.js +0 -8
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +1 -1
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
- package/build/cjs/cc/DoorLockCC._validateArgs.js +1 -1
- package/build/cjs/cc/DoorLockCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +1731 -419
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +64 -12
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +29 -14
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +308 -57
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js +26 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +389 -64
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +154 -8
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlModeCC.d.ts +125 -27
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +64 -18
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +116 -39
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/InclusionControllerCC.d.ts +4 -4
- package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
- package/build/cjs/cc/IndicatorCC.d.ts +325 -83
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +2170 -683
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +128 -26
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +64 -14
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +219 -57
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
- package/build/cjs/cc/MeterCC.d.ts +364 -89
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +138 -40
- package/build/cjs/cc/MultiChannelAssociationCC.js +0 -5
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.d.ts +469 -99
- package/build/cjs/cc/MultiChannelCC.js +8 -72
- package/build/cjs/cc/MultiChannelCC.js.map +2 -2
- package/build/cjs/cc/MultiCommandCC.d.ts +4 -8
- package/build/cjs/cc/MultiCommandCC.js +4 -37
- package/build/cjs/cc/MultiCommandCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSensorCC.d.ts +118 -33
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +490 -125
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +128 -26
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +603 -161
- package/build/cjs/cc/NotificationCC.js +12 -1
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.d.ts +6 -6
- package/build/cjs/cc/PowerlevelCC.js.map +2 -2
- package/build/cjs/cc/ProtectionCC.d.ts +496 -94
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.d.ts +127 -28
- package/build/cjs/cc/SceneActivationCC.js.map +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +52 -25
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +53 -25
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +268 -64
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
- package/build/cjs/cc/Security2CC.d.ts +15 -21
- package/build/cjs/cc/Security2CC.js +32 -347
- package/build/cjs/cc/Security2CC.js.map +3 -3
- package/build/cjs/cc/SecurityCC.d.ts +12 -19
- package/build/cjs/cc/SecurityCC.js +12 -106
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC.d.ts +253 -64
- package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
- package/build/cjs/cc/SupervisionCC.d.ts +28 -16
- package/build/cjs/cc/SupervisionCC.js +4 -29
- package/build/cjs/cc/SupervisionCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +187 -38
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +64 -18
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +189 -40
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +65 -19
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +4 -4
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +116 -36
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.d.ts +6 -6
- package/build/cjs/cc/TimeCC.js.map +2 -2
- package/build/cjs/cc/TimeParametersCC.d.ts +63 -12
- package/build/cjs/cc/TimeParametersCC.js.map +2 -2
- package/build/cjs/cc/TransportServiceCC.d.ts +7 -12
- package/build/cjs/cc/TransportServiceCC.js +3 -20
- package/build/cjs/cc/TransportServiceCC.js.map +2 -2
- package/build/cjs/cc/UserCodeCC._validateArgs.js +1 -1
- package/build/cjs/cc/UserCodeCC._validateArgs.js.map +1 -1
- package/build/cjs/cc/UserCodeCC.d.ts +931 -176
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.d.ts +897 -185
- package/build/cjs/cc/VersionCC.js.map +2 -2
- package/build/cjs/cc/WakeUpCC.d.ts +190 -38
- package/build/cjs/cc/WakeUpCC.js.map +2 -2
- package/build/cjs/cc/WindowCoveringCC.d.ts +193 -103
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWavePlusCC.d.ts +311 -51
- package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +28 -28
- package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index_browser.d.ts +9 -0
- package/build/cjs/index_browser.js +41 -1
- package/build/cjs/index_browser.js.map +2 -2
- package/build/cjs/lib/API.d.ts +7 -5
- package/build/cjs/lib/API.js +1 -1
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +10 -21
- package/build/cjs/lib/CommandClass.js +51 -106
- package/build/cjs/lib/CommandClass.js.map +3 -3
- package/build/cjs/lib/CommandClassDecorators.d.ts +1 -1
- package/build/cjs/lib/CommandClassDecorators.js +3 -3
- package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
- package/build/cjs/lib/Values.d.ts +2 -2
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/traits.d.ts +94 -0
- package/build/cjs/lib/traits.js +17 -0
- package/build/cjs/lib/traits.js.map +7 -0
- package/build/cjs/lib/utils.d.ts +2 -2
- package/build/cjs/lib/utils.js.map +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts +139 -57
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +0 -1
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +178 -43
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +0 -13
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +138 -38
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +0 -6
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +275 -73
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +0 -3
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +316 -71
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +0 -2
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +759 -164
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +1 -2
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +91 -26
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +0 -3
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +190 -38
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +0 -2
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts +4 -8
- package/build/esm/cc/CRC16CC.d.ts.map +1 -1
- package/build/esm/cc/CRC16CC.js +4 -34
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +272 -53
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +0 -1
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +150 -37
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +0 -3
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +3 -3
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +0 -1
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +423 -96
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +0 -6
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC._validateArgs.js +1 -1
- package/build/esm/cc/ConfigurationCC._validateArgs.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +101 -37
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +0 -25
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC._validateArgs.js +1 -1
- package/build/esm/cc/DoorLockCC._validateArgs.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +1731 -419
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +0 -2
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +64 -12
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +0 -1
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +29 -14
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +0 -2
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +308 -57
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +0 -1
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js +20 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +389 -64
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +158 -30
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +125 -27
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +0 -1
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +64 -18
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +116 -39
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +0 -4
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.d.ts +4 -4
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +0 -2
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +325 -83
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +0 -7
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +2170 -683
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +0 -9
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +128 -26
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +0 -1
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +64 -14
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +0 -1
- 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 +0 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +219 -57
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +0 -2
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +364 -89
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +0 -4
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +138 -40
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +0 -16
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts +469 -99
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +8 -101
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.d.ts +4 -8
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +4 -38
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +118 -33
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +0 -5
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +490 -125
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +0 -4
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +128 -26
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +0 -2
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +603 -161
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +18 -12
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts +6 -6
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +0 -4
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +496 -94
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +0 -3
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts +127 -28
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +0 -1
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +52 -25
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +0 -2
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +53 -25
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +0 -2
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +268 -64
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +0 -14
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.d.ts +15 -21
- package/build/esm/cc/Security2CC.d.ts.map +1 -1
- package/build/esm/cc/Security2CC.js +27 -475
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.d.ts +12 -19
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +13 -138
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +253 -64
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +0 -7
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.d.ts +28 -16
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
- package/build/esm/cc/SupervisionCC.js +4 -34
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +187 -38
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +0 -1
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +64 -18
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +189 -40
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +0 -3
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +65 -19
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +4 -4
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +0 -2
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +116 -36
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +0 -6
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +6 -6
- package/build/esm/cc/TimeCC.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.js +0 -4
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts +63 -12
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +0 -1
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.d.ts +7 -12
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +5 -38
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC._validateArgs.js +1 -1
- package/build/esm/cc/UserCodeCC._validateArgs.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +931 -176
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +0 -12
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +897 -185
- package/build/esm/cc/VersionCC.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.js +0 -4
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +190 -38
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.js +0 -1
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +193 -103
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +0 -5
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +311 -51
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +0 -1
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.d.ts +28 -28
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +0 -27
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +0 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index_browser.d.ts +9 -0
- package/build/esm/index_browser.d.ts.map +1 -1
- package/build/esm/index_browser.js +8 -1
- package/build/esm/index_browser.js.map +1 -1
- package/build/esm/lib/API.d.ts +7 -5
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.js +1 -1
- package/build/esm/lib/API.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +10 -21
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +8 -101
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts +1 -1
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
- package/build/esm/lib/CommandClassDecorators.js +1 -1
- package/build/esm/lib/CommandClassDecorators.js.map +1 -1
- package/build/esm/lib/Values.d.ts +2 -2
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/traits.d.ts +94 -0
- package/build/esm/lib/traits.d.ts.map +1 -0
- package/build/esm/lib/traits.js +2 -0
- package/build/esm/lib/traits.js.map +1 -0
- package/build/esm/lib/utils.d.ts +2 -2
- package/build/esm/lib/utils.d.ts.map +1 -1
- package/build/esm/lib/utils.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/ThermostatFanModeCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatFanMode, ThermostatFanModeCommand } from \"../lib/_Types.js\";\n\nexport const ThermostatFanModeCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Thermostat Fan Mode\"], {\n\t\t...V.staticPropertyWithName(\n\t\t\t\"turnedOff\",\n\t\t\t\"off\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Thermostat fan turned off\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 3 } as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"fanMode\",\n\t\t\t\"mode\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatFanMode),\n\t\t\t\tlabel: \"Thermostat fan mode\",\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"supportedFanModes\",\n\t\t\t\"supportedModes\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Thermostat Fan Mode\"])\nexport class ThermostatFanModeCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatFanModeCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatFanModeCommand.Get:\n\t\t\tcase ThermostatFanModeCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ThermostatFanModeCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: ThermostatFanModeCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t) {\n\t\t\tconst valueDB = this.getValueDB();\n\t\t\tlet result: SupervisionResult | undefined;\n\n\t\t\tif (property === \"mode\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Preserve the value of the \"off\" flag\n\t\t\t\tconst off = valueDB.getValue<boolean>(\n\t\t\t\t\tThermostatFanModeCCValues.turnedOff.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tresult = await this.set(value, off);\n\t\t\t} else if (property === \"off\") {\n\t\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"boolean\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst mode = valueDB.getValue<ThermostatFanMode>(\n\t\t\t\t\tThermostatFanModeCCValues.fanMode.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tif (mode == undefined) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The \"off\" property cannot be changed before the fan mode is known!`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tresult = await this.set(mode, value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\n\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\t// TODO: Ideally this would be a short delay, but some thermostats like Remotec ZXT-600\n\t\t\t\t// aren't able to handle the GET this quickly.\n\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatFanModeCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"mode\":\n\t\t\t\tcase \"off\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanModeCommand,\n\t\t\tThermostatFanModeCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatFanModeCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanModeCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"mode\", \"off\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tmode: ThermostatFanMode,\n\t\toff?: boolean,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanModeCommand,\n\t\t\tThermostatFanModeCommand.Set,\n\t\t);\n\n\t\tconst cc = new ThermostatFanModeCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmode,\n\t\t\toff,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getSupportedModes(): Promise<\n\t\tMaybeNotKnown<readonly ThermostatFanMode[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanModeCommand,\n\t\t\tThermostatFanModeCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ThermostatFanModeCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanModeCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedModes;\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Fan Mode\"])\n@implementedVersion(5)\n@ccValues(ThermostatFanModeCCValues)\nexport class ThermostatFanModeCC extends CommandClass {\n\tdeclare ccCommand: ThermostatFanModeCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// First query the possible modes to set the metadata\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying supported thermostat fan modes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst supportedModes = await api.getSupportedModes();\n\t\tif (supportedModes) {\n\t\t\tconst logMessage = `received supported thermostat fan modes:${\n\t\t\t\tsupportedModes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(mode) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatFanMode, mode)}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported thermostat fan modes timed out, skipping interview...\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat fan mode...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tlet logMessage = `received current thermostat fan mode: ${\n\t\t\t\tgetEnumMemberName(\n\t\t\t\t\tThermostatFanMode,\n\t\t\t\t\tcurrentStatus.mode,\n\t\t\t\t)\n\t\t\t}`;\n\t\t\tif (currentStatus.off != undefined) {\n\t\t\t\tlogMessage += ` (turned off)`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanModeCCSetOptions {\n\tmode: ThermostatFanMode;\n\toff?: boolean;\n}\n\n@CCCommand(ThermostatFanModeCommand.Set)\n@useSupervision()\nexport class ThermostatFanModeCCSet extends ThermostatFanModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanModeCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.mode = options.mode;\n\t\tthis.off = options.off;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ThermostatFanModeCCSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ThermostatFanModeCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic mode: ThermostatFanMode;\n\tpublic off: boolean | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([\n\t\t\t(this.off ? 0b1000_0000 : 0)\n\t\t\t| (this.mode & 0b1111),\n\t\t]);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatFanMode, this.mode),\n\t\t};\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanModeCCReportOptions {\n\tmode: ThermostatFanMode;\n\toff?: boolean;\n}\n\n@CCCommand(ThermostatFanModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatFanModeCCValues.fanMode)\n@ccValueProperty(\"off\", ThermostatFanModeCCValues.turnedOff)\nexport class ThermostatFanModeCCReport extends ThermostatFanModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanModeCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.mode = options.mode;\n\t\tthis.off = options.off;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanModeCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst mode: ThermostatFanMode = raw.payload[0] & 0b1111;\n\t\t// V3+\n\t\tconst off = !!(raw.payload[0] & 0b1000_0000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmode,\n\t\t\toff,\n\t\t});\n\t}\n\n\tpublic readonly mode: ThermostatFanMode;\n\n\tpublic readonly off: boolean | undefined;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatFanMode, this.mode),\n\t\t};\n\t\tif (this.off != undefined) {\n\t\t\tmessage.off = this.off;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanModeCommand.Get)\n@expectedCCResponse(ThermostatFanModeCCReport)\nexport class ThermostatFanModeCCGet extends ThermostatFanModeCC {}\n\n// @publicAPI\nexport interface ThermostatFanModeCCSupportedReportOptions {\n\tsupportedModes: ThermostatFanMode[];\n}\n\n@CCCommand(ThermostatFanModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatFanModeCCValues.supportedFanModes)\nexport class ThermostatFanModeCCSupportedReport extends ThermostatFanModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanModeCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedModes = options.supportedModes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanModeCCSupportedReport {\n\t\tconst supportedModes: ThermostatFanMode[] = parseBitMask(\n\t\t\traw.payload,\n\t\t\tThermostatFanMode[\"Auto low\"],\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedModes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Remember which fan modes are supported\n\t\tconst fanModeValue = ThermostatFanModeCCValues.fanMode;\n\t\tthis.setMetadata(ctx, fanModeValue, {\n\t\t\t...fanModeValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tThermostatFanMode,\n\t\t\t\tthis.supportedModes,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportedModes: ThermostatFanMode[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported modes\": this.supportedModes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(mode) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatFanMode, mode)}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatFanModeCCSupportedReport)\nexport class ThermostatFanModeCCSupportedGet extends ThermostatFanModeCC {}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
4
|
+
"sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatFanMode, ThermostatFanModeCommand } from \"../lib/_Types.js\";\n\nexport const ThermostatFanModeCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Thermostat Fan Mode\"], {\n\t\t...V.staticPropertyWithName(\n\t\t\t\"turnedOff\",\n\t\t\t\"off\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Thermostat fan turned off\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 3 } as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"fanMode\",\n\t\t\t\"mode\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatFanMode),\n\t\t\t\tlabel: \"Thermostat fan mode\",\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"supportedFanModes\",\n\t\t\t\"supportedModes\",\n\t\t\tundefined,\n\t\t\t{ internal: true },\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Thermostat Fan Mode\"])\nexport class ThermostatFanModeCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatFanModeCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatFanModeCommand.Get:\n\t\t\tcase ThermostatFanModeCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ThermostatFanModeCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: ThermostatFanModeCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t) {\n\t\t\tconst valueDB = this.getValueDB();\n\t\t\tlet result: SupervisionResult | undefined;\n\n\t\t\tif (property === \"mode\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Preserve the value of the \"off\" flag\n\t\t\t\tconst off = valueDB.getValue<boolean>(\n\t\t\t\t\tThermostatFanModeCCValues.turnedOff.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tresult = await this.set(value, off);\n\t\t\t} else if (property === \"off\") {\n\t\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"boolean\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst mode = valueDB.getValue<ThermostatFanMode>(\n\t\t\t\t\tThermostatFanModeCCValues.fanMode.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tif (mode == undefined) {\n\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t`The \"off\" property cannot be changed before the fan mode is known!`,\n\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tresult = await this.set(mode, value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\n\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\t// TODO: Ideally this would be a short delay, but some thermostats like Remotec ZXT-600\n\t\t\t\t// aren't able to handle the GET this quickly.\n\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatFanModeCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"mode\":\n\t\t\t\tcase \"off\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanModeCommand,\n\t\t\tThermostatFanModeCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatFanModeCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanModeCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"mode\", \"off\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tmode: ThermostatFanMode,\n\t\toff?: boolean,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanModeCommand,\n\t\t\tThermostatFanModeCommand.Set,\n\t\t);\n\n\t\tconst cc = new ThermostatFanModeCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmode,\n\t\t\toff,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getSupportedModes(): Promise<\n\t\tMaybeNotKnown<readonly ThermostatFanMode[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanModeCommand,\n\t\t\tThermostatFanModeCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ThermostatFanModeCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanModeCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedModes;\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Fan Mode\"])\n@implementedVersion(5)\n@ccValues(ThermostatFanModeCCValues)\nexport class ThermostatFanModeCC extends CommandClass {\n\tdeclare ccCommand: ThermostatFanModeCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// First query the possible modes to set the metadata\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying supported thermostat fan modes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst supportedModes = await api.getSupportedModes();\n\t\tif (supportedModes) {\n\t\t\tconst logMessage = `received supported thermostat fan modes:${\n\t\t\t\tsupportedModes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(mode) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatFanMode, mode)}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported thermostat fan modes timed out, skipping interview...\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat fan mode...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tlet logMessage = `received current thermostat fan mode: ${\n\t\t\t\tgetEnumMemberName(\n\t\t\t\t\tThermostatFanMode,\n\t\t\t\t\tcurrentStatus.mode,\n\t\t\t\t)\n\t\t\t}`;\n\t\t\tif (currentStatus.off != undefined) {\n\t\t\t\tlogMessage += ` (turned off)`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanModeCCSetOptions {\n\tmode: ThermostatFanMode;\n\toff?: boolean;\n}\n\n@CCCommand(ThermostatFanModeCommand.Set)\n@useSupervision()\nexport class ThermostatFanModeCCSet extends ThermostatFanModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanModeCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.mode = options.mode;\n\t\tthis.off = options.off;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ThermostatFanModeCCSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ThermostatFanModeCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic mode: ThermostatFanMode;\n\tpublic off: boolean | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\t(this.off ? 0b1000_0000 : 0)\n\t\t\t| (this.mode & 0b1111),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatFanMode, this.mode),\n\t\t};\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanModeCCReportOptions {\n\tmode: ThermostatFanMode;\n\toff?: boolean;\n}\n\n@CCCommand(ThermostatFanModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatFanModeCCValues.fanMode)\n@ccValueProperty(\"off\", ThermostatFanModeCCValues.turnedOff)\nexport class ThermostatFanModeCCReport extends ThermostatFanModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanModeCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.mode = options.mode;\n\t\tthis.off = options.off;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanModeCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst mode: ThermostatFanMode = raw.payload[0] & 0b1111;\n\t\t// V3+\n\t\tconst off = !!(raw.payload[0] & 0b1000_0000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmode,\n\t\t\toff,\n\t\t});\n\t}\n\n\tpublic readonly mode: ThermostatFanMode;\n\n\tpublic readonly off: boolean | undefined;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatFanMode, this.mode),\n\t\t};\n\t\tif (this.off != undefined) {\n\t\t\tmessage.off = this.off;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanModeCommand.Get)\n@expectedCCResponse(ThermostatFanModeCCReport)\nexport class ThermostatFanModeCCGet extends ThermostatFanModeCC {}\n\n// @publicAPI\nexport interface ThermostatFanModeCCSupportedReportOptions {\n\tsupportedModes: ThermostatFanMode[];\n}\n\n@CCCommand(ThermostatFanModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatFanModeCCValues.supportedFanModes)\nexport class ThermostatFanModeCCSupportedReport extends ThermostatFanModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanModeCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedModes = options.supportedModes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanModeCCSupportedReport {\n\t\tconst supportedModes: ThermostatFanMode[] = parseBitMask(\n\t\t\traw.payload,\n\t\t\tThermostatFanMode[\"Auto low\"],\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedModes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Remember which fan modes are supported\n\t\tconst fanModeValue = ThermostatFanModeCCValues.fanMode;\n\t\tthis.setMetadata(ctx, fanModeValue, {\n\t\t\t...fanModeValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tThermostatFanMode,\n\t\t\t\tthis.supportedModes,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportedModes: ThermostatFanMode[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported modes\": this.supportedModes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(mode) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatFanMode, mode)}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatFanModeCCSupportedReport)\nexport class ThermostatFanModeCCSupportedGet extends ThermostatFanModeCC {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAgBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAA4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErD,MAAM,4BAA4B,OAAO,OAAO;EACtD,GAAG,gBAAE,qBAAqB,2BAAe,qBAAqB,GAAG;IAChE,GAAG,gBAAE,uBACJ,aACA,OACA;MACC,GAAG,0BAAc;MACjB,OAAO;OAER,EAAE,YAAY,EAAC,CAAW;IAG3B,GAAG,gBAAE,uBACJ,WACA,QACA;MACC,GAAG,0BAAc;MACjB,YAAQ,wCAA2B,8BAAiB;MACpD,OAAO;KACE;IAGX,GAAG,gBAAE,uBACJ,qBACA,kBACA,QACA,EAAE,UAAU,KAAI,CAAE;GAEnB;CACD;IAGY,0BAAsB,MAAA;8BADlC,mCAAI,2BAAe,qBAAqB,CAAC,CAAC;;;;oBACC;;;8CAAA,YAAK;WAAA;;;;;;;;yBA8G/C,wCAAa,EAAE,aAAa,KAAI,CAAE,CAAC;AACpC,mBAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QA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AAU,CAAC;AAG9B,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEO,cAAc,KAAyB;AAC7C,UAAI,CAAC,MAAM,cAAc,GAAG;AAAG,eAAO;AAGtC,YAAM,eAAe,0BAA0B;AAC/C,WAAK,YAAY,KAAK,cAAc;QACnC,GAAG,aAAa;QAChB,YAAQ,wCACP,gCACA,KAAK,cAAc;OAEpB;AAED,aAAO;IACR;IAEgB;IAET,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,mBAAmB,KAAK,eACtB,IACA,CAAC,SACA;WAAO,gCAAkB,gCAAmB,IAAI,CAAC,EAAE,EAEpD,KAAK,EAAE;;;IAGZ;;;;IAKY,mCAA+B,MAAA;8BAF3C,yCAAU,sCAAyB,YAAY,OAC/C,kDAAmB,kCAAkC,CAAC;;;;oBACF;uDAAA,YAAmB;WAAA;;;;;;;;AAAxE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": ["import_safe"]
|
|
7
7
|
}
|
|
@@ -1,39 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { type CCParsingContext } from "@zwave-js/cc";
|
|
2
|
+
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, ValueMetadata, type WithAddress } from "@zwave-js/core/safe";
|
|
3
3
|
import { CCAPI, POLL_VALUE, type PollValueImplementation } from "../lib/API.js";
|
|
4
4
|
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
5
5
|
import { ThermostatFanState, ThermostatFanStateCommand } from "../lib/_Types.js";
|
|
6
6
|
export declare const ThermostatFanStateCCValues: Readonly<{
|
|
7
7
|
fanState: {
|
|
8
|
-
readonly id:
|
|
9
|
-
commandClass: (typeof CommandClasses)["Thermostat Fan State"];
|
|
10
|
-
property: "state";
|
|
11
|
-
};
|
|
8
|
+
readonly id: ValueIDBase;
|
|
12
9
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
13
10
|
readonly commandClass: (typeof CommandClasses)["Thermostat Fan State"];
|
|
14
11
|
readonly endpoint: number;
|
|
15
12
|
readonly property: "state";
|
|
16
13
|
};
|
|
17
14
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
18
|
-
readonly meta: {
|
|
19
|
-
readonly
|
|
20
|
-
[x: number]: string;
|
|
21
|
-
};
|
|
22
|
-
readonly label: "Thermostat fan state";
|
|
23
|
-
readonly writeable: false;
|
|
24
|
-
readonly min: 0;
|
|
25
|
-
readonly max: 255;
|
|
26
|
-
readonly type: "number";
|
|
15
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
16
|
+
readonly type: "any";
|
|
27
17
|
readonly readable: true;
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
readonly writeable: true;
|
|
19
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
20
|
+
readonly type: "any";
|
|
21
|
+
readonly readable: true;
|
|
22
|
+
readonly writeable: true;
|
|
23
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
24
|
+
readonly type: "any";
|
|
25
|
+
readonly readable: true;
|
|
26
|
+
readonly writeable: true;
|
|
27
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
28
|
+
readonly type: "any";
|
|
29
|
+
readonly readable: true;
|
|
30
|
+
readonly writeable: true;
|
|
31
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
32
|
+
readonly type: "any";
|
|
33
|
+
readonly readable: true;
|
|
34
|
+
readonly writeable: true;
|
|
35
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
36
|
+
readonly type: "any";
|
|
37
|
+
readonly readable: true;
|
|
38
|
+
readonly writeable: true;
|
|
39
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
40
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
30
41
|
readonly internal: false;
|
|
31
42
|
readonly minVersion: 1;
|
|
32
43
|
readonly secret: false;
|
|
33
44
|
readonly stateful: true;
|
|
34
45
|
readonly supportsEndpoints: true;
|
|
35
46
|
readonly autoCreate: true;
|
|
36
|
-
}
|
|
47
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
48
|
+
readonly internal: false;
|
|
49
|
+
readonly minVersion: 1;
|
|
50
|
+
readonly secret: false;
|
|
51
|
+
readonly stateful: true;
|
|
52
|
+
readonly supportsEndpoints: true;
|
|
53
|
+
readonly autoCreate: true;
|
|
54
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
55
|
+
readonly internal: false;
|
|
56
|
+
readonly minVersion: 1;
|
|
57
|
+
readonly secret: false;
|
|
58
|
+
readonly stateful: true;
|
|
59
|
+
readonly supportsEndpoints: true;
|
|
60
|
+
readonly autoCreate: true;
|
|
61
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
62
|
+
readonly internal: false;
|
|
63
|
+
readonly minVersion: 1;
|
|
64
|
+
readonly secret: false;
|
|
65
|
+
readonly stateful: true;
|
|
66
|
+
readonly supportsEndpoints: true;
|
|
67
|
+
readonly autoCreate: true;
|
|
68
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
69
|
+
readonly internal: false;
|
|
70
|
+
readonly minVersion: 1;
|
|
71
|
+
readonly secret: false;
|
|
72
|
+
readonly stateful: true;
|
|
73
|
+
readonly supportsEndpoints: true;
|
|
74
|
+
readonly autoCreate: true;
|
|
75
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
76
|
+
readonly internal: false;
|
|
77
|
+
readonly minVersion: 1;
|
|
78
|
+
readonly secret: false;
|
|
79
|
+
readonly stateful: true;
|
|
80
|
+
readonly supportsEndpoints: true;
|
|
81
|
+
readonly autoCreate: true;
|
|
82
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
37
83
|
};
|
|
38
84
|
}>;
|
|
39
85
|
export declare class ThermostatFanStateCCAPI extends CCAPI {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cc/ThermostatFanStateCC.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\tValueMetadata,\n\ttype WithAddress,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
4
|
+
"sourcesContent": ["import { type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\tValueMetadata,\n\ttype WithAddress,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tThermostatFanState,\n\tThermostatFanStateCommand,\n} from \"../lib/_Types.js\";\n\nexport const ThermostatFanStateCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Thermostat Fan State\"], {\n\t\t...V.staticPropertyWithName(\n\t\t\t\"fanState\",\n\t\t\t\"state\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatFanState),\n\t\t\t\tlabel: \"Thermostat fan state\",\n\t\t\t} as const,\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Thermostat Fan State\"])\nexport class ThermostatFanStateCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatFanStateCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatFanStateCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatFanStateCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"state\":\n\t\t\t\t\treturn this.get();\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanStateCommand,\n\t\t\tThermostatFanStateCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatFanStateCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanStateCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn response?.state;\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Fan State\"])\n@implementedVersion(2)\n@ccValues(ThermostatFanStateCCValues)\nexport class ThermostatFanStateCC extends CommandClass {\n\tdeclare ccCommand: ThermostatFanStateCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan State\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat fan state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"received current thermostat fan state: \"\n\t\t\t\t\t+ getEnumMemberName(ThermostatFanState, currentStatus),\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanStateCCReportOptions {\n\tstate: ThermostatFanState;\n}\n\n@CCCommand(ThermostatFanStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatFanStateCCValues.fanState)\nexport class ThermostatFanStateCCReport extends ThermostatFanStateCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanStateCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.state = options.state;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanStateCCReport {\n\t\tvalidatePayload(raw.payload.length == 1);\n\t\tconst state: ThermostatFanState = raw.payload[0] & 0b1111;\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstate,\n\t\t});\n\t}\n\n\tpublic readonly state: ThermostatFanState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tstate: getEnumMemberName(ThermostatFanState, this.state),\n\t\t};\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanStateCommand.Get)\n@expectedCCResponse(ThermostatFanStateCCReport)\nexport class ThermostatFanSt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AAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAuD;AAEvD,YAAM,OAAO;AAGb,WAAK,QAAQ,QAAQ;IACtB;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,QAA4B,IAAI,QAAQ,CAAC,IAAI;AAEnD,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEgB;IAET,WAAW,KAAgB;AACjC,YAAM,UAAyB;QAC9B,WAAO,gCAAkB,iCAAoB,KAAK,KAAK;;AAExD,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;IAKY,2BAAuB,MAAA;8BAFnC,yCAAU,uCAA0B,GAAG,OACvC,kDAAmB,0BAA0B,CAAC;;;;oBACF;+CAAA,YAAoB;WAAA;;;;;;;;AAAjE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": ["import_safe"]
|
|
7
7
|
}
|
|
@@ -1,91 +1,240 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type
|
|
1
|
+
import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
|
|
2
|
+
import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, ValueMetadata, type WithAddress } from "@zwave-js/core/safe";
|
|
3
3
|
import { Bytes } from "@zwave-js/shared/safe";
|
|
4
4
|
import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
|
|
5
5
|
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
6
6
|
import { ThermostatMode, ThermostatModeCommand } from "../lib/_Types.js";
|
|
7
7
|
export declare const ThermostatModeCCValues: Readonly<{
|
|
8
8
|
supportedModes: {
|
|
9
|
-
readonly id:
|
|
10
|
-
commandClass: (typeof CommandClasses)["Thermostat Mode"];
|
|
11
|
-
property: "supportedModes";
|
|
12
|
-
};
|
|
9
|
+
readonly id: ValueIDBase;
|
|
13
10
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
14
11
|
readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
|
|
15
12
|
readonly endpoint: number;
|
|
16
13
|
readonly property: "supportedModes";
|
|
17
14
|
};
|
|
18
15
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
19
|
-
readonly meta: {
|
|
16
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
20
17
|
readonly type: "any";
|
|
21
18
|
readonly readable: true;
|
|
22
19
|
readonly writeable: true;
|
|
23
|
-
}
|
|
24
|
-
|
|
20
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
21
|
+
readonly type: "any";
|
|
22
|
+
readonly readable: true;
|
|
23
|
+
readonly writeable: true;
|
|
24
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
25
|
+
readonly type: "any";
|
|
26
|
+
readonly readable: true;
|
|
27
|
+
readonly writeable: true;
|
|
28
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
29
|
+
readonly type: "any";
|
|
30
|
+
readonly readable: true;
|
|
31
|
+
readonly writeable: true;
|
|
32
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
33
|
+
readonly type: "any";
|
|
34
|
+
readonly readable: true;
|
|
35
|
+
readonly writeable: true;
|
|
36
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
37
|
+
readonly type: "any";
|
|
38
|
+
readonly readable: true;
|
|
39
|
+
readonly writeable: true;
|
|
40
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
41
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
42
|
+
readonly internal: false;
|
|
43
|
+
readonly minVersion: 1;
|
|
44
|
+
readonly secret: false;
|
|
25
45
|
readonly stateful: true;
|
|
46
|
+
readonly supportsEndpoints: true;
|
|
47
|
+
readonly autoCreate: true;
|
|
48
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
49
|
+
readonly internal: false;
|
|
50
|
+
readonly minVersion: 1;
|
|
51
|
+
readonly secret: false;
|
|
52
|
+
readonly stateful: true;
|
|
53
|
+
readonly supportsEndpoints: true;
|
|
54
|
+
readonly autoCreate: true;
|
|
55
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
56
|
+
readonly internal: false;
|
|
57
|
+
readonly minVersion: 1;
|
|
26
58
|
readonly secret: false;
|
|
59
|
+
readonly stateful: true;
|
|
60
|
+
readonly supportsEndpoints: true;
|
|
61
|
+
readonly autoCreate: true;
|
|
62
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
63
|
+
readonly internal: false;
|
|
27
64
|
readonly minVersion: 1;
|
|
65
|
+
readonly secret: false;
|
|
66
|
+
readonly stateful: true;
|
|
28
67
|
readonly supportsEndpoints: true;
|
|
29
68
|
readonly autoCreate: true;
|
|
30
|
-
|
|
31
|
-
|
|
69
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
70
|
+
readonly internal: false;
|
|
71
|
+
readonly minVersion: 1;
|
|
72
|
+
readonly secret: false;
|
|
73
|
+
readonly stateful: true;
|
|
74
|
+
readonly supportsEndpoints: true;
|
|
75
|
+
readonly autoCreate: true;
|
|
76
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
77
|
+
readonly internal: false;
|
|
78
|
+
readonly minVersion: 1;
|
|
79
|
+
readonly secret: false;
|
|
80
|
+
readonly stateful: true;
|
|
81
|
+
readonly supportsEndpoints: true;
|
|
82
|
+
readonly autoCreate: true;
|
|
83
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
32
84
|
};
|
|
33
85
|
manufacturerData: {
|
|
34
|
-
readonly id:
|
|
35
|
-
commandClass: (typeof CommandClasses)["Thermostat Mode"];
|
|
36
|
-
property: "manufacturerData";
|
|
37
|
-
};
|
|
86
|
+
readonly id: ValueIDBase;
|
|
38
87
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
39
88
|
readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
|
|
40
89
|
readonly endpoint: number;
|
|
41
90
|
readonly property: "manufacturerData";
|
|
42
91
|
};
|
|
43
92
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
44
|
-
readonly meta: {
|
|
45
|
-
readonly
|
|
46
|
-
readonly writeable: false;
|
|
47
|
-
readonly type: "buffer";
|
|
93
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
94
|
+
readonly type: "any";
|
|
48
95
|
readonly readable: true;
|
|
49
|
-
|
|
50
|
-
|
|
96
|
+
readonly writeable: true;
|
|
97
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
98
|
+
readonly type: "any";
|
|
99
|
+
readonly readable: true;
|
|
100
|
+
readonly writeable: true;
|
|
101
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
102
|
+
readonly type: "any";
|
|
103
|
+
readonly readable: true;
|
|
104
|
+
readonly writeable: true;
|
|
105
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
106
|
+
readonly type: "any";
|
|
107
|
+
readonly readable: true;
|
|
108
|
+
readonly writeable: true;
|
|
109
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
110
|
+
readonly type: "any";
|
|
111
|
+
readonly readable: true;
|
|
112
|
+
readonly writeable: true;
|
|
113
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
114
|
+
readonly type: "any";
|
|
115
|
+
readonly readable: true;
|
|
116
|
+
readonly writeable: true;
|
|
117
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
118
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
51
119
|
readonly internal: false;
|
|
52
120
|
readonly minVersion: 1;
|
|
53
121
|
readonly secret: false;
|
|
54
122
|
readonly stateful: true;
|
|
55
123
|
readonly supportsEndpoints: true;
|
|
56
124
|
readonly autoCreate: true;
|
|
57
|
-
}
|
|
125
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
126
|
+
readonly internal: false;
|
|
127
|
+
readonly minVersion: 1;
|
|
128
|
+
readonly secret: false;
|
|
129
|
+
readonly stateful: true;
|
|
130
|
+
readonly supportsEndpoints: true;
|
|
131
|
+
readonly autoCreate: true;
|
|
132
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
133
|
+
readonly internal: false;
|
|
134
|
+
readonly minVersion: 1;
|
|
135
|
+
readonly secret: false;
|
|
136
|
+
readonly stateful: true;
|
|
137
|
+
readonly supportsEndpoints: true;
|
|
138
|
+
readonly autoCreate: true;
|
|
139
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
140
|
+
readonly internal: false;
|
|
141
|
+
readonly minVersion: 1;
|
|
142
|
+
readonly secret: false;
|
|
143
|
+
readonly stateful: true;
|
|
144
|
+
readonly supportsEndpoints: true;
|
|
145
|
+
readonly autoCreate: true;
|
|
146
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
147
|
+
readonly internal: false;
|
|
148
|
+
readonly minVersion: 1;
|
|
149
|
+
readonly secret: false;
|
|
150
|
+
readonly stateful: true;
|
|
151
|
+
readonly supportsEndpoints: true;
|
|
152
|
+
readonly autoCreate: true;
|
|
153
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
154
|
+
readonly internal: false;
|
|
155
|
+
readonly minVersion: 1;
|
|
156
|
+
readonly secret: false;
|
|
157
|
+
readonly stateful: true;
|
|
158
|
+
readonly supportsEndpoints: true;
|
|
159
|
+
readonly autoCreate: true;
|
|
160
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
58
161
|
};
|
|
59
162
|
thermostatMode: {
|
|
60
|
-
readonly id:
|
|
61
|
-
commandClass: (typeof CommandClasses)["Thermostat Mode"];
|
|
62
|
-
property: "mode";
|
|
63
|
-
};
|
|
163
|
+
readonly id: ValueIDBase;
|
|
64
164
|
readonly endpoint: (endpoint?: number | undefined) => {
|
|
65
165
|
readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
|
|
66
166
|
readonly endpoint: number;
|
|
67
167
|
readonly property: "mode";
|
|
68
168
|
};
|
|
69
169
|
readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
|
|
70
|
-
readonly meta: {
|
|
71
|
-
readonly
|
|
72
|
-
[x: number]: string;
|
|
73
|
-
};
|
|
74
|
-
readonly label: "Thermostat mode";
|
|
75
|
-
readonly min: 0;
|
|
76
|
-
readonly max: 255;
|
|
77
|
-
readonly type: "number";
|
|
170
|
+
readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
171
|
+
readonly type: "any";
|
|
78
172
|
readonly readable: true;
|
|
79
173
|
readonly writeable: true;
|
|
80
|
-
}
|
|
81
|
-
|
|
174
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
175
|
+
readonly type: "any";
|
|
176
|
+
readonly readable: true;
|
|
177
|
+
readonly writeable: true;
|
|
178
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
179
|
+
readonly type: "any";
|
|
180
|
+
readonly readable: true;
|
|
181
|
+
readonly writeable: true;
|
|
182
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
183
|
+
readonly type: "any";
|
|
184
|
+
readonly readable: true;
|
|
185
|
+
readonly writeable: true;
|
|
186
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
|
|
187
|
+
readonly type: "any";
|
|
188
|
+
readonly readable: true;
|
|
189
|
+
readonly writeable: true;
|
|
190
|
+
}> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
|
|
191
|
+
readonly type: "any";
|
|
192
|
+
readonly readable: true;
|
|
193
|
+
readonly writeable: true;
|
|
194
|
+
}>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
|
|
195
|
+
readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
82
196
|
readonly internal: false;
|
|
83
197
|
readonly minVersion: 1;
|
|
84
198
|
readonly secret: false;
|
|
85
199
|
readonly stateful: true;
|
|
86
200
|
readonly supportsEndpoints: true;
|
|
87
201
|
readonly autoCreate: true;
|
|
88
|
-
}
|
|
202
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
203
|
+
readonly internal: false;
|
|
204
|
+
readonly minVersion: 1;
|
|
205
|
+
readonly secret: false;
|
|
206
|
+
readonly stateful: true;
|
|
207
|
+
readonly supportsEndpoints: true;
|
|
208
|
+
readonly autoCreate: true;
|
|
209
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
210
|
+
readonly internal: false;
|
|
211
|
+
readonly minVersion: 1;
|
|
212
|
+
readonly secret: false;
|
|
213
|
+
readonly stateful: true;
|
|
214
|
+
readonly supportsEndpoints: true;
|
|
215
|
+
readonly autoCreate: true;
|
|
216
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
217
|
+
readonly internal: false;
|
|
218
|
+
readonly minVersion: 1;
|
|
219
|
+
readonly secret: false;
|
|
220
|
+
readonly stateful: true;
|
|
221
|
+
readonly supportsEndpoints: true;
|
|
222
|
+
readonly autoCreate: true;
|
|
223
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
|
|
224
|
+
readonly internal: false;
|
|
225
|
+
readonly minVersion: 1;
|
|
226
|
+
readonly secret: false;
|
|
227
|
+
readonly stateful: true;
|
|
228
|
+
readonly supportsEndpoints: true;
|
|
229
|
+
readonly autoCreate: true;
|
|
230
|
+
} : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
|
|
231
|
+
readonly internal: false;
|
|
232
|
+
readonly minVersion: 1;
|
|
233
|
+
readonly secret: false;
|
|
234
|
+
readonly stateful: true;
|
|
235
|
+
readonly supportsEndpoints: true;
|
|
236
|
+
readonly autoCreate: true;
|
|
237
|
+
}, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
|
|
89
238
|
};
|
|
90
239
|
}>;
|
|
91
240
|
export declare class ThermostatModeCCAPI extends CCAPI {
|
|
@@ -113,7 +262,7 @@ export declare class ThermostatModeCCSet extends ThermostatModeCC {
|
|
|
113
262
|
static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSet;
|
|
114
263
|
mode: ThermostatMode;
|
|
115
264
|
manufacturerData?: Uint8Array;
|
|
116
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
265
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
117
266
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
118
267
|
}
|
|
119
268
|
export type ThermostatModeCCReportOptions = {
|
|
@@ -129,7 +278,7 @@ export declare class ThermostatModeCCReport extends ThermostatModeCC {
|
|
|
129
278
|
persistValues(ctx: PersistValuesContext): boolean;
|
|
130
279
|
readonly mode: ThermostatMode;
|
|
131
280
|
readonly manufacturerData: Uint8Array | undefined;
|
|
132
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
281
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
133
282
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
134
283
|
}
|
|
135
284
|
export declare class ThermostatModeCCGet extends ThermostatModeCC {
|
|
@@ -142,7 +291,7 @@ export declare class ThermostatModeCCSupportedReport extends ThermostatModeCC {
|
|
|
142
291
|
static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSupportedReport;
|
|
143
292
|
persistValues(ctx: PersistValuesContext): boolean;
|
|
144
293
|
readonly supportedModes: ThermostatMode[];
|
|
145
|
-
serialize(ctx: CCEncodingContext): Bytes
|
|
294
|
+
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
146
295
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
147
296
|
}
|
|
148
297
|
export declare class ThermostatModeCCSupportedGet extends ThermostatModeCC {
|