@zwave-js/cc 15.21.1 → 15.22.1
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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/AlarmSensorCC.d.ts +3 -3
- 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._validateArgs.d.ts +8 -8
- 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._validateArgs.d.ts +6 -6
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +3 -3
- package/build/cjs/cc/AssociationGroupInfoCC.js +28 -65
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/BarrierOperatorCC.d.ts +3 -3
- package/build/cjs/cc/BarrierOperatorCC.js +30 -67
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC._validateArgs.d.ts +1 -1
- package/build/cjs/cc/BasicCC.d.ts +3 -3
- package/build/cjs/cc/BasicCC.js +17 -54
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.d.ts +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 +3 -3
- package/build/cjs/cc/BatteryCC.js +15 -54
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC._validateArgs.d.ts +3 -3
- 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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/BinarySwitchCC.d.ts +2 -2
- package/build/cjs/cc/BinarySwitchCC.js +17 -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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/CentralSceneCC.d.ts +1 -1
- package/build/cjs/cc/CentralSceneCC.js +19 -58
- package/build/cjs/cc/CentralSceneCC.js.map +1 -1
- package/build/cjs/cc/ClimateControlScheduleCC._validateArgs.d.ts +3 -3
- package/build/cjs/cc/ClimateControlScheduleCC.js +25 -64
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cjs/cc/ClockCC._validateArgs.d.ts +1 -1
- package/build/cjs/cc/ClockCC.d.ts +3 -3
- package/build/cjs/cc/ClockCC.js +15 -54
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/ColorSwitchCC.d.ts +3 -3
- package/build/cjs/cc/ColorSwitchCC.js +26 -65
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC._validateArgs.d.ts +9 -9
- package/build/cjs/cc/ConfigurationCC.d.ts +3 -8
- 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._validateArgs.d.ts +2 -2
- package/build/cjs/cc/DoorLockCC.d.ts +5 -5
- package/build/cjs/cc/DoorLockCC.js +26 -65
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC._validateArgs.d.ts +1 -1
- 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._validateArgs.d.ts +1 -1
- 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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/EntryControlCC.d.ts +3 -3
- package/build/cjs/cc/EntryControlCC.js +25 -64
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +6 -6
- 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._validateArgs.d.ts +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._validateArgs.d.ts +4 -4
- 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._validateArgs.d.ts +9 -9
- 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._validateArgs.d.ts +10 -10
- package/build/cjs/cc/IrrigationCC.d.ts +7 -7
- package/build/cjs/cc/IrrigationCC.js +54 -93
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC._validateArgs.d.ts +1 -1
- package/build/cjs/cc/LanguageCC.d.ts +3 -3
- package/build/cjs/cc/LanguageCC.js +15 -54
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC._validateArgs.d.ts +1 -1
- 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._validateArgs.d.ts +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._validateArgs.d.ts +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +1 -1
- package/build/cjs/cc/ManufacturerSpecificCC.js +16 -55
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cjs/cc/MeterCC._validateArgs.d.ts +5 -5
- package/build/cjs/cc/MeterCC.d.ts +3 -3
- package/build/cjs/cc/MeterCC.js +23 -62
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC._validateArgs.d.ts +5 -5
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +3 -3
- package/build/cjs/cc/MultiChannelAssociationCC.js +26 -65
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/MultiChannelCC.js +34 -73
- package/build/cjs/cc/MultiChannelCC.js.map +1 -1
- package/build/cjs/cc/MultiCommandCC._validateArgs.d.ts +1 -1
- package/build/cjs/cc/MultiCommandCC.js +9 -48
- package/build/cjs/cc/MultiCommandCC.js.map +1 -1
- package/build/cjs/cc/MultilevelSensorCC._validateArgs.d.ts +3 -3
- 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._validateArgs.d.ts +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +3 -3
- package/build/cjs/cc/MultilevelSwitchCC.js +26 -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._validateArgs.d.ts +2 -2
- package/build/cjs/cc/NodeNamingCC.d.ts +2 -2
- package/build/cjs/cc/NodeNamingCC.js +22 -61
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/NotificationCC.d.ts +22 -5
- package/build/cjs/cc/NotificationCC.js +141 -104
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/PowerlevelCC.d.ts +2 -2
- package/build/cjs/cc/PowerlevelCC.js +22 -61
- package/build/cjs/cc/PowerlevelCC.js.map +1 -1
- package/build/cjs/cc/ProtectionCC._validateArgs.d.ts +3 -3
- package/build/cjs/cc/ProtectionCC.d.ts +3 -3
- package/build/cjs/cc/ProtectionCC.js +33 -72
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC._validateArgs.d.ts +1 -1
- package/build/cjs/cc/SceneActivationCC.js +9 -48
- package/build/cjs/cc/SceneActivationCC.js.map +1 -1
- package/build/cjs/cc/SceneActuatorConfigurationCC._validateArgs.d.ts +2 -2
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +14 -53
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cjs/cc/SceneControllerConfigurationCC._validateArgs.d.ts +3 -3
- 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._validateArgs.d.ts +8 -8
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +1 -1
- package/build/cjs/cc/ScheduleEntryLockCC.js +46 -85
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cjs/cc/Security2CC.d.ts +1 -1
- package/build/cjs/cc/Security2CC.js +33 -72
- package/build/cjs/cc/Security2CC.js.map +1 -1
- package/build/cjs/cc/SecurityCC.d.ts +1 -1
- package/build/cjs/cc/SecurityCC.js +27 -66
- package/build/cjs/cc/SecurityCC.js.map +2 -2
- package/build/cjs/cc/SoundSwitchCC._validateArgs.d.ts +3 -3
- package/build/cjs/cc/SoundSwitchCC.d.ts +2 -2
- 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._validateArgs.d.ts +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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/ThermostatModeCC.d.ts +3 -3
- 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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatSetbackCC.js +15 -54
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC._validateArgs.d.ts +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +3 -3
- package/build/cjs/cc/ThermostatSetpointCC.js +25 -64
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/TimeCC.d.ts +1 -1
- package/build/cjs/cc/TimeCC.js +24 -63
- package/build/cjs/cc/TimeCC.js.map +1 -1
- package/build/cjs/cc/TimeParametersCC._validateArgs.d.ts +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._validateArgs.d.ts +6 -6
- package/build/cjs/cc/UserCodeCC.d.ts +7 -5
- package/build/cjs/cc/UserCodeCC.js +89 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC._validateArgs.d.ts +3 -3
- package/build/cjs/cc/VersionCC.d.ts +2 -2
- package/build/cjs/cc/VersionCC.js +25 -64
- package/build/cjs/cc/VersionCC.js.map +1 -1
- package/build/cjs/cc/WakeUpCC._validateArgs.d.ts +1 -1
- package/build/cjs/cc/WakeUpCC.d.ts +1 -1
- package/build/cjs/cc/WakeUpCC.js +21 -60
- package/build/cjs/cc/WakeUpCC.js.map +1 -1
- package/build/cjs/cc/WindowCoveringCC._validateArgs.d.ts +4 -4
- package/build/cjs/cc/WindowCoveringCC.d.ts +3 -3
- package/build/cjs/cc/WindowCoveringCC.js +28 -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._validateArgs.d.ts +1 -1
- package/build/cjs/cc/ZWavePlusCC.d.ts +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 +1173 -1049
- 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._validateArgs.d.ts +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/API.d.ts +1 -0
- package/build/cjs/lib/API.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +6 -2
- package/build/cjs/lib/CommandClass.js +2 -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 +5 -5
- package/build/cjs/lib/Values.js.map +2 -2
- package/build/cjs/lib/_CCAPI.generated.d.ts +64 -64
- package/build/esm/cc/AlarmSensorCC._validateArgs.d.ts +1 -1
- package/build/esm/cc/AlarmSensorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.d.ts +3 -3
- 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.d.ts.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._validateArgs.d.ts +8 -8
- package/build/esm/cc/AssociationCC._validateArgs.d.ts.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._validateArgs.d.ts +6 -6
- package/build/esm/cc/AssociationGroupInfoCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +3 -3
- 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._validateArgs.d.ts +4 -4
- package/build/esm/cc/BarrierOperatorCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +3 -3
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +5 -36
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC._validateArgs.d.ts +1 -1
- package/build/esm/cc/BasicCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +3 -3
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +5 -36
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts +2 -2
- package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.d.ts.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 +3 -3
- 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._validateArgs.d.ts +3 -3
- package/build/esm/cc/BinarySensorCC._validateArgs.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/BinarySwitchCC._validateArgs.d.ts.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 +5 -36
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/CentralSceneCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts +1 -1
- package/build/esm/cc/CentralSceneCC.d.ts.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._validateArgs.d.ts +3 -3
- package/build/esm/cc/ClimateControlScheduleCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/ClockCC._validateArgs.d.ts.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 +3 -36
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC._validateArgs.d.ts +4 -4
- package/build/esm/cc/ColorSwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +3 -3
- 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._validateArgs.d.ts +9 -9
- package/build/esm/cc/ConfigurationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +3 -8
- 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.d.ts.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._validateArgs.d.ts +2 -2
- package/build/esm/cc/DoorLockCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +5 -5
- 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._validateArgs.d.ts +1 -1
- package/build/esm/cc/DoorLockLoggingCC._validateArgs.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/EnergyProductionCC._validateArgs.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/EntryControlCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +3 -3
- 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._validateArgs.d.ts +6 -6
- package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/HumidityControlModeCC._validateArgs.d.ts.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._validateArgs.d.ts +4 -4
- package/build/esm/cc/HumidityControlSetpointCC._validateArgs.d.ts.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.d.ts.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._validateArgs.d.ts +9 -9
- package/build/esm/cc/IndicatorCC._validateArgs.d.ts.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._validateArgs.d.ts +10 -10
- package/build/esm/cc/IrrigationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +7 -7
- 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._validateArgs.d.ts +1 -1
- package/build/esm/cc/LanguageCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +3 -3
- 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._validateArgs.d.ts +1 -1
- package/build/esm/cc/LockCC._validateArgs.d.ts.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._validateArgs.d.ts +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC._validateArgs.d.ts.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._validateArgs.d.ts +2 -2
- package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.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._validateArgs.d.ts +5 -5
- package/build/esm/cc/MeterCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +3 -3
- 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._validateArgs.d.ts +5 -5
- package/build/esm/cc/MultiChannelAssociationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +3 -3
- 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._validateArgs.d.ts +4 -4
- package/build/esm/cc/MultiChannelCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelCC.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/MultiCommandCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultiCommandCC.d.ts.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._validateArgs.d.ts +3 -3
- package/build/esm/cc/MultilevelSensorCC._validateArgs.d.ts.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._validateArgs.d.ts +2 -2
- package/build/esm/cc/MultilevelSwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +3 -3
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +5 -36
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.d.ts.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._validateArgs.d.ts +2 -2
- package/build/esm/cc/NodeNamingCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +2 -2
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +3 -36
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC._validateArgs.d.ts +4 -4
- package/build/esm/cc/NotificationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +22 -5
- 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._validateArgs.d.ts +4 -4
- package/build/esm/cc/PowerlevelCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/PowerlevelCC.d.ts +2 -2
- package/build/esm/cc/PowerlevelCC.d.ts.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._validateArgs.d.ts +3 -3
- package/build/esm/cc/ProtectionCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +3 -3
- 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._validateArgs.d.ts +1 -1
- package/build/esm/cc/SceneActivationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SceneActivationCC.d.ts.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._validateArgs.d.ts +2 -2
- package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.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._validateArgs.d.ts +3 -3
- package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.d.ts.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._validateArgs.d.ts +8 -8
- package/build/esm/cc/ScheduleEntryLockCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.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.d.ts +1 -1
- package/build/esm/cc/Security2CC.d.ts.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.d.ts +1 -1
- package/build/esm/cc/SecurityCC.d.ts.map +1 -1
- package/build/esm/cc/SecurityCC.js +2 -36
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC._validateArgs.d.ts +3 -3
- package/build/esm/cc/SoundSwitchCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/SoundSwitchCC.d.ts +2 -2
- package/build/esm/cc/SoundSwitchCC.d.ts.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.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/ThermostatFanModeCC._validateArgs.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/ThermostatModeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +3 -3
- 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._validateArgs.d.ts +1 -1
- package/build/esm/cc/ThermostatSetbackCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +3 -3
- 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._validateArgs.d.ts +3 -3
- package/build/esm/cc/ThermostatSetpointCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +3 -3
- 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._validateArgs.d.ts +4 -4
- package/build/esm/cc/TimeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/TimeCC.d.ts +1 -1
- package/build/esm/cc/TimeCC.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/TimeParametersCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/TimeParametersCC.d.ts.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.d.ts.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._validateArgs.d.ts +6 -6
- package/build/esm/cc/UserCodeCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +7 -5
- 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._validateArgs.d.ts +3 -3
- package/build/esm/cc/VersionCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/VersionCC.d.ts +2 -2
- package/build/esm/cc/VersionCC.d.ts.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._validateArgs.d.ts +1 -1
- package/build/esm/cc/WakeUpCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/WakeUpCC.d.ts +1 -1
- package/build/esm/cc/WakeUpCC.d.ts.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._validateArgs.d.ts +4 -4
- package/build/esm/cc/WindowCoveringCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +3 -3
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +5 -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._validateArgs.d.ts +1 -1
- package/build/esm/cc/ZWavePlusCC._validateArgs.d.ts.map +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts +1 -1
- package/build/esm/cc/ZWavePlusCC.d.ts.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.d.ts.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 +1173 -1049
- 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._validateArgs.d.ts +2 -2
- package/build/esm/cc/manufacturerProprietary/FibaroCC._validateArgs.d.ts.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/API.d.ts +1 -0
- package/build/esm/lib/API.d.ts.map +1 -1
- package/build/esm/lib/API.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 +4 -2
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/Security2/Extension.d.ts.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 +5 -5
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/build/esm/lib/Values.js +4 -1
- package/build/esm/lib/Values.js.map +1 -1
- package/build/esm/lib/_CCAPI.generated.d.ts +64 -64
- package/build/esm/lib/_CCAPI.generated.d.ts.map +1 -1
- package/build/esm/lib/serializers.js.map +1 -1
- package/package.json +17 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/BasicCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./BasicCC._validateArgs.js\";\nconst { validateArgs_BasicCCAPI_set } = __validateArgs;\nimport type { GetDeviceConfig } from \"@zwave-js/config\";\nimport { CommandClasses, type ControlsCC, Duration, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type NodeId, type SupervisionResult, type SupportsCC, type ValueID, ValueMetadata, type WithAddress, maybeUnknownToString, parseMaybeNumber, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, SET_VALUE_HOOKS, type SetValueImplementation, type SetValueImplementationHooksFactory, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, getEffectiveCCVersion, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BasicCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { BasicCCValues } from \"./_CCValues.generated.js\";\nexport { BasicCCValues };\n@API(CommandClasses.Basic)\nexport class BasicCCAPI extends CCAPI {\n public supportsCommand(cmd: BasicCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case BasicCommand.Get:\n return this.isSinglecast();\n case BasicCommand.Set:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: BasicCCAPI, { property }, value) {\n // Enable restoring the previous non-zero value\n if (property === \"restorePrevious\") {\n property = \"targetValue\";\n value = 255;\n }\n if (property !== \"targetValue\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n return this.set(value);\n };\n }\n protected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = ({ property }, value, _options) => {\n // Enable restoring the previous non-zero value\n if (property === \"restorePrevious\") {\n property = \"targetValue\";\n value = 255;\n }\n if (property === \"targetValue\") {\n const currentValueValueId = BasicCCValues.currentValue.endpoint(this.endpoint.index);\n return {\n optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {\n // Only update currentValue for valid target values\n if (typeof value === \"number\"\n && value >= 0\n && value <= 99) {\n if (this.isSinglecast()) {\n this.tryGetValueDB()?.setValue(currentValueValueId, value);\n }\n else if (this.isMulticast()) {\n // Figure out which nodes were affected by this command\n const affectedNodes = this.endpoint.node\n .physicalNodes.filter((node) => node\n .getEndpoint(this.endpoint.index)\n ?.supportsCC(this.ccId));\n // and optimistically update the currentValue\n for (const node of affectedNodes) {\n this.host\n .tryGetValueDB(node.id)\n ?.setValue(currentValueValueId, value);\n }\n }\n }\n },\n forceVerifyChanges: () => {\n // If we don't know the actual value, we need to verify the change, regardless of the supervision result\n return value === 255;\n },\n verifyChanges: () => {\n if (this.isSinglecast()\n // We generally don't want to poll for multicasts because of how much traffic it can cause\n // However, when setting the value 255 (ON), we don't know the actual state\n || (this.isMulticast() && value === 255)) {\n // We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll\n (this as this).schedulePoll(currentValueValueId, value === 255 ? undefined : value);\n }\n },\n };\n }\n };\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: BasicCCAPI, { property }) {\n switch (property) {\n case \"currentValue\":\n case \"targetValue\":\n case \"duration\":\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(BasicCommand, BasicCommand.Get);\n const cc = new BasicCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BasicCCReport>(cc, this.commandOptions);\n if (response) {\n this.tryGetValueDB()?.setValue(BasicCCValues.currentValue.endpoint(this.endpoint.index), response.currentValue);\n return pick(response, [\"currentValue\", \"targetValue\", \"duration\"]);\n }\n }\n @validateArgs_BasicCCAPI_set()\n public async set(targetValue: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(BasicCommand, BasicCommand.Set);\n const cc = new BasicCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n targetValue,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Basic)\n@implementedVersion(2) // Update tests in CommandClass.test.ts when changing this\n@ccValues(BasicCCValues)\nexport class BasicCC extends CommandClass {\n declare ccCommand: BasicCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Assume that the endpoint supports Basic CC, so the values get persisted correctly.\n endpoint.addCC(CommandClasses.Basic, { isSupported: true });\n // try to query the current state\n await this.refreshValues(ctx);\n // Remove Basic CC support again when there was no response\n if (this.getValue(ctx, BasicCCValues.currentValue) == undefined) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"No response to Basic Get command, assuming Basic CC is unsupported...\",\n });\n // SDS14223: A controlling node MUST conclude that the Basic Command Class is not supported by a node (or\n // endpoint) if no Basic Report is returned.\n endpoint.addCC(CommandClasses.Basic, { isSupported: false });\n if (!endpoint.controlsCC(CommandClasses.Basic)) {\n endpoint.removeCC(CommandClasses.Basic);\n }\n }\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.Basic, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n // try to query the current state\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying Basic CC state...\",\n direction: \"outbound\",\n });\n const basicResponse = await api.get();\n if (basicResponse) {\n let logMessage = `received Basic CC state:\ncurrent value: ${basicResponse.currentValue}`;\n if (basicResponse.targetValue != undefined) {\n logMessage += `\ntarget value: ${basicResponse.targetValue}\nremaining duration: ${basicResponse.duration?.toString() ?? \"undefined\"}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n public override getDefinedValueIDs(ctx: GetValueDB & GetSupportedCCVersion & GetDeviceConfig & GetNode<NodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>>): ValueID[] {\n const ret: ValueID[] = [];\n const endpoint = this.getEndpoint(ctx)!;\n const compat = ctx.getDeviceConfig?.(endpoint.nodeId)?.compat;\n if (compat?.mapBasicSet === \"event\") {\n // Add the compat event value if it should be exposed\n ret.push(BasicCCValues.compatEvent.endpoint(endpoint.index));\n }\n if (endpoint.supportsCC(this.ccId)) {\n // Defer to the base implementation if Basic CC is supported.\n // This implies that no other actuator CC is supported.\n ret.push(...super.getDefinedValueIDs(ctx));\n }\n else if (endpoint.controlsCC(CommandClasses.Basic)) {\n // During the interview, we mark Basic CC as controlled only if we want to expose currentValue\n ret.push(BasicCCValues.currentValue.endpoint(endpoint.index));\n }\n return ret;\n }\n}\n// @publicAPI\nexport interface BasicCCSetOptions {\n targetValue: number;\n}\n@CCCommand(BasicCommand.Set)\n@useSupervision()\nexport class BasicCCSet extends BasicCC {\n public constructor(options: WithAddress<BasicCCSetOptions>) {\n super(options);\n this.targetValue = options.targetValue;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BasicCCSet {\n validatePayload(raw.payload.length >= 1);\n const targetValue = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n targetValue,\n });\n }\n public targetValue: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.targetValue]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"target value\": this.targetValue },\n };\n }\n}\n// @publicAPI\nexport interface BasicCCReportOptions {\n currentValue?: MaybeUnknown<number>;\n targetValue?: MaybeUnknown<number>;\n duration?: Duration;\n}\n@CCCommand(BasicCommand.Report)\n@ccValueProperty(\"currentValue\", BasicCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BasicCCValues.targetValue)\n@ccValueProperty(\"duration\", BasicCCValues.duration)\nexport class BasicCCReport extends BasicCC {\n // @noCCValues See comment in the constructor\n public constructor(options: WithAddress<BasicCCReportOptions>) {\n super(options);\n this.currentValue = options.currentValue;\n this.targetValue = options.targetValue;\n this.duration = options.duration;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BasicCCReport {\n validatePayload(raw.payload.length >= 1);\n const currentValue: MaybeUnknown<number> | undefined = \n // 0xff is a legacy value for 100% (99)\n raw.payload[0] === 0xff\n ? 99\n : parseMaybeNumber(raw.payload[0]);\n validatePayload(currentValue !== undefined);\n let targetValue: MaybeUnknown<number> | undefined;\n let duration: Duration | undefined;\n if (raw.payload.length >= 3) {\n targetValue = parseMaybeNumber(raw.payload[1]);\n duration = Duration.parseReport(raw.payload[2]);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n currentValue,\n targetValue,\n duration,\n });\n }\n public currentValue: MaybeUnknown<number> | undefined;\n public readonly targetValue: MaybeUnknown<number> | undefined;\n public readonly duration: Duration | undefined;\n public persistValues(ctx: PersistValuesContext): boolean {\n // Basic CC Report persists its values itself, since there are some\n // specific rules when which value may be persisted.\n // These rules are essentially encoded in the getDefinedValueIDs overload,\n // so we simply reuse that here.\n // Figure out which values may be persisted.\n const definedValueIDs = this.getDefinedValueIDs(ctx);\n const shouldPersistCurrentValue = definedValueIDs.some((vid) => BasicCCValues.currentValue.is(vid));\n const shouldPersistTargetValue = definedValueIDs.some((vid) => BasicCCValues.targetValue.is(vid));\n const shouldPersistDuration = definedValueIDs.some((vid) => BasicCCValues.duration.is(vid));\n if (this.currentValue !== undefined && shouldPersistCurrentValue) {\n this.setValue(ctx, BasicCCValues.currentValue, this.currentValue);\n }\n if (this.targetValue !== undefined && shouldPersistTargetValue) {\n this.setValue(ctx, BasicCCValues.targetValue, this.targetValue);\n }\n if (this.duration !== undefined && shouldPersistDuration) {\n this.setValue(ctx, BasicCCValues.duration, this.duration);\n }\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.currentValue ?? 0xfe,\n this.targetValue ?? 0xfe,\n (this.duration ?? Duration.unknown()).serializeReport(),\n ]);\n const ccVersion = getEffectiveCCVersion(ctx, this);\n if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId as number)?.compat?.encodeCCsUsingTargetVersion) {\n // When forcing CC version 1, only send the current value\n this.payload = this.payload.subarray(0, 1);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"current value\": maybeUnknownToString(this.currentValue),\n };\n if (this.targetValue !== undefined) {\n message[\"target value\"] = maybeUnknownToString(this.targetValue);\n }\n if (this.duration != undefined) {\n message.duration = this.duration.toString();\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(BasicCommand.Get)\n@expectedCCResponse(BasicCCReport)\nexport class BasicCCGet extends BasicCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./BasicCC._validateArgs.js\";\nconst { validateArgs_BasicCCAPI_set } = __validateArgs;\nimport type { GetDeviceConfig } from \"@zwave-js/config\";\nimport { CommandClasses, type ControlsCC, Duration, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type NodeId, type SupervisionResult, type SupportsCC, type ValueID, ValueMetadata, type WithAddress, maybeUnknownToString, parseMaybeNumber, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, SET_VALUE_HOOKS, type SetValueImplementation, type SetValueImplementationHooksFactory, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, getEffectiveCCVersion, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BasicCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { BasicCCValues } from \"./_CCValues.generated.js\";\nexport { BasicCCValues };\n@API(CommandClasses.Basic)\nexport class BasicCCAPI extends CCAPI {\n public supportsCommand(cmd: BasicCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case BasicCommand.Get:\n return this.isSinglecast();\n case BasicCommand.Set:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: BasicCCAPI, { property }, value) {\n // Enable restoring the previous non-zero value\n if (property === \"restorePrevious\") {\n property = \"targetValue\";\n value = 255;\n }\n if (property !== \"targetValue\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n return this.set(value);\n };\n }\n protected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = ({ property }, value, _options) => {\n // Enable restoring the previous non-zero value\n if (property === \"restorePrevious\") {\n property = \"targetValue\";\n value = 255;\n }\n if (property === \"targetValue\") {\n const currentValueValueId = BasicCCValues.currentValue.endpoint(this.endpoint.index);\n return {\n // This is the target value for a split target/current state pair.\n isSplitStateTargetValue: true,\n optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {\n // Only update currentValue for valid target values\n if (typeof value === \"number\"\n && value >= 0\n && value <= 99) {\n if (this.isSinglecast()) {\n this.tryGetValueDB()?.setValue(currentValueValueId, value);\n }\n else if (this.isMulticast()) {\n // Figure out which nodes were affected by this command\n const affectedNodes = this.endpoint.node\n .physicalNodes.filter((node) => node\n .getEndpoint(this.endpoint.index)\n ?.supportsCC(this.ccId));\n // and optimistically update the currentValue\n for (const node of affectedNodes) {\n this.host\n .tryGetValueDB(node.id)\n ?.setValue(currentValueValueId, value);\n }\n }\n }\n },\n forceVerifyChanges: () => {\n // If we don't know the actual value, we need to verify the change, regardless of the supervision result\n return value === 255;\n },\n verifyChanges: () => {\n if (this.isSinglecast()\n // We generally don't want to poll for multicasts because of how much traffic it can cause\n // However, when setting the value 255 (ON), we don't know the actual state\n || (this.isMulticast() && value === 255)) {\n // We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll\n (this as this).schedulePoll(currentValueValueId, value === 255 ? undefined : value);\n }\n },\n };\n }\n };\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: BasicCCAPI, { property }) {\n switch (property) {\n case \"currentValue\":\n case \"targetValue\":\n case \"duration\":\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(BasicCommand, BasicCommand.Get);\n const cc = new BasicCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BasicCCReport>(cc, this.commandOptions);\n if (response) {\n this.tryGetValueDB()?.setValue(BasicCCValues.currentValue.endpoint(this.endpoint.index), response.currentValue);\n return pick(response, [\"currentValue\", \"targetValue\", \"duration\"]);\n }\n }\n @validateArgs_BasicCCAPI_set()\n public async set(targetValue: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(BasicCommand, BasicCommand.Set);\n const cc = new BasicCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n targetValue,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Basic)\n@implementedVersion(2) // Update tests in CommandClass.test.ts when changing this\n@ccValues(BasicCCValues)\nexport class BasicCC extends CommandClass {\n declare ccCommand: BasicCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Assume that the endpoint supports Basic CC, so the values get persisted correctly.\n endpoint.addCC(CommandClasses.Basic, { isSupported: true });\n // try to query the current state\n await this.refreshValues(ctx);\n // Remove Basic CC support again when there was no response\n if (this.getValue(ctx, BasicCCValues.currentValue) == undefined) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"No response to Basic Get command, assuming Basic CC is unsupported...\",\n });\n // SDS14223: A controlling node MUST conclude that the Basic Command Class is not supported by a node (or\n // endpoint) if no Basic Report is returned.\n endpoint.addCC(CommandClasses.Basic, { isSupported: false });\n if (!endpoint.controlsCC(CommandClasses.Basic)) {\n endpoint.removeCC(CommandClasses.Basic);\n }\n }\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.Basic, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n // try to query the current state\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying Basic CC state...\",\n direction: \"outbound\",\n });\n const basicResponse = await api.get();\n if (basicResponse) {\n let logMessage = `received Basic CC state:\ncurrent value: ${basicResponse.currentValue}`;\n if (basicResponse.targetValue != undefined) {\n logMessage += `\ntarget value: ${basicResponse.targetValue}\nremaining duration: ${basicResponse.duration?.toString() ?? \"undefined\"}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n public override getDefinedValueIDs(ctx: GetValueDB & GetSupportedCCVersion & GetDeviceConfig & GetNode<NodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>>): ValueID[] {\n const ret: ValueID[] = [];\n const endpoint = this.getEndpoint(ctx)!;\n const compat = ctx.getDeviceConfig?.(endpoint.nodeId)?.compat;\n if (compat?.mapBasicSet === \"event\") {\n // Add the compat event value if it should be exposed\n ret.push(BasicCCValues.compatEvent.endpoint(endpoint.index));\n }\n if (endpoint.supportsCC(this.ccId)) {\n // Defer to the base implementation if Basic CC is supported.\n // This implies that no other actuator CC is supported.\n ret.push(...super.getDefinedValueIDs(ctx));\n }\n else if (endpoint.controlsCC(CommandClasses.Basic)) {\n // During the interview, we mark Basic CC as controlled only if we want to expose currentValue\n ret.push(BasicCCValues.currentValue.endpoint(endpoint.index));\n }\n return ret;\n }\n}\n// @publicAPI\nexport interface BasicCCSetOptions {\n targetValue: number;\n}\n@CCCommand(BasicCommand.Set)\n@useSupervision()\nexport class BasicCCSet extends BasicCC {\n public constructor(options: WithAddress<BasicCCSetOptions>) {\n super(options);\n this.targetValue = options.targetValue;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BasicCCSet {\n validatePayload(raw.payload.length >= 1);\n const targetValue = raw.payload[0];\n return new this({\n nodeId: ctx.sourceNodeId,\n targetValue,\n });\n }\n public targetValue: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.targetValue]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"target value\": this.targetValue },\n };\n }\n}\n// @publicAPI\nexport interface BasicCCReportOptions {\n currentValue?: MaybeUnknown<number>;\n targetValue?: MaybeUnknown<number>;\n duration?: Duration;\n}\n@CCCommand(BasicCommand.Report)\n@ccValueProperty(\"currentValue\", BasicCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BasicCCValues.targetValue)\n@ccValueProperty(\"duration\", BasicCCValues.duration)\nexport class BasicCCReport extends BasicCC {\n // @noCCValues See comment in the constructor\n public constructor(options: WithAddress<BasicCCReportOptions>) {\n super(options);\n this.currentValue = options.currentValue;\n this.targetValue = options.targetValue;\n this.duration = options.duration;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BasicCCReport {\n validatePayload(raw.payload.length >= 1);\n const currentValue: MaybeUnknown<number> | undefined = \n // 0xff is a legacy value for 100% (99)\n raw.payload[0] === 0xff\n ? 99\n : parseMaybeNumber(raw.payload[0]);\n validatePayload(currentValue !== undefined);\n let targetValue: MaybeUnknown<number> | undefined;\n let duration: Duration | undefined;\n if (raw.payload.length >= 3) {\n targetValue = parseMaybeNumber(raw.payload[1]);\n duration = Duration.parseReport(raw.payload[2]);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n currentValue,\n targetValue,\n duration,\n });\n }\n public currentValue: MaybeUnknown<number> | undefined;\n public readonly targetValue: MaybeUnknown<number> | undefined;\n public readonly duration: Duration | undefined;\n public persistValues(ctx: PersistValuesContext): boolean {\n // Basic CC Report persists its values itself, since there are some\n // specific rules when which value may be persisted.\n // These rules are essentially encoded in the getDefinedValueIDs overload,\n // so we simply reuse that here.\n // Figure out which values may be persisted.\n const definedValueIDs = this.getDefinedValueIDs(ctx);\n const shouldPersistCurrentValue = definedValueIDs.some((vid) => BasicCCValues.currentValue.is(vid));\n const shouldPersistTargetValue = definedValueIDs.some((vid) => BasicCCValues.targetValue.is(vid));\n const shouldPersistDuration = definedValueIDs.some((vid) => BasicCCValues.duration.is(vid));\n if (this.currentValue !== undefined && shouldPersistCurrentValue) {\n this.setValue(ctx, BasicCCValues.currentValue, this.currentValue);\n }\n if (this.targetValue !== undefined && shouldPersistTargetValue) {\n this.setValue(ctx, BasicCCValues.targetValue, this.targetValue);\n }\n if (this.duration !== undefined && shouldPersistDuration) {\n this.setValue(ctx, BasicCCValues.duration, this.duration);\n }\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.currentValue ?? 0xfe,\n this.targetValue ?? 0xfe,\n (this.duration ?? Duration.unknown()).serializeReport(),\n ]);\n const ccVersion = getEffectiveCCVersion(ctx, this);\n if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId as number)?.compat?.encodeCCsUsingTargetVersion) {\n // When forcing CC version 1, only send the current value\n this.payload = this.payload.subarray(0, 1);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"current value\": maybeUnknownToString(this.currentValue),\n };\n if (this.targetValue !== undefined) {\n message[\"target value\"] = maybeUnknownToString(this.targetValue);\n }\n if (this.duration != undefined) {\n message.duration = this.duration.toString();\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(BasicCommand.Get)\n@expectedCCResponse(BasicCCReport)\nexport class BasicCCGet extends BasicCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAGhC,kBAA6Z;AAC7Z,oBAA4B;AAC5B,iBAAkN;AAClN,0BAA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AAQ,cAAc,QAAI,kCAAqB,KAAK,WAAW;MACnE;AACA,UAAI,KAAK,YAAY,QAAW;AAC5B,gBAAQ,WAAW,KAAK,SAAS,SAAQ;MAC7C;AACA,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB;;IAER;;;;IAIS,cAAU,MAAA;8BAFtB,yCAAU,0BAAa,GAAG,OAC1B,kDAAmB,aAAa,CAAC;;;;oBACF;kCAAA,YAAO;WAAA;;;;;;;;AAAvC,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,3 +1,3 @@
|
|
|
1
|
-
export declare function validateArgs_BasicWindowCoveringCCAPI_startLevelChange(): <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext) =>
|
|
2
|
-
export declare function validateArgs_BasicWindowCoveringCCAPI_stopLevelChange(): <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext) =>
|
|
1
|
+
export declare function validateArgs_BasicWindowCoveringCCAPI_startLevelChange(): <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext<unknown, (this: unknown, ...args: any) => any>) => void | T;
|
|
2
|
+
export declare function validateArgs_BasicWindowCoveringCCAPI_stopLevelChange(): <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext<unknown, (this: unknown, ...args: any) => any>) => void | T;
|
|
3
3
|
//# sourceMappingURL=BasicWindowCoveringCC._validateArgs.d.ts.map
|
|
@@ -36,6 +36,7 @@ __export(BasicWindowCoveringCC_exports, {
|
|
|
36
36
|
BasicWindowCoveringCCValues: () => import_CCValues_generated.BasicWindowCoveringCCValues
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(BasicWindowCoveringCC_exports);
|
|
39
|
+
var import_tslib = require("tslib");
|
|
39
40
|
var __validateArgs = __toESM(require("./BasicWindowCoveringCC._validateArgs.js"), 1);
|
|
40
41
|
var import_core = require("@zwave-js/core");
|
|
41
42
|
var import_shared = require("@zwave-js/shared");
|
|
@@ -44,46 +45,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
44
45
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
45
46
|
var import_Types = require("../lib/_Types.js");
|
|
46
47
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
47
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
48
|
-
var useValue = arguments.length > 2;
|
|
49
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
50
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
51
|
-
}
|
|
52
|
-
return useValue ? value : void 0;
|
|
53
|
-
};
|
|
54
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
55
|
-
function accept(f) {
|
|
56
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
57
|
-
return f;
|
|
58
|
-
}
|
|
59
|
-
__name(accept, "accept");
|
|
60
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
61
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
62
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
63
|
-
var _, done = false;
|
|
64
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
65
|
-
var context = {};
|
|
66
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
67
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
68
|
-
context.addInitializer = function(f) {
|
|
69
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
70
|
-
extraInitializers.push(accept(f || null));
|
|
71
|
-
};
|
|
72
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
73
|
-
if (kind === "accessor") {
|
|
74
|
-
if (result === void 0) continue;
|
|
75
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
76
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
77
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
78
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
79
|
-
} else if (_ = accept(result)) {
|
|
80
|
-
if (kind === "field") initializers.unshift(_);
|
|
81
|
-
else descriptor[key] = _;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
85
|
-
done = true;
|
|
86
|
-
};
|
|
87
48
|
const { validateArgs_BasicWindowCoveringCCAPI_startLevelChange, validateArgs_BasicWindowCoveringCCAPI_stopLevelChange } = __validateArgs;
|
|
88
49
|
let BasicWindowCoveringCCAPI = (() => {
|
|
89
50
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Basic Window Covering"])];
|
|
@@ -105,12 +66,12 @@ let BasicWindowCoveringCCAPI = (() => {
|
|
|
105
66
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
106
67
|
_startLevelChange_decorators = [validateArgs_BasicWindowCoveringCCAPI_startLevelChange()];
|
|
107
68
|
_stopLevelChange_decorators = [validateArgs_BasicWindowCoveringCCAPI_stopLevelChange()];
|
|
108
|
-
__esDecorate(this, null, _startLevelChange_decorators, { kind: "method", name: "startLevelChange", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "startLevelChange" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.startLevelChange, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
109
|
-
__esDecorate(this, null, _stopLevelChange_decorators, { kind: "method", name: "stopLevelChange", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "stopLevelChange" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.stopLevelChange, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
110
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
69
|
+
(0, import_tslib.__esDecorate)(this, null, _startLevelChange_decorators, { kind: "method", name: "startLevelChange", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "startLevelChange" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.startLevelChange, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
70
|
+
(0, import_tslib.__esDecorate)(this, null, _stopLevelChange_decorators, { kind: "method", name: "stopLevelChange", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "stopLevelChange" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.stopLevelChange, "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
|
BasicWindowCoveringCCAPI2 = _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) {
|
|
@@ -160,7 +121,7 @@ let BasicWindowCoveringCCAPI = (() => {
|
|
|
160
121
|
}
|
|
161
122
|
constructor() {
|
|
162
123
|
super(...arguments);
|
|
163
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
124
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
164
125
|
}
|
|
165
126
|
};
|
|
166
127
|
return BasicWindowCoveringCCAPI2 = _classThis;
|
|
@@ -180,10 +141,10 @@ let BasicWindowCoveringCC = (() => {
|
|
|
180
141
|
}
|
|
181
142
|
static {
|
|
182
143
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
183
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
144
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
184
145
|
BasicWindowCoveringCC2 = _classThis = _classDescriptor.value;
|
|
185
146
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
186
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
147
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
187
148
|
}
|
|
188
149
|
};
|
|
189
150
|
return BasicWindowCoveringCC2 = _classThis;
|
|
@@ -203,10 +164,10 @@ let BasicWindowCoveringCCStartLevelChange = (() => {
|
|
|
203
164
|
}
|
|
204
165
|
static {
|
|
205
166
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
206
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
167
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
207
168
|
BasicWindowCoveringCCStartLevelChange2 = _classThis = _classDescriptor.value;
|
|
208
169
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
209
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
170
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
210
171
|
}
|
|
211
172
|
constructor(options) {
|
|
212
173
|
super(options);
|
|
@@ -253,10 +214,10 @@ let BasicWindowCoveringCCStopLevelChange = (() => {
|
|
|
253
214
|
}
|
|
254
215
|
static {
|
|
255
216
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
256
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
217
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
257
218
|
BasicWindowCoveringCCStopLevelChange2 = _classThis = _classDescriptor.value;
|
|
258
219
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
259
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
220
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
260
221
|
}
|
|
261
222
|
};
|
|
262
223
|
return BasicWindowCoveringCCStopLevelChange2 = _classThis;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/BasicWindowCoveringCC.ts"],
|
|
4
4
|
"sourcesContent": ["import * as __validateArgs from \"./BasicWindowCoveringCC._validateArgs.js\";\nconst { validateArgs_BasicWindowCoveringCCAPI_startLevelChange, validateArgs_BasicWindowCoveringCCAPI_stopLevelChange } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, ValueMetadata, type WithAddress, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { CCAPI, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValues, commandClass, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BasicWindowCoveringCommand, type LevelChangeDirection, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { BasicWindowCoveringCCValues } from \"./_CCValues.generated.js\";\nexport { BasicWindowCoveringCCValues };\n@API(CommandClasses[\"Basic Window Covering\"])\nexport class BasicWindowCoveringCCAPI extends CCAPI {\n public supportsCommand(cmd: BasicWindowCoveringCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case BasicWindowCoveringCommand.StartLevelChange:\n case BasicWindowCoveringCommand.StopLevelChange:\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: BasicWindowCoveringCCAPI, { property }, value) {\n const valueId = {\n commandClass: this.ccId,\n property,\n };\n if (BasicWindowCoveringCCValues.levelChangeUp.is(valueId)\n || BasicWindowCoveringCCValues.levelChangeDown.is(valueId)) {\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n if (value) {\n const direction = BasicWindowCoveringCCValues.levelChangeUp\n .is(valueId)\n ? \"up\"\n : \"down\";\n return this.startLevelChange(direction);\n }\n else {\n return this.stopLevelChange();\n }\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_BasicWindowCoveringCCAPI_startLevelChange()\n public async startLevelChange(direction: keyof typeof LevelChangeDirection): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(BasicWindowCoveringCommand, BasicWindowCoveringCommand.StartLevelChange);\n const cc = new BasicWindowCoveringCCStartLevelChange({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n direction,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_BasicWindowCoveringCCAPI_stopLevelChange()\n public async stopLevelChange(): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(BasicWindowCoveringCommand, BasicWindowCoveringCommand.StopLevelChange);\n const cc = new BasicWindowCoveringCCStopLevelChange({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Basic Window Covering\"])\n@implementedVersion(1)\n@ccValues(BasicWindowCoveringCCValues)\nexport class BasicWindowCoveringCC extends CommandClass {\n declare ccCommand: BasicWindowCoveringCommand;\n}\n// @publicAPI\nexport interface BasicWindowCoveringCCStartLevelChangeOptions {\n direction: keyof typeof LevelChangeDirection;\n}\n@CCCommand(BasicWindowCoveringCommand.StartLevelChange)\n@useSupervision()\nexport class BasicWindowCoveringCCStartLevelChange extends BasicWindowCoveringCC {\n public constructor(options: WithAddress<BasicWindowCoveringCCStartLevelChangeOptions>) {\n super(options);\n this.direction = options.direction;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BasicWindowCoveringCCStartLevelChange {\n // The CC is obsolete and will never be extended. Check for exact length\n validatePayload(raw.payload.length === 1);\n const direction = !!(raw.payload[0] & 64)\n ? \"down\"\n : \"up\";\n return new this({\n nodeId: ctx.sourceNodeId,\n direction,\n });\n }\n public direction: keyof typeof LevelChangeDirection;\n public async serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.direction === \"down\" ? 64 : 0,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n direction: this.direction,\n },\n };\n }\n}\n@CCCommand(BasicWindowCoveringCommand.StopLevelChange)\n@useSupervision()\nexport class BasicWindowCoveringCCStopLevelChange extends BasicWindowCoveringCC {\n}\n"],
|
|
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;AAAhF,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAkE;AACjF,YAAM,OAAO;AACb,WAAK,YAAY,QAAQ;IAC7B;IACO,OAAO,KAAK,KAAY,KAAqB;AAEhD,uCAAgB,IAAI,QAAQ,WAAW,CAAC;AACxC,YAAM,YAAY,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,MAChC,SACA;AACN,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;OACH;IACL;IACO;IACA,MAAM,UAAU,KAAsB;AACzC,WAAK,UAAU,oBAAM,KAAK;QACtB,KAAK,cAAc,SAAS,KAAK;OACpC;AACD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,WAAW,KAAK;;;IAG5B;;;;IAIS,wCAAoC,MAAA;8BAFhD,yCAAU,wCAA2B,eAAe,OACpD,8CAAc,CAAE;;;;oBACyC;4DAAA,YAAqB;WAAA;;;;;;;;AAA/E,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
|
}
|
|
@@ -2,7 +2,7 @@ import type { GetDeviceConfig } from "@zwave-js/config";
|
|
|
2
2
|
import { type ControlsCC, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type NodeId, type SinglecastCC, type SupportsCC, type WithAddress } from "@zwave-js/core";
|
|
3
3
|
import { type AllOrNone, Bytes } from "@zwave-js/shared";
|
|
4
4
|
import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation } from "../lib/API.js";
|
|
5
|
-
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
5
|
+
import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
6
6
|
import { BatteryChargingStatus, BatteryCommand, BatteryReplacementStatus } from "../lib/_Types.js";
|
|
7
7
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
8
8
|
import { BatteryCCValues } from "./_CCValues.generated.js";
|
|
@@ -10,13 +10,13 @@ export { BatteryCCValues };
|
|
|
10
10
|
export declare class BatteryCCAPI extends PhysicalCCAPI {
|
|
11
11
|
supportsCommand(cmd: BatteryCommand): MaybeNotKnown<boolean>;
|
|
12
12
|
protected get [POLL_VALUE](): PollValueImplementation;
|
|
13
|
-
get(): Promise<Pick<BatteryCCReport, "
|
|
13
|
+
get(): Promise<Pick<BatteryCCReport, "backup" | "chargingStatus" | "disconnected" | "level" | "lowFluid" | "lowTemperatureStatus" | "overheating" | "rechargeOrReplace" | "rechargeable"> | undefined>;
|
|
14
14
|
getHealth(): Promise<Pick<BatteryCCHealthReport, "maximumCapacity" | "temperature"> | undefined>;
|
|
15
15
|
}
|
|
16
16
|
export declare class BatteryCC extends CommandClass {
|
|
17
17
|
ccCommand: BatteryCommand;
|
|
18
18
|
interview(ctx: InterviewContext): Promise<void>;
|
|
19
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
19
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
20
20
|
shouldRefreshValues(this: SinglecastCC<this>, ctx: GetValueDB & GetSupportedCCVersion & GetDeviceConfig & GetNode<NodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>>): boolean;
|
|
21
21
|
}
|
|
22
22
|
export type BatteryCCReportOptions = {
|
|
@@ -28,6 +28,7 @@ __export(BatteryCC_exports, {
|
|
|
28
28
|
BatteryCCValues: () => import_CCValues_generated.BatteryCCValues
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(BatteryCC_exports);
|
|
31
|
+
var import_tslib = require("tslib");
|
|
31
32
|
var import_core = require("@zwave-js/core");
|
|
32
33
|
var import_shared = require("@zwave-js/shared");
|
|
33
34
|
var import_API = require("../lib/API.js");
|
|
@@ -36,46 +37,6 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
|
36
37
|
var import_Types = require("../lib/_Types.js");
|
|
37
38
|
var import_NotificationCC = require("./NotificationCC.js");
|
|
38
39
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
39
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
40
|
-
function accept(f) {
|
|
41
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
42
|
-
return f;
|
|
43
|
-
}
|
|
44
|
-
__name(accept, "accept");
|
|
45
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
46
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
47
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
48
|
-
var _, done = false;
|
|
49
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
50
|
-
var context = {};
|
|
51
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
52
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
53
|
-
context.addInitializer = function(f) {
|
|
54
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
55
|
-
extraInitializers.push(accept(f || null));
|
|
56
|
-
};
|
|
57
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
58
|
-
if (kind === "accessor") {
|
|
59
|
-
if (result === void 0) continue;
|
|
60
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
61
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
62
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
63
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
64
|
-
} else if (_ = accept(result)) {
|
|
65
|
-
if (kind === "field") initializers.unshift(_);
|
|
66
|
-
else descriptor[key] = _;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
70
|
-
done = true;
|
|
71
|
-
};
|
|
72
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
73
|
-
var useValue = arguments.length > 2;
|
|
74
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
75
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
76
|
-
}
|
|
77
|
-
return useValue ? value : void 0;
|
|
78
|
-
};
|
|
79
40
|
let BatteryCCAPI = (() => {
|
|
80
41
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses.Battery)];
|
|
81
42
|
let _classDescriptor;
|
|
@@ -91,10 +52,10 @@ let BatteryCCAPI = (() => {
|
|
|
91
52
|
}
|
|
92
53
|
static {
|
|
93
54
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
94
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
55
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
95
56
|
BatteryCCAPI2 = _classThis = _classDescriptor.value;
|
|
96
57
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
97
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
58
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
98
59
|
}
|
|
99
60
|
supportsCommand(cmd) {
|
|
100
61
|
switch (cmd) {
|
|
@@ -179,10 +140,10 @@ let BatteryCC = (() => {
|
|
|
179
140
|
}
|
|
180
141
|
static {
|
|
181
142
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
182
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
143
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
183
144
|
BatteryCC2 = _classThis = _classDescriptor.value;
|
|
184
145
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
185
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
146
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
186
147
|
}
|
|
187
148
|
async interview(ctx) {
|
|
188
149
|
const node = this.getNode(ctx);
|
|
@@ -194,11 +155,11 @@ let BatteryCC = (() => {
|
|
|
194
155
|
await this.refreshValues(ctx);
|
|
195
156
|
this.setInterviewComplete(ctx, true);
|
|
196
157
|
}
|
|
197
|
-
async refreshValues(ctx) {
|
|
158
|
+
async refreshValues(ctx, options) {
|
|
198
159
|
const node = this.getNode(ctx);
|
|
199
160
|
const endpoint = this.getEndpoint(ctx);
|
|
200
161
|
const api = import_API.CCAPI.create(import_core.CommandClasses.Battery, ctx, endpoint).withOptions({
|
|
201
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
162
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
202
163
|
});
|
|
203
164
|
ctx.logNode(node.id, {
|
|
204
165
|
endpoint: this.endpointIndex,
|
|
@@ -278,10 +239,10 @@ let BatteryCCReport = (() => {
|
|
|
278
239
|
}
|
|
279
240
|
static {
|
|
280
241
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
281
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
242
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
282
243
|
BatteryCCReport2 = _classThis = _classDescriptor.value;
|
|
283
244
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
284
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
245
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
285
246
|
}
|
|
286
247
|
constructor(options) {
|
|
287
248
|
super(options);
|
|
@@ -443,10 +404,10 @@ let BatteryCCGet = (() => {
|
|
|
443
404
|
}
|
|
444
405
|
static {
|
|
445
406
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
446
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
407
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
447
408
|
BatteryCCGet2 = _classThis = _classDescriptor.value;
|
|
448
409
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
449
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
410
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
450
411
|
}
|
|
451
412
|
};
|
|
452
413
|
return BatteryCCGet2 = _classThis;
|
|
@@ -466,10 +427,10 @@ let BatteryCCHealthReport = (() => {
|
|
|
466
427
|
}
|
|
467
428
|
static {
|
|
468
429
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
469
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
430
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
470
431
|
BatteryCCHealthReport2 = _classThis = _classDescriptor.value;
|
|
471
432
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
472
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
433
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
473
434
|
}
|
|
474
435
|
constructor(options) {
|
|
475
436
|
super(options);
|
|
@@ -528,10 +489,10 @@ let BatteryCCHealthGet = (() => {
|
|
|
528
489
|
}
|
|
529
490
|
static {
|
|
530
491
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
531
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
492
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
532
493
|
BatteryCCHealthGet2 = _classThis = _classDescriptor.value;
|
|
533
494
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
534
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
495
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
535
496
|
}
|
|
536
497
|
};
|
|
537
498
|
return BatteryCCHealthGet2 = _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/BatteryCC.ts"],
|
|
4
|
-
"sourcesContent": ["import type { GetDeviceConfig } from \"@zwave-js/config\";\nimport { CommandClasses, type ControlsCC, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type NodeId, type SinglecastCC, type SupportsCC, ValueMetadata, type WithAddress, encodeFloatWithScale, enumValuesToMetadataStates, parseFloatWithScale, timespan, validatePayload, } from \"@zwave-js/core\";\nimport { type AllOrNone, Bytes, getEnumMemberName, pick, } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, throwUnsupportedProperty, } 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, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BatteryChargingStatus, BatteryCommand, BatteryReplacementStatus, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { NotificationCCValues } from \"./NotificationCC.js\";\nimport { BatteryCCValues } from \"./_CCValues.generated.js\";\nexport { BatteryCCValues };\n// @noSetValueAPI This CC is read-only\n@API(CommandClasses.Battery)\nexport class BatteryCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: BatteryCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case BatteryCommand.Get:\n return true; // This is mandatory\n case BatteryCommand.HealthGet:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: BatteryCCAPI, { property }) {\n switch (property) {\n case \"level\":\n case \"chargingStatus\":\n case \"rechargeable\":\n case \"backup\":\n case \"overheating\":\n case \"lowFluid\":\n case \"rechargeOrReplace\":\n case \"lowTemperatureStatus\":\n case \"disconnected\":\n return (await this.get())?.[property];\n case \"maximumCapacity\":\n case \"temperature\":\n return (await this.getHealth())?.[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(BatteryCommand, BatteryCommand.Get);\n const cc = new BatteryCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BatteryCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"level\",\n \"chargingStatus\",\n \"rechargeable\",\n \"backup\",\n \"overheating\",\n \"lowFluid\",\n \"rechargeOrReplace\",\n \"lowTemperatureStatus\",\n \"disconnected\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getHealth() {\n this.assertSupportsCommand(BatteryCommand, BatteryCommand.HealthGet);\n const cc = new BatteryCCHealthGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BatteryCCHealthReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"maximumCapacity\", \"temperature\"]);\n }\n }\n}\n@commandClass(CommandClasses.Battery)\n@implementedVersion(3)\n@ccValues(BatteryCCValues)\nexport class BatteryCC extends CommandClass {\n declare ccCommand: BatteryCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query the Battery status\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.Battery, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying battery status...\",\n direction: \"outbound\",\n });\n const batteryStatus = await api.get();\n if (batteryStatus) {\n let logMessage = \"received response for battery information:\";\n if (batteryStatus.disconnected) {\n logMessage += `\nis disconnected: true`;\n }\n else {\n logMessage += `\nlevel: ${batteryStatus.level === 0xff\n ? \"low\"\n : (batteryStatus.level + \" %\")}`;\n }\n if (api.version >= 2) {\n if (!batteryStatus.disconnected) {\n logMessage += `\nstatus: ${BatteryChargingStatus[batteryStatus.chargingStatus!]}`;\n }\n logMessage += `\nrechargeable: ${batteryStatus.rechargeable}\nis backup: ${batteryStatus.backup}\nis overheating: ${batteryStatus.overheating}\nfluid is low: ${batteryStatus.lowFluid}\nneeds to be replaced or charged: ${BatteryReplacementStatus[batteryStatus.rechargeOrReplace!]}\nis low temperature ${batteryStatus.lowTemperatureStatus}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n if (api.version >= 2) {\n // always query the health\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying battery health...\",\n direction: \"outbound\",\n });\n const batteryHealth = await api.getHealth();\n if (batteryHealth) {\n const logMessage = `received response for battery health:\nmax. capacity: ${batteryHealth.maximumCapacity} %\ntemperature: ${batteryHealth.temperature} \u00B0C`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n public shouldRefreshValues(this: SinglecastCC<this>, ctx: GetValueDB & GetSupportedCCVersion & GetDeviceConfig & GetNode<NodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>>): boolean {\n // Check when the battery state was last updated\n const valueDB = ctx.tryGetValueDB(this.nodeId);\n if (!valueDB)\n return true;\n const lastUpdated = valueDB.getTimestamp(BatteryCCValues.level.endpoint(this.endpointIndex));\n return (lastUpdated == undefined\n // The specs say once per month, but that's a bit too unfrequent IMO\n // Also the maximum that setInterval supports is ~24.85 days\n || Date.now() - lastUpdated > timespan.days(7));\n }\n}\n// @publicAPI\nexport type BatteryCCReportOptions = {\n level: number | \"low\";\n} & AllOrNone<{\n // V2+\n chargingStatus: BatteryChargingStatus;\n rechargeable: boolean;\n backup: boolean;\n overheating: boolean;\n lowFluid: boolean;\n rechargeOrReplace: BatteryReplacementStatus;\n disconnected: boolean;\n}> & AllOrNone<{\n // V3+\n lowTemperatureStatus: boolean;\n}>;\n@CCCommand(BatteryCommand.Report)\n@ccValueProperty(\"level\", BatteryCCValues.level)\n@ccValueProperty(\"chargingStatus\", BatteryCCValues.chargingStatus)\n@ccValueProperty(\"rechargeable\", BatteryCCValues.rechargeable)\n@ccValueProperty(\"backup\", BatteryCCValues.backup)\n@ccValueProperty(\"overheating\", BatteryCCValues.overheating)\n@ccValueProperty(\"lowFluid\", BatteryCCValues.lowFluid)\n@ccValueProperty(\"rechargeOrReplace\", BatteryCCValues.rechargeOrReplace)\n@ccValueProperty(\"disconnected\", BatteryCCValues.disconnected)\n@ccValueProperty(\"lowTemperatureStatus\", BatteryCCValues.lowTemperatureStatus)\nexport class BatteryCCReport extends BatteryCC {\n public constructor(options: WithAddress<BatteryCCReportOptions>) {\n super(options);\n this.level = typeof options.level === \"number\" ? options.level : 0xff;\n this.chargingStatus = options.chargingStatus;\n this.rechargeable = options.rechargeable;\n this.backup = options.backup;\n this.overheating = options.overheating;\n this.lowFluid = options.lowFluid;\n this.rechargeOrReplace = options.rechargeOrReplace;\n this.disconnected = options.disconnected;\n this.lowTemperatureStatus = options.lowTemperatureStatus;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BatteryCCReport {\n let ccOptions: BatteryCCReportOptions;\n validatePayload(raw.payload.length >= 1);\n const level = raw.payload[0];\n validatePayload.withReason(`Invalid battery level ${level}`)(\n // This field MUST be in the range 0x00..0x64 or set to 0xFF\n level <= 100 || level === 0xff);\n ccOptions = {\n level,\n };\n if (raw.payload.length >= 3) {\n // Starting with V2\n const chargingStatus: BatteryChargingStatus = raw.payload[1] >>> 6;\n const rechargeable = !!(raw.payload[1] & 32);\n const backup = !!(raw.payload[1] & 16);\n const overheating = !!(raw.payload[1] & 0b1000);\n const lowFluid = !!(raw.payload[1] & 0b0100);\n const rechargeOrReplace: BatteryReplacementStatus = !!(raw.payload[1] & 0b10)\n ? BatteryReplacementStatus.Now\n : !!(raw.payload[1] & 0b1)\n ? BatteryReplacementStatus.Soon\n : BatteryReplacementStatus.No;\n const lowTemperatureStatus = !!(raw.payload[2] & 0b10);\n const disconnected = !!(raw.payload[2] & 0b1);\n ccOptions = {\n ...ccOptions,\n chargingStatus,\n rechargeable,\n backup,\n overheating,\n lowFluid,\n rechargeOrReplace,\n lowTemperatureStatus,\n disconnected,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n ...ccOptions,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n // Setting the values to undefined is a bit hacky, but we need to avoid persisting\n // them in these special cases, and I don't like copy-pasting what persistValues does.\n if (this.disconnected) {\n // Level and chargingStatus are meaningless when disconnected.\n // Suppress persisting them, then remove any previously stored values.\n const savedLevel = this.level;\n const savedChargingStatus = this.chargingStatus;\n // @ts-expect-error\n this.level = undefined;\n // @ts-expect-error\n this.chargingStatus = undefined;\n const ret = super.persistValues(ctx);\n // Add the values back to the CC instance, so they can be evaluated downstream if needed\n // @ts-expect-error\n this.level = savedLevel;\n // @ts-expect-error\n this.chargingStatus = savedChargingStatus;\n this.removeValue(ctx, BatteryCCValues.level);\n this.removeValue(ctx, BatteryCCValues.chargingStatus);\n return ret;\n }\n else if (this.level === 0xff) {\n // 0xff is a \"low battery\" notification, not an actual level\n // @ts-expect-error\n this.level = undefined;\n const ret = super.persistValues(ctx);\n // Add the value back to the CC instance, so it can be evaluated downstream if needed\n // @ts-expect-error\n this.level = 0xff;\n return ret;\n }\n // Default behavior for all other cases\n if (!super.persistValues(ctx))\n return false;\n // Na\u00EFve heuristic for a full battery\n if (this.level >= 90) {\n // Some devices send Notification CC Reports with battery information,\n // or this information is mapped from legacy V1 alarm values.\n // We may need to idle the corresponding values when the battery is full\n const notificationCCVersion = ctx.getSupportedCCVersion(CommandClasses.Notification, this.nodeId as number, this.endpointIndex);\n if (\n // supported\n notificationCCVersion > 0\n // but idling is not required\n && notificationCCVersion < 8) {\n const batteryLevelStatusValue = NotificationCCValues\n .notificationVariable(\"Power Management\", \"Battery level status\");\n // If not undefined and not idle\n if (this.getValue(ctx, batteryLevelStatusValue)) {\n this.setValue(ctx, batteryLevelStatusValue, 0);\n }\n }\n }\n return true;\n }\n public readonly level: number;\n public readonly chargingStatus: BatteryChargingStatus | undefined;\n public readonly rechargeable: boolean | undefined;\n public readonly backup: boolean | undefined;\n public readonly overheating: boolean | undefined;\n public readonly lowFluid: boolean | undefined;\n public readonly rechargeOrReplace: BatteryReplacementStatus | undefined;\n public readonly disconnected: boolean | undefined;\n public readonly lowTemperatureStatus: boolean | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.disconnected\n // CC:0080.02.03.11.010\n // If this field is set to 1, the Battery Level field MUST\n // be set to 0x00.\n ? 0\n : this.level,\n ]);\n if (this.chargingStatus != undefined) {\n this.payload = Bytes.concat([\n this.payload,\n [\n (this.chargingStatus << 6)\n + (this.rechargeable ? 32 : 0)\n + (this.backup ? 16 : 0)\n + (this.overheating ? 0b1000 : 0)\n + (this.lowFluid ? 0b0100 : 0)\n + (this.rechargeOrReplace === BatteryReplacementStatus.Now\n ? 0b10\n : this.rechargeOrReplace\n === BatteryReplacementStatus.Soon\n ? 0b1\n : 0),\n (this.lowTemperatureStatus ? 0b10 : 0)\n + (this.disconnected ? 0b1 : 0),\n ],\n ]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {};\n if (this.disconnected) {\n message.disconnected = true;\n }\n else if (this.level === 0xff) {\n message[\"is low\"] = true;\n }\n else {\n message.level = this.level;\n }\n if (!this.disconnected && this.chargingStatus != undefined) {\n message[\"charging status\"] = getEnumMemberName(BatteryChargingStatus, this.chargingStatus);\n }\n if (this.rechargeable != undefined) {\n message.rechargeable = this.rechargeable;\n }\n if (this.backup != undefined) {\n message.backup = this.backup;\n }\n if (this.overheating != undefined) {\n message.overheating = this.overheating;\n }\n if (this.lowFluid != undefined) {\n message[\"low fluid\"] = this.lowFluid;\n }\n if (this.rechargeOrReplace != undefined) {\n message[\"recharge or replace\"] = getEnumMemberName(BatteryReplacementStatus, this.rechargeOrReplace);\n }\n if (this.lowTemperatureStatus != undefined) {\n message.lowTemperatureStatus = this.lowTemperatureStatus;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(BatteryCommand.Get)\n@expectedCCResponse(BatteryCCReport)\nexport class BatteryCCGet extends BatteryCC {\n}\n// @publicAPI\nexport interface BatteryCCHealthReportOptions {\n maximumCapacity?: number;\n temperature?: number;\n temperatureScale?: number;\n}\n@CCCommand(BatteryCommand.HealthReport)\n@ccValueProperty(\"maximumCapacity\", BatteryCCValues.maximumCapacity)\n@ccValueProperty(\"temperature\", BatteryCCValues.temperature)\nexport class BatteryCCHealthReport extends BatteryCC {\n public constructor(options: WithAddress<BatteryCCHealthReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.maximumCapacity = options.maximumCapacity;\n this.temperature = options.temperature;\n this.temperatureScale = options.temperatureScale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BatteryCCHealthReport {\n validatePayload(raw.payload.length >= 2);\n // Parse maximum capacity. 0xff means unknown\n let maximumCapacity: number | undefined = raw.payload[0];\n if (maximumCapacity === 0xff)\n maximumCapacity = undefined;\n const { value: temperature, scale: temperatureScale, } = parseFloatWithScale(raw.payload.subarray(1), true);\n return new this({\n nodeId: ctx.sourceNodeId,\n maximumCapacity,\n temperature,\n temperatureScale,\n });\n }\n public readonly maximumCapacity: number | undefined;\n public readonly temperature: number | undefined;\n private readonly temperatureScale: number | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const temperature = this.temperature != undefined\n ? encodeFloatWithScale(this.temperature, this.temperatureScale ?? 0x00)\n // size, precision and scale must be 0 if the temperature is omitted\n : Bytes.from([0x00]);\n this.payload = Bytes.concat([\n [this.maximumCapacity ?? 0xff],\n temperature,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n temperature: this.temperature != undefined\n ? this.temperature\n : \"unknown\",\n \"max capacity\": this.maximumCapacity != undefined\n ? `${this.maximumCapacity} %`\n : \"unknown\",\n },\n };\n }\n}\n@CCCommand(BatteryCommand.HealthGet)\n@expectedCCResponse(BatteryCCHealthReport)\nexport class BatteryCCHealthGet extends BatteryCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { GetDeviceConfig } from \"@zwave-js/config\";\nimport { CommandClasses, type ControlsCC, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type NodeId, type SinglecastCC, type SupportsCC, ValueMetadata, type WithAddress, encodeFloatWithScale, enumValuesToMetadataStates, parseFloatWithScale, timespan, validatePayload, } from \"@zwave-js/core\";\nimport { type AllOrNone, Bytes, getEnumMemberName, pick, } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, throwUnsupportedProperty, } 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, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BatteryChargingStatus, BatteryCommand, BatteryReplacementStatus, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { NotificationCCValues } from \"./NotificationCC.js\";\nimport { BatteryCCValues } from \"./_CCValues.generated.js\";\nexport { BatteryCCValues };\n// @noSetValueAPI This CC is read-only\n@API(CommandClasses.Battery)\nexport class BatteryCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: BatteryCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case BatteryCommand.Get:\n return true; // This is mandatory\n case BatteryCommand.HealthGet:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: BatteryCCAPI, { property }) {\n switch (property) {\n case \"level\":\n case \"chargingStatus\":\n case \"rechargeable\":\n case \"backup\":\n case \"overheating\":\n case \"lowFluid\":\n case \"rechargeOrReplace\":\n case \"lowTemperatureStatus\":\n case \"disconnected\":\n return (await this.get())?.[property];\n case \"maximumCapacity\":\n case \"temperature\":\n return (await this.getHealth())?.[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(BatteryCommand, BatteryCommand.Get);\n const cc = new BatteryCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BatteryCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"level\",\n \"chargingStatus\",\n \"rechargeable\",\n \"backup\",\n \"overheating\",\n \"lowFluid\",\n \"rechargeOrReplace\",\n \"lowTemperatureStatus\",\n \"disconnected\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getHealth() {\n this.assertSupportsCommand(BatteryCommand, BatteryCommand.HealthGet);\n const cc = new BatteryCCHealthGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BatteryCCHealthReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"maximumCapacity\", \"temperature\"]);\n }\n }\n}\n@commandClass(CommandClasses.Battery)\n@implementedVersion(3)\n@ccValues(BatteryCCValues)\nexport class BatteryCC extends CommandClass {\n declare ccCommand: BatteryCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query the Battery status\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.Battery, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying battery status...\",\n direction: \"outbound\",\n });\n const batteryStatus = await api.get();\n if (batteryStatus) {\n let logMessage = \"received response for battery information:\";\n if (batteryStatus.disconnected) {\n logMessage += `\nis disconnected: true`;\n }\n else {\n logMessage += `\nlevel: ${batteryStatus.level === 0xff\n ? \"low\"\n : (batteryStatus.level + \" %\")}`;\n }\n if (api.version >= 2) {\n if (!batteryStatus.disconnected) {\n logMessage += `\nstatus: ${BatteryChargingStatus[batteryStatus.chargingStatus!]}`;\n }\n logMessage += `\nrechargeable: ${batteryStatus.rechargeable}\nis backup: ${batteryStatus.backup}\nis overheating: ${batteryStatus.overheating}\nfluid is low: ${batteryStatus.lowFluid}\nneeds to be replaced or charged: ${BatteryReplacementStatus[batteryStatus.rechargeOrReplace!]}\nis low temperature ${batteryStatus.lowTemperatureStatus}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n if (api.version >= 2) {\n // always query the health\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying battery health...\",\n direction: \"outbound\",\n });\n const batteryHealth = await api.getHealth();\n if (batteryHealth) {\n const logMessage = `received response for battery health:\nmax. capacity: ${batteryHealth.maximumCapacity} %\ntemperature: ${batteryHealth.temperature} \u00B0C`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n public shouldRefreshValues(this: SinglecastCC<this>, ctx: GetValueDB & GetSupportedCCVersion & GetDeviceConfig & GetNode<NodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>>): boolean {\n // Check when the battery state was last updated\n const valueDB = ctx.tryGetValueDB(this.nodeId);\n if (!valueDB)\n return true;\n const lastUpdated = valueDB.getTimestamp(BatteryCCValues.level.endpoint(this.endpointIndex));\n return (lastUpdated == undefined\n // The specs say once per month, but that's a bit too unfrequent IMO\n // Also the maximum that setInterval supports is ~24.85 days\n || Date.now() - lastUpdated > timespan.days(7));\n }\n}\n// @publicAPI\nexport type BatteryCCReportOptions = {\n level: number | \"low\";\n} & AllOrNone<{\n // V2+\n chargingStatus: BatteryChargingStatus;\n rechargeable: boolean;\n backup: boolean;\n overheating: boolean;\n lowFluid: boolean;\n rechargeOrReplace: BatteryReplacementStatus;\n disconnected: boolean;\n}> & AllOrNone<{\n // V3+\n lowTemperatureStatus: boolean;\n}>;\n@CCCommand(BatteryCommand.Report)\n@ccValueProperty(\"level\", BatteryCCValues.level)\n@ccValueProperty(\"chargingStatus\", BatteryCCValues.chargingStatus)\n@ccValueProperty(\"rechargeable\", BatteryCCValues.rechargeable)\n@ccValueProperty(\"backup\", BatteryCCValues.backup)\n@ccValueProperty(\"overheating\", BatteryCCValues.overheating)\n@ccValueProperty(\"lowFluid\", BatteryCCValues.lowFluid)\n@ccValueProperty(\"rechargeOrReplace\", BatteryCCValues.rechargeOrReplace)\n@ccValueProperty(\"disconnected\", BatteryCCValues.disconnected)\n@ccValueProperty(\"lowTemperatureStatus\", BatteryCCValues.lowTemperatureStatus)\nexport class BatteryCCReport extends BatteryCC {\n public constructor(options: WithAddress<BatteryCCReportOptions>) {\n super(options);\n this.level = typeof options.level === \"number\" ? options.level : 0xff;\n this.chargingStatus = options.chargingStatus;\n this.rechargeable = options.rechargeable;\n this.backup = options.backup;\n this.overheating = options.overheating;\n this.lowFluid = options.lowFluid;\n this.rechargeOrReplace = options.rechargeOrReplace;\n this.disconnected = options.disconnected;\n this.lowTemperatureStatus = options.lowTemperatureStatus;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BatteryCCReport {\n let ccOptions: BatteryCCReportOptions;\n validatePayload(raw.payload.length >= 1);\n const level = raw.payload[0];\n validatePayload.withReason(`Invalid battery level ${level}`)(\n // This field MUST be in the range 0x00..0x64 or set to 0xFF\n level <= 100 || level === 0xff);\n ccOptions = {\n level,\n };\n if (raw.payload.length >= 3) {\n // Starting with V2\n const chargingStatus: BatteryChargingStatus = raw.payload[1] >>> 6;\n const rechargeable = !!(raw.payload[1] & 32);\n const backup = !!(raw.payload[1] & 16);\n const overheating = !!(raw.payload[1] & 0b1000);\n const lowFluid = !!(raw.payload[1] & 0b0100);\n const rechargeOrReplace: BatteryReplacementStatus = !!(raw.payload[1] & 0b10)\n ? BatteryReplacementStatus.Now\n : !!(raw.payload[1] & 0b1)\n ? BatteryReplacementStatus.Soon\n : BatteryReplacementStatus.No;\n const lowTemperatureStatus = !!(raw.payload[2] & 0b10);\n const disconnected = !!(raw.payload[2] & 0b1);\n ccOptions = {\n ...ccOptions,\n chargingStatus,\n rechargeable,\n backup,\n overheating,\n lowFluid,\n rechargeOrReplace,\n lowTemperatureStatus,\n disconnected,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n ...ccOptions,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n // Setting the values to undefined is a bit hacky, but we need to avoid persisting\n // them in these special cases, and I don't like copy-pasting what persistValues does.\n if (this.disconnected) {\n // Level and chargingStatus are meaningless when disconnected.\n // Suppress persisting them, then remove any previously stored values.\n const savedLevel = this.level;\n const savedChargingStatus = this.chargingStatus;\n // @ts-expect-error\n this.level = undefined;\n // @ts-expect-error\n this.chargingStatus = undefined;\n const ret = super.persistValues(ctx);\n // Add the values back to the CC instance, so they can be evaluated downstream if needed\n // @ts-expect-error\n this.level = savedLevel;\n // @ts-expect-error\n this.chargingStatus = savedChargingStatus;\n this.removeValue(ctx, BatteryCCValues.level);\n this.removeValue(ctx, BatteryCCValues.chargingStatus);\n return ret;\n }\n else if (this.level === 0xff) {\n // 0xff is a \"low battery\" notification, not an actual level\n // @ts-expect-error\n this.level = undefined;\n const ret = super.persistValues(ctx);\n // Add the value back to the CC instance, so it can be evaluated downstream if needed\n // @ts-expect-error\n this.level = 0xff;\n return ret;\n }\n // Default behavior for all other cases\n if (!super.persistValues(ctx))\n return false;\n // Na\u00EFve heuristic for a full battery\n if (this.level >= 90) {\n // Some devices send Notification CC Reports with battery information,\n // or this information is mapped from legacy V1 alarm values.\n // We may need to idle the corresponding values when the battery is full\n const notificationCCVersion = ctx.getSupportedCCVersion(CommandClasses.Notification, this.nodeId as number, this.endpointIndex);\n if (\n // supported\n notificationCCVersion > 0\n // but idling is not required\n && notificationCCVersion < 8) {\n const batteryLevelStatusValue = NotificationCCValues\n .notificationVariable(\"Power Management\", \"Battery level status\");\n // If not undefined and not idle\n if (this.getValue(ctx, batteryLevelStatusValue)) {\n this.setValue(ctx, batteryLevelStatusValue, 0);\n }\n }\n }\n return true;\n }\n public readonly level: number;\n public readonly chargingStatus: BatteryChargingStatus | undefined;\n public readonly rechargeable: boolean | undefined;\n public readonly backup: boolean | undefined;\n public readonly overheating: boolean | undefined;\n public readonly lowFluid: boolean | undefined;\n public readonly rechargeOrReplace: BatteryReplacementStatus | undefined;\n public readonly disconnected: boolean | undefined;\n public readonly lowTemperatureStatus: boolean | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.disconnected\n // CC:0080.02.03.11.010\n // If this field is set to 1, the Battery Level field MUST\n // be set to 0x00.\n ? 0\n : this.level,\n ]);\n if (this.chargingStatus != undefined) {\n this.payload = Bytes.concat([\n this.payload,\n [\n (this.chargingStatus << 6)\n + (this.rechargeable ? 32 : 0)\n + (this.backup ? 16 : 0)\n + (this.overheating ? 0b1000 : 0)\n + (this.lowFluid ? 0b0100 : 0)\n + (this.rechargeOrReplace === BatteryReplacementStatus.Now\n ? 0b10\n : this.rechargeOrReplace\n === BatteryReplacementStatus.Soon\n ? 0b1\n : 0),\n (this.lowTemperatureStatus ? 0b10 : 0)\n + (this.disconnected ? 0b1 : 0),\n ],\n ]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {};\n if (this.disconnected) {\n message.disconnected = true;\n }\n else if (this.level === 0xff) {\n message[\"is low\"] = true;\n }\n else {\n message.level = this.level;\n }\n if (!this.disconnected && this.chargingStatus != undefined) {\n message[\"charging status\"] = getEnumMemberName(BatteryChargingStatus, this.chargingStatus);\n }\n if (this.rechargeable != undefined) {\n message.rechargeable = this.rechargeable;\n }\n if (this.backup != undefined) {\n message.backup = this.backup;\n }\n if (this.overheating != undefined) {\n message.overheating = this.overheating;\n }\n if (this.lowFluid != undefined) {\n message[\"low fluid\"] = this.lowFluid;\n }\n if (this.rechargeOrReplace != undefined) {\n message[\"recharge or replace\"] = getEnumMemberName(BatteryReplacementStatus, this.rechargeOrReplace);\n }\n if (this.lowTemperatureStatus != undefined) {\n message.lowTemperatureStatus = this.lowTemperatureStatus;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(BatteryCommand.Get)\n@expectedCCResponse(BatteryCCReport)\nexport class BatteryCCGet extends BatteryCC {\n}\n// @publicAPI\nexport interface BatteryCCHealthReportOptions {\n maximumCapacity?: number;\n temperature?: number;\n temperatureScale?: number;\n}\n@CCCommand(BatteryCommand.HealthReport)\n@ccValueProperty(\"maximumCapacity\", BatteryCCValues.maximumCapacity)\n@ccValueProperty(\"temperature\", BatteryCCValues.temperature)\nexport class BatteryCCHealthReport extends BatteryCC {\n public constructor(options: WithAddress<BatteryCCHealthReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.maximumCapacity = options.maximumCapacity;\n this.temperature = options.temperature;\n this.temperatureScale = options.temperatureScale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BatteryCCHealthReport {\n validatePayload(raw.payload.length >= 2);\n // Parse maximum capacity. 0xff means unknown\n let maximumCapacity: number | undefined = raw.payload[0];\n if (maximumCapacity === 0xff)\n maximumCapacity = undefined;\n const { value: temperature, scale: temperatureScale, } = parseFloatWithScale(raw.payload.subarray(1), true);\n return new this({\n nodeId: ctx.sourceNodeId,\n maximumCapacity,\n temperature,\n temperatureScale,\n });\n }\n public readonly maximumCapacity: number | undefined;\n public readonly temperature: number | undefined;\n private readonly temperatureScale: number | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const temperature = this.temperature != undefined\n ? encodeFloatWithScale(this.temperature, this.temperatureScale ?? 0x00)\n // size, precision and scale must be 0 if the temperature is omitted\n : Bytes.from([0x00]);\n this.payload = Bytes.concat([\n [this.maximumCapacity ?? 0xff],\n temperature,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n temperature: this.temperature != undefined\n ? this.temperature\n : \"unknown\",\n \"max capacity\": this.maximumCapacity != undefined\n ? `${this.maximumCapacity} %`\n : \"unknown\",\n },\n };\n }\n}\n@CCCommand(BatteryCommand.HealthGet)\n@expectedCCResponse(BatteryCCHealthReport)\nexport class BatteryCCHealthGet extends BatteryCC {\n}\n"],
|
|
5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