@zwave-js/cc 14.0.0-beta.1 → 14.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +194 -0
- package/build/cjs/cc/AlarmSensorCC.js +395 -0
- package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
- package/build/cjs/cc/AssociationCC.d.ts +253 -0
- package/build/cjs/cc/AssociationCC.js +711 -0
- package/build/cjs/cc/AssociationCC.js.map +7 -0
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
- package/build/cjs/cc/AssociationGroupInfoCC.js +746 -0
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
- package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
- package/build/cjs/cc/BarrierOperatorCC.js +582 -0
- package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
- package/build/cjs/cc/BasicCC.d.ts +191 -0
- package/build/cjs/cc/BasicCC.js +384 -0
- package/build/cjs/cc/BasicCC.js.map +7 -0
- package/build/cjs/cc/BatteryCC.d.ts +406 -0
- package/build/cjs/cc/BatteryCC.js +508 -0
- package/build/cjs/cc/BatteryCC.js.map +7 -0
- package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
- package/build/cjs/cc/BinarySensorCC.js +431 -0
- package/build/cjs/cc/BinarySensorCC.js.map +7 -0
- package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
- package/build/cjs/cc/BinarySwitchCC.js +378 -0
- package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
- package/build/cjs/cc/CRC16CC.d.ts +29 -0
- package/build/cjs/cc/CRC16CC.js +133 -0
- package/build/cjs/cc/CRC16CC.js.map +7 -0
- package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
- package/build/cjs/cc/CentralSceneCC.js +449 -0
- package/build/cjs/cc/CentralSceneCC.js.map +7 -0
- package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
- package/build/cjs/cc/ClimateControlScheduleCC.js +480 -0
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
- package/build/cjs/cc/ClockCC.d.ts +47 -0
- package/build/cjs/cc/ClockCC.js +226 -0
- package/build/cjs/cc/ClockCC.js.map +7 -0
- package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
- package/build/cjs/cc/ColorSwitchCC.js +1117 -0
- package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
- package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
- package/build/cjs/cc/ConfigurationCC.js +2230 -0
- package/build/cjs/cc/ConfigurationCC.js.map +7 -0
- package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
- package/build/cjs/cc/DeviceResetLocallyCC.js +92 -0
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
- package/build/cjs/cc/DoorLockCC.d.ts +837 -0
- package/build/cjs/cc/DoorLockCC.js +1239 -0
- package/build/cjs/cc/DoorLockCC.js.map +7 -0
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
- package/build/cjs/cc/DoorLockLoggingCC.js +343 -0
- package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
- package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
- package/build/cjs/cc/EnergyProductionCC.js +240 -0
- package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
- package/build/cjs/cc/EntryControlCC.d.ts +231 -0
- package/build/cjs/cc/EntryControlCC.js +593 -0
- package/build/cjs/cc/EntryControlCC.js.map +7 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1122 -0
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
- package/build/cjs/cc/HailCC.d.ts +6 -0
- package/build/cjs/cc/HailCC.js +45 -0
- package/build/cjs/cc/HailCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
- package/build/cjs/cc/HumidityControlModeCC.js +323 -0
- package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +164 -0
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
- package/build/cjs/cc/HumidityControlSetpointCC.js +634 -0
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
- package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
- package/build/cjs/cc/InclusionControllerCC.js +160 -0
- package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
- package/build/cjs/cc/IndicatorCC.d.ts +338 -0
- package/build/cjs/cc/IndicatorCC.js +1234 -0
- package/build/cjs/cc/IndicatorCC.js.map +7 -0
- package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
- package/build/cjs/cc/IrrigationCC.js +1978 -0
- package/build/cjs/cc/IrrigationCC.js.map +7 -0
- package/build/cjs/cc/LanguageCC.d.ts +101 -0
- package/build/cjs/cc/LanguageCC.js +267 -0
- package/build/cjs/cc/LanguageCC.js.map +7 -0
- package/build/cjs/cc/LockCC.d.ts +73 -0
- package/build/cjs/cc/LockCC.js +222 -0
- package/build/cjs/cc/LockCC.js.map +7 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.js +209 -0
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
- package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
- package/build/cjs/cc/ManufacturerSpecificCC.js +334 -0
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
- package/build/cjs/cc/MeterCC.d.ts +318 -0
- package/build/cjs/cc/MeterCC.js +1235 -0
- package/build/cjs/cc/MeterCC.js.map +7 -0
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
- package/build/cjs/cc/MultiChannelAssociationCC.js +956 -0
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
- package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
- package/build/cjs/cc/MultiChannelCC.js +1050 -0
- package/build/cjs/cc/MultiChannelCC.js.map +7 -0
- package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
- package/build/cjs/cc/MultiCommandCC.js +159 -0
- package/build/cjs/cc/MultiCommandCC.js.map +7 -0
- package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
- package/build/cjs/cc/MultilevelSensorCC.js +716 -0
- package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
- package/build/cjs/cc/MultilevelSwitchCC.js +780 -0
- package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
- package/build/cjs/cc/NoOperationCC.d.ts +9 -0
- package/build/cjs/cc/NoOperationCC.js +64 -0
- package/build/cjs/cc/NoOperationCC.js.map +7 -0
- package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
- package/build/cjs/cc/NodeNamingCC.js +364 -0
- package/build/cjs/cc/NodeNamingCC.js.map +7 -0
- package/build/cjs/cc/NotificationCC.d.ts +479 -0
- package/build/cjs/cc/NotificationCC.js +1245 -0
- package/build/cjs/cc/NotificationCC.js.map +7 -0
- package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
- package/build/cjs/cc/PowerlevelCC.js +510 -0
- package/build/cjs/cc/PowerlevelCC.js.map +7 -0
- package/build/cjs/cc/ProtectionCC.d.ts +325 -0
- package/build/cjs/cc/ProtectionCC.js +667 -0
- package/build/cjs/cc/ProtectionCC.js.map +7 -0
- package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
- package/build/cjs/cc/SceneActivationCC.js +193 -0
- package/build/cjs/cc/SceneActivationCC.js.map +7 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +370 -0
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.js +423 -0
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
- package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
- package/build/cjs/cc/ScheduleEntryLockCC.js +1763 -0
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
- package/build/cjs/cc/Security2CC.d.ts +251 -0
- package/build/cjs/cc/Security2CC.js +1589 -0
- package/build/cjs/cc/Security2CC.js.map +7 -0
- package/build/cjs/cc/SecurityCC.d.ts +128 -0
- package/build/cjs/cc/SecurityCC.js +757 -0
- package/build/cjs/cc/SecurityCC.js.map +7 -0
- package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
- package/build/cjs/cc/SoundSwitchCC.js +661 -0
- package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
- package/build/cjs/cc/SupervisionCC.d.ts +104 -0
- package/build/cjs/cc/SupervisionCC.js +308 -0
- package/build/cjs/cc/SupervisionCC.js.map +7 -0
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
- package/build/cjs/cc/ThermostatFanModeCC.js +372 -0
- package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
- package/build/cjs/cc/ThermostatFanStateCC.js +166 -0
- package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
- package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
- package/build/cjs/cc/ThermostatModeCC.js +436 -0
- package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.js +162 -0
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
- package/build/cjs/cc/ThermostatSetbackCC.js +262 -0
- package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
- package/build/cjs/cc/ThermostatSetpointCC.js +638 -0
- package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
- package/build/cjs/cc/TimeCC.d.ts +88 -0
- package/build/cjs/cc/TimeCC.js +473 -0
- package/build/cjs/cc/TimeCC.js.map +7 -0
- package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
- package/build/cjs/cc/TimeParametersCC.js +313 -0
- package/build/cjs/cc/TimeParametersCC.js.map +7 -0
- package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
- package/build/cjs/cc/TransportServiceCC.js +404 -0
- package/build/cjs/cc/TransportServiceCC.js.map +7 -0
- package/build/cjs/cc/UserCodeCC.d.ts +683 -0
- package/build/cjs/cc/UserCodeCC.js +1620 -0
- package/build/cjs/cc/UserCodeCC.js.map +7 -0
- package/build/cjs/cc/VersionCC.d.ts +469 -0
- package/build/cjs/cc/VersionCC.js +828 -0
- package/build/cjs/cc/VersionCC.js.map +7 -0
- package/build/cjs/cc/WakeUpCC.d.ts +150 -0
- package/build/cjs/cc/WakeUpCC.js +456 -0
- package/build/cjs/cc/WakeUpCC.js.map +7 -0
- package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
- package/build/cjs/cc/WindowCoveringCC.js +776 -0
- package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
- package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
- package/build/cjs/cc/ZWaveLongRangeCC.js +43 -0
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
- package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
- package/build/cjs/cc/ZWavePlusCC.js +288 -0
- package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
- package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
- package/build/cjs/cc/ZWaveProtocolCC.js +1071 -0
- package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
- package/build/cjs/cc/index.d.ts +132 -0
- package/build/cjs/cc/index.js +1180 -0
- package/build/cjs/cc/index.js.map +7 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
- package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +412 -0
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
- package/build/cjs/index.d.ts +15 -0
- package/build/cjs/index.js +77 -0
- package/build/cjs/index.js.map +7 -0
- package/build/cjs/index_safe.d.ts +3 -0
- package/build/cjs/index_safe.js +25 -0
- package/build/cjs/index_safe.js.map +7 -0
- package/build/cjs/lib/API.d.ts +271 -0
- package/build/cjs/lib/API.js +413 -0
- package/build/cjs/lib/API.js.map +7 -0
- package/build/cjs/lib/CommandClass.d.ts +234 -0
- package/build/cjs/lib/CommandClass.js +692 -0
- package/build/cjs/lib/CommandClass.js.map +7 -0
- package/build/cjs/lib/CommandClassDecorators.d.ts +112 -0
- package/build/cjs/lib/CommandClassDecorators.js +182 -0
- package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
- package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
- package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
- package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
- package/build/cjs/lib/ICommandClassContainer.js +17 -0
- package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
- package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
- package/build/cjs/lib/NotificationEventPayload.js +31 -0
- package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
- package/build/cjs/lib/Security2/Extension.js +333 -0
- package/build/cjs/lib/Security2/Extension.js.map +7 -0
- package/build/cjs/lib/Security2/shared.js +69 -0
- package/build/cjs/lib/Security2/shared.js.map +7 -0
- package/build/cjs/lib/SetValueResult.js +65 -0
- package/build/cjs/lib/SetValueResult.js.map +7 -0
- package/build/cjs/lib/Values.d.ts +223 -0
- package/build/cjs/lib/Values.js +191 -0
- package/build/cjs/lib/Values.js.map +7 -0
- package/build/cjs/lib/_Types.js +1676 -0
- package/build/cjs/lib/_Types.js.map +7 -0
- package/build/cjs/lib/serializers.d.ts +34 -0
- package/build/cjs/lib/serializers.js +110 -0
- package/build/cjs/lib/serializers.js.map +7 -0
- package/build/cjs/lib/utils.d.ts +17 -0
- package/build/cjs/lib/utils.js +678 -0
- package/build/cjs/lib/utils.js.map +7 -0
- package/build/cjs/package.json +3 -0
- package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
- package/build/esm/cc/AlarmSensorCC.js +392 -0
- package/build/esm/cc/AlarmSensorCC.js.map +1 -0
- package/build/esm/cc/AssociationCC.d.ts +253 -0
- package/build/esm/cc/AssociationCC.d.ts.map +1 -0
- package/build/esm/cc/AssociationCC.js +706 -0
- package/build/esm/cc/AssociationCC.js.map +1 -0
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
- package/build/esm/cc/AssociationGroupInfoCC.js +769 -0
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
- package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
- package/build/esm/cc/BarrierOperatorCC.js +610 -0
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
- package/build/esm/cc/BasicCC.d.ts +191 -0
- package/build/esm/cc/BasicCC.d.ts.map +1 -0
- package/build/esm/cc/BasicCC.js +390 -0
- package/build/esm/cc/BasicCC.js.map +1 -0
- package/build/esm/cc/BatteryCC.d.ts +406 -0
- package/build/esm/cc/BatteryCC.d.ts.map +1 -0
- package/build/esm/cc/BatteryCC.js +513 -0
- package/build/esm/cc/BatteryCC.js.map +1 -0
- package/build/esm/cc/BinarySensorCC.d.ts +122 -0
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
- package/build/esm/cc/BinarySensorCC.js +417 -0
- package/build/esm/cc/BinarySensorCC.js.map +1 -0
- package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
- package/build/esm/cc/BinarySwitchCC.js +362 -0
- package/build/esm/cc/BinarySwitchCC.js.map +1 -0
- package/build/esm/cc/CRC16CC.d.ts +29 -0
- package/build/esm/cc/CRC16CC.d.ts.map +1 -0
- package/build/esm/cc/CRC16CC.js +123 -0
- package/build/esm/cc/CRC16CC.js.map +1 -0
- package/build/esm/cc/CentralSceneCC.d.ts +210 -0
- package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
- package/build/esm/cc/CentralSceneCC.js +427 -0
- package/build/esm/cc/CentralSceneCC.js.map +1 -0
- package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
- package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
- package/build/esm/cc/ClimateControlScheduleCC.js +466 -0
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
- package/build/esm/cc/ClockCC.d.ts +47 -0
- package/build/esm/cc/ClockCC.d.ts.map +1 -0
- package/build/esm/cc/ClockCC.js +205 -0
- package/build/esm/cc/ClockCC.js.map +1 -0
- package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/ColorSwitchCC.js +1149 -0
- package/build/esm/cc/ColorSwitchCC.js.map +1 -0
- package/build/esm/cc/ConfigurationCC.d.ts +396 -0
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/ConfigurationCC.js +2454 -0
- package/build/esm/cc/ConfigurationCC.js.map +1 -0
- package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
- package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
- package/build/esm/cc/DeviceResetLocallyCC.js +73 -0
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
- package/build/esm/cc/DoorLockCC.d.ts +837 -0
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
- package/build/esm/cc/DoorLockCC.js +1270 -0
- package/build/esm/cc/DoorLockCC.js.map +1 -0
- package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
- package/build/esm/cc/DoorLockLoggingCC.js +316 -0
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
- package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
- package/build/esm/cc/EnergyProductionCC.js +213 -0
- package/build/esm/cc/EnergyProductionCC.js.map +1 -0
- package/build/esm/cc/EntryControlCC.d.ts +231 -0
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
- package/build/esm/cc/EntryControlCC.js +581 -0
- package/build/esm/cc/EntryControlCC.js.map +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1142 -0
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
- package/build/esm/cc/HailCC.d.ts +6 -0
- package/build/esm/cc/HailCC.d.ts.map +1 -0
- package/build/esm/cc/HailCC.js +21 -0
- package/build/esm/cc/HailCC.js.map +1 -0
- package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlModeCC.js +305 -0
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.js +137 -0
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
- package/build/esm/cc/HumidityControlSetpointCC.js +645 -0
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
- package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
- package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
- package/build/esm/cc/InclusionControllerCC.js +133 -0
- package/build/esm/cc/InclusionControllerCC.js.map +1 -0
- package/build/esm/cc/IndicatorCC.d.ts +338 -0
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
- package/build/esm/cc/IndicatorCC.js +1317 -0
- package/build/esm/cc/IndicatorCC.js.map +1 -0
- package/build/esm/cc/IrrigationCC.d.ts +1496 -0
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
- package/build/esm/cc/IrrigationCC.js +2038 -0
- package/build/esm/cc/IrrigationCC.js.map +1 -0
- package/build/esm/cc/LanguageCC.d.ts +101 -0
- package/build/esm/cc/LanguageCC.d.ts.map +1 -0
- package/build/esm/cc/LanguageCC.js +243 -0
- package/build/esm/cc/LanguageCC.js.map +1 -0
- package/build/esm/cc/LockCC.d.ts +73 -0
- package/build/esm/cc/LockCC.d.ts.map +1 -0
- package/build/esm/cc/LockCC.js +197 -0
- package/build/esm/cc/LockCC.js.map +1 -0
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
- package/build/esm/cc/ManufacturerProprietaryCC.js +201 -0
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
- package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
- package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
- package/build/esm/cc/ManufacturerSpecificCC.js +315 -0
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
- package/build/esm/cc/MeterCC.d.ts +318 -0
- package/build/esm/cc/MeterCC.d.ts.map +1 -0
- package/build/esm/cc/MeterCC.js +1308 -0
- package/build/esm/cc/MeterCC.js.map +1 -0
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
- package/build/esm/cc/MultiChannelAssociationCC.js +981 -0
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
- package/build/esm/cc/MultiChannelCC.d.ts +394 -0
- package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
- package/build/esm/cc/MultiChannelCC.js +1127 -0
- package/build/esm/cc/MultiChannelCC.js.map +1 -0
- package/build/esm/cc/MultiCommandCC.d.ts +27 -0
- package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
- package/build/esm/cc/MultiCommandCC.js +142 -0
- package/build/esm/cc/MultiCommandCC.js.map +1 -0
- package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
- package/build/esm/cc/MultilevelSensorCC.js +753 -0
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
- package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/MultilevelSwitchCC.js +810 -0
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
- package/build/esm/cc/NoOperationCC.d.ts +9 -0
- package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
- package/build/esm/cc/NoOperationCC.js +39 -0
- package/build/esm/cc/NoOperationCC.js.map +1 -0
- package/build/esm/cc/NodeNamingCC.d.ts +118 -0
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
- package/build/esm/cc/NodeNamingCC.js +345 -0
- package/build/esm/cc/NodeNamingCC.js.map +1 -0
- package/build/esm/cc/NotificationCC.d.ts +479 -0
- package/build/esm/cc/NotificationCC.d.ts.map +1 -0
- package/build/esm/cc/NotificationCC.js +1350 -0
- package/build/esm/cc/NotificationCC.js.map +1 -0
- package/build/esm/cc/PowerlevelCC.d.ts +82 -0
- package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
- package/build/esm/cc/PowerlevelCC.js +485 -0
- package/build/esm/cc/PowerlevelCC.js.map +1 -0
- package/build/esm/cc/ProtectionCC.d.ts +325 -0
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
- package/build/esm/cc/ProtectionCC.js +669 -0
- package/build/esm/cc/ProtectionCC.js.map +1 -0
- package/build/esm/cc/SceneActivationCC.d.ts +89 -0
- package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneActivationCC.js +166 -0
- package/build/esm/cc/SceneActivationCC.js.map +1 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.js +374 -0
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js +446 -0
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
- package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
- package/build/esm/cc/ScheduleEntryLockCC.js +1826 -0
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
- package/build/esm/cc/Security2CC.d.ts +251 -0
- package/build/esm/cc/Security2CC.d.ts.map +1 -0
- package/build/esm/cc/Security2CC.js +1814 -0
- package/build/esm/cc/Security2CC.js.map +1 -0
- package/build/esm/cc/SecurityCC.d.ts +128 -0
- package/build/esm/cc/SecurityCC.d.ts.map +1 -0
- package/build/esm/cc/SecurityCC.js +800 -0
- package/build/esm/cc/SecurityCC.js.map +1 -0
- package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
- package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
- package/build/esm/cc/SoundSwitchCC.js +633 -0
- package/build/esm/cc/SoundSwitchCC.js.map +1 -0
- package/build/esm/cc/SupervisionCC.d.ts +104 -0
- package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
- package/build/esm/cc/SupervisionCC.js +319 -0
- package/build/esm/cc/SupervisionCC.js.map +1 -0
- package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatFanModeCC.js +359 -0
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
- package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatFanStateCC.js +139 -0
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
- package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatModeCC.js +426 -0
- package/build/esm/cc/ThermostatModeCC.js.map +1 -0
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatOperatingStateCC.js +135 -0
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
- package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatSetbackCC.js +244 -0
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
- package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
- package/build/esm/cc/ThermostatSetpointCC.js +655 -0
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
- package/build/esm/cc/TimeCC.d.ts +88 -0
- package/build/esm/cc/TimeCC.d.ts.map +1 -0
- package/build/esm/cc/TimeCC.js +451 -0
- package/build/esm/cc/TimeCC.js.map +1 -0
- package/build/esm/cc/TimeParametersCC.d.ts +72 -0
- package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
- package/build/esm/cc/TimeParametersCC.js +300 -0
- package/build/esm/cc/TimeParametersCC.js.map +1 -0
- package/build/esm/cc/TransportServiceCC.d.ts +107 -0
- package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
- package/build/esm/cc/TransportServiceCC.js +422 -0
- package/build/esm/cc/TransportServiceCC.js.map +1 -0
- package/build/esm/cc/UserCodeCC.d.ts +683 -0
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
- package/build/esm/cc/UserCodeCC.js +1695 -0
- package/build/esm/cc/UserCodeCC.js.map +1 -0
- package/build/esm/cc/VersionCC.d.ts +469 -0
- package/build/esm/cc/VersionCC.d.ts.map +1 -0
- package/build/esm/cc/VersionCC.js +862 -0
- package/build/esm/cc/VersionCC.js.map +1 -0
- package/build/esm/cc/WakeUpCC.d.ts +150 -0
- package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
- package/build/esm/cc/WakeUpCC.js +438 -0
- package/build/esm/cc/WakeUpCC.js.map +1 -0
- package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
- package/build/esm/cc/WindowCoveringCC.js +780 -0
- package/build/esm/cc/WindowCoveringCC.js.map +1 -0
- package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
- package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
- package/build/esm/cc/ZWaveLongRangeCC.js +17 -0
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
- package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
- package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
- package/build/esm/cc/ZWavePlusCC.js +267 -0
- package/build/esm/cc/ZWavePlusCC.js.map +1 -0
- package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
- package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
- package/build/esm/cc/ZWaveProtocolCC.js +1030 -0
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
- package/build/esm/cc/index.d.ts +132 -0
- package/build/esm/cc/index.d.ts.map +1 -0
- package/build/esm/cc/index.js +71 -0
- package/build/esm/cc/index.js.map +1 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
- package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +385 -0
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
- package/build/esm/index.d.ts +15 -0
- package/build/esm/index.d.ts.map +1 -0
- package/build/esm/index.js +14 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/index_safe.d.ts +3 -0
- package/build/esm/index_safe.d.ts.map +1 -0
- package/build/esm/index_safe.js +4 -0
- package/build/esm/index_safe.js.map +1 -0
- package/build/esm/lib/API.d.ts +271 -0
- package/build/esm/lib/API.d.ts.map +1 -0
- package/build/esm/lib/API.js +448 -0
- package/build/esm/lib/API.js.map +1 -0
- package/build/esm/lib/CommandClass.d.ts +234 -0
- package/build/esm/lib/CommandClass.d.ts.map +1 -0
- package/build/esm/lib/CommandClass.js +781 -0
- package/build/esm/lib/CommandClass.js.map +1 -0
- package/build/esm/lib/CommandClassDecorators.d.ts +112 -0
- package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
- package/build/esm/lib/CommandClassDecorators.js +229 -0
- package/build/esm/lib/CommandClassDecorators.js.map +1 -0
- package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
- package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
- package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
- package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
- package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
- package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
- package/build/esm/lib/ICommandClassContainer.js +2 -0
- package/build/esm/lib/ICommandClassContainer.js.map +1 -0
- package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
- package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
- package/build/esm/lib/NotificationEventPayload.js +7 -0
- package/build/esm/lib/NotificationEventPayload.js.map +1 -0
- package/build/esm/lib/Security2/Extension.d.ts +106 -0
- package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
- package/build/esm/lib/Security2/Extension.js +296 -0
- package/build/esm/lib/Security2/Extension.js.map +1 -0
- package/build/esm/lib/Security2/shared.d.ts +37 -0
- package/build/esm/lib/Security2/shared.d.ts.map +1 -0
- package/build/esm/lib/Security2/shared.js +40 -0
- package/build/esm/lib/Security2/shared.js.map +1 -0
- package/build/esm/lib/SetValueResult.d.ts +55 -0
- package/build/esm/lib/SetValueResult.d.ts.map +1 -0
- package/build/esm/lib/SetValueResult.js +53 -0
- package/build/esm/lib/SetValueResult.js.map +1 -0
- package/build/esm/lib/Values.d.ts +223 -0
- package/build/esm/lib/Values.d.ts.map +1 -0
- package/build/esm/lib/Values.js +169 -0
- package/build/esm/lib/Values.js.map +1 -0
- package/build/esm/lib/_Types.d.ts +1461 -0
- package/build/esm/lib/_Types.d.ts.map +1 -0
- package/build/esm/lib/_Types.js +1432 -0
- package/build/esm/lib/_Types.js.map +1 -0
- package/build/esm/lib/serializers.d.ts +34 -0
- package/build/esm/lib/serializers.d.ts.map +1 -0
- package/build/esm/lib/serializers.js +98 -0
- package/build/esm/lib/serializers.js.map +1 -0
- package/build/esm/lib/utils.d.ts +17 -0
- package/build/esm/lib/utils.d.ts.map +1 -0
- package/build/esm/lib/utils.js +847 -0
- package/build/esm/lib/utils.js.map +1 -0
- package/build/esm/package.json +3 -0
- package/package.json +28 -23
- package/build/cc/AlarmSensorCC.d.ts +0 -194
- package/build/cc/AlarmSensorCC.d.ts.map +0 -1
- package/build/cc/AlarmSensorCC.js +0 -395
- package/build/cc/AlarmSensorCC.js.map +0 -1
- package/build/cc/AssociationCC.d.ts +0 -253
- package/build/cc/AssociationCC.d.ts.map +0 -1
- package/build/cc/AssociationCC.js +0 -732
- package/build/cc/AssociationCC.js.map +0 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
- package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
- package/build/cc/AssociationGroupInfoCC.js +0 -772
- package/build/cc/AssociationGroupInfoCC.js.map +0 -1
- package/build/cc/BarrierOperatorCC.d.ts +0 -243
- package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
- package/build/cc/BarrierOperatorCC.js +0 -613
- package/build/cc/BarrierOperatorCC.js.map +0 -1
- package/build/cc/BasicCC.d.ts +0 -191
- package/build/cc/BasicCC.d.ts.map +0 -1
- package/build/cc/BasicCC.js +0 -393
- package/build/cc/BasicCC.js.map +0 -1
- package/build/cc/BatteryCC.d.ts +0 -406
- package/build/cc/BatteryCC.d.ts.map +0 -1
- package/build/cc/BatteryCC.js +0 -516
- package/build/cc/BatteryCC.js.map +0 -1
- package/build/cc/BinarySensorCC.d.ts +0 -122
- package/build/cc/BinarySensorCC.d.ts.map +0 -1
- package/build/cc/BinarySensorCC.js +0 -420
- package/build/cc/BinarySensorCC.js.map +0 -1
- package/build/cc/BinarySwitchCC.d.ts +0 -139
- package/build/cc/BinarySwitchCC.d.ts.map +0 -1
- package/build/cc/BinarySwitchCC.js +0 -365
- package/build/cc/BinarySwitchCC.js.map +0 -1
- package/build/cc/CRC16CC.d.ts +0 -29
- package/build/cc/CRC16CC.d.ts.map +0 -1
- package/build/cc/CRC16CC.js +0 -126
- package/build/cc/CRC16CC.js.map +0 -1
- package/build/cc/CentralSceneCC.d.ts +0 -210
- package/build/cc/CentralSceneCC.d.ts.map +0 -1
- package/build/cc/CentralSceneCC.js +0 -453
- package/build/cc/CentralSceneCC.js.map +0 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
- package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
- package/build/cc/ClimateControlScheduleCC.js +0 -469
- package/build/cc/ClimateControlScheduleCC.js.map +0 -1
- package/build/cc/ClockCC.d.ts +0 -47
- package/build/cc/ClockCC.d.ts.map +0 -1
- package/build/cc/ClockCC.js +0 -208
- package/build/cc/ClockCC.js.map +0 -1
- package/build/cc/ColorSwitchCC.d.ts +0 -339
- package/build/cc/ColorSwitchCC.d.ts.map +0 -1
- package/build/cc/ColorSwitchCC.js +0 -1152
- package/build/cc/ColorSwitchCC.js.map +0 -1
- package/build/cc/ConfigurationCC.d.ts +0 -396
- package/build/cc/ConfigurationCC.d.ts.map +0 -1
- package/build/cc/ConfigurationCC.js +0 -2458
- package/build/cc/ConfigurationCC.js.map +0 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
- package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
- package/build/cc/DeviceResetLocallyCC.js +0 -76
- package/build/cc/DeviceResetLocallyCC.js.map +0 -1
- package/build/cc/DoorLockCC.d.ts +0 -837
- package/build/cc/DoorLockCC.d.ts.map +0 -1
- package/build/cc/DoorLockCC.js +0 -1273
- package/build/cc/DoorLockCC.js.map +0 -1
- package/build/cc/DoorLockLoggingCC.d.ts +0 -77
- package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
- package/build/cc/DoorLockLoggingCC.js +0 -319
- package/build/cc/DoorLockLoggingCC.js.map +0 -1
- package/build/cc/EnergyProductionCC.d.ts +0 -77
- package/build/cc/EnergyProductionCC.d.ts.map +0 -1
- package/build/cc/EnergyProductionCC.js +0 -216
- package/build/cc/EnergyProductionCC.js.map +0 -1
- package/build/cc/EntryControlCC.d.ts +0 -231
- package/build/cc/EntryControlCC.d.ts.map +0 -1
- package/build/cc/EntryControlCC.js +0 -607
- package/build/cc/EntryControlCC.js.map +0 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
- package/build/cc/HailCC.d.ts +0 -6
- package/build/cc/HailCC.d.ts.map +0 -1
- package/build/cc/HailCC.js +0 -24
- package/build/cc/HailCC.js.map +0 -1
- package/build/cc/HumidityControlModeCC.d.ts +0 -111
- package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
- package/build/cc/HumidityControlModeCC.js +0 -308
- package/build/cc/HumidityControlModeCC.js.map +0 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
- package/build/cc/HumidityControlOperatingStateCC.js +0 -140
- package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
- package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
- package/build/cc/HumidityControlSetpointCC.js +0 -648
- package/build/cc/HumidityControlSetpointCC.js.map +0 -1
- package/build/cc/InclusionControllerCC.d.ts +0 -42
- package/build/cc/InclusionControllerCC.d.ts.map +0 -1
- package/build/cc/InclusionControllerCC.js +0 -136
- package/build/cc/InclusionControllerCC.js.map +0 -1
- package/build/cc/IndicatorCC.d.ts +0 -338
- package/build/cc/IndicatorCC.d.ts.map +0 -1
- package/build/cc/IndicatorCC.js +0 -1320
- package/build/cc/IndicatorCC.js.map +0 -1
- package/build/cc/IrrigationCC.d.ts +0 -1496
- package/build/cc/IrrigationCC.d.ts.map +0 -1
- package/build/cc/IrrigationCC.js +0 -2041
- package/build/cc/IrrigationCC.js.map +0 -1
- package/build/cc/LanguageCC.d.ts +0 -101
- package/build/cc/LanguageCC.d.ts.map +0 -1
- package/build/cc/LanguageCC.js +0 -246
- package/build/cc/LanguageCC.js.map +0 -1
- package/build/cc/LockCC.d.ts +0 -73
- package/build/cc/LockCC.d.ts.map +0 -1
- package/build/cc/LockCC.js +0 -200
- package/build/cc/LockCC.js.map +0 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
- package/build/cc/ManufacturerProprietaryCC.js +0 -204
- package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
- package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
- package/build/cc/ManufacturerSpecificCC.js +0 -318
- package/build/cc/ManufacturerSpecificCC.js.map +0 -1
- package/build/cc/MeterCC.d.ts +0 -318
- package/build/cc/MeterCC.d.ts.map +0 -1
- package/build/cc/MeterCC.js +0 -1312
- package/build/cc/MeterCC.js.map +0 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
- package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
- package/build/cc/MultiChannelAssociationCC.js +0 -1007
- package/build/cc/MultiChannelAssociationCC.js.map +0 -1
- package/build/cc/MultiChannelCC.d.ts +0 -394
- package/build/cc/MultiChannelCC.d.ts.map +0 -1
- package/build/cc/MultiChannelCC.js +0 -1130
- package/build/cc/MultiChannelCC.js.map +0 -1
- package/build/cc/MultiCommandCC.d.ts +0 -27
- package/build/cc/MultiCommandCC.d.ts.map +0 -1
- package/build/cc/MultiCommandCC.js +0 -145
- package/build/cc/MultiCommandCC.js.map +0 -1
- package/build/cc/MultilevelSensorCC.d.ts +0 -185
- package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
- package/build/cc/MultilevelSensorCC.js +0 -756
- package/build/cc/MultilevelSensorCC.js.map +0 -1
- package/build/cc/MultilevelSwitchCC.d.ts +0 -357
- package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
- package/build/cc/MultilevelSwitchCC.js +0 -813
- package/build/cc/MultilevelSwitchCC.js.map +0 -1
- package/build/cc/NoOperationCC.d.ts +0 -9
- package/build/cc/NoOperationCC.d.ts.map +0 -1
- package/build/cc/NoOperationCC.js +0 -42
- package/build/cc/NoOperationCC.js.map +0 -1
- package/build/cc/NodeNamingCC.d.ts +0 -118
- package/build/cc/NodeNamingCC.d.ts.map +0 -1
- package/build/cc/NodeNamingCC.js +0 -348
- package/build/cc/NodeNamingCC.js.map +0 -1
- package/build/cc/NotificationCC.d.ts +0 -479
- package/build/cc/NotificationCC.d.ts.map +0 -1
- package/build/cc/NotificationCC.js +0 -1379
- package/build/cc/NotificationCC.js.map +0 -1
- package/build/cc/PowerlevelCC.d.ts +0 -82
- package/build/cc/PowerlevelCC.d.ts.map +0 -1
- package/build/cc/PowerlevelCC.js +0 -488
- package/build/cc/PowerlevelCC.js.map +0 -1
- package/build/cc/ProtectionCC.d.ts +0 -325
- package/build/cc/ProtectionCC.d.ts.map +0 -1
- package/build/cc/ProtectionCC.js +0 -672
- package/build/cc/ProtectionCC.js.map +0 -1
- package/build/cc/SceneActivationCC.d.ts +0 -89
- package/build/cc/SceneActivationCC.d.ts.map +0 -1
- package/build/cc/SceneActivationCC.js +0 -169
- package/build/cc/SceneActivationCC.js.map +0 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
- package/build/cc/SceneActuatorConfigurationCC.js +0 -377
- package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
- package/build/cc/SceneControllerConfigurationCC.js +0 -449
- package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
- package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
- package/build/cc/ScheduleEntryLockCC.js +0 -1829
- package/build/cc/ScheduleEntryLockCC.js.map +0 -1
- package/build/cc/Security2CC.d.ts +0 -251
- package/build/cc/Security2CC.d.ts.map +0 -1
- package/build/cc/Security2CC.js +0 -1817
- package/build/cc/Security2CC.js.map +0 -1
- package/build/cc/SecurityCC.d.ts +0 -128
- package/build/cc/SecurityCC.d.ts.map +0 -1
- package/build/cc/SecurityCC.js +0 -803
- package/build/cc/SecurityCC.js.map +0 -1
- package/build/cc/SoundSwitchCC.d.ts +0 -232
- package/build/cc/SoundSwitchCC.d.ts.map +0 -1
- package/build/cc/SoundSwitchCC.js +0 -636
- package/build/cc/SoundSwitchCC.js.map +0 -1
- package/build/cc/SupervisionCC.d.ts +0 -104
- package/build/cc/SupervisionCC.d.ts.map +0 -1
- package/build/cc/SupervisionCC.js +0 -322
- package/build/cc/SupervisionCC.js.map +0 -1
- package/build/cc/ThermostatFanModeCC.d.ts +0 -141
- package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
- package/build/cc/ThermostatFanModeCC.js +0 -362
- package/build/cc/ThermostatFanModeCC.js.map +0 -1
- package/build/cc/ThermostatFanStateCC.d.ts +0 -60
- package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
- package/build/cc/ThermostatFanStateCC.js +0 -142
- package/build/cc/ThermostatFanStateCC.js.map +0 -1
- package/build/cc/ThermostatModeCC.d.ts +0 -150
- package/build/cc/ThermostatModeCC.d.ts.map +0 -1
- package/build/cc/ThermostatModeCC.js +0 -429
- package/build/cc/ThermostatModeCC.js.map +0 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
- package/build/cc/ThermostatOperatingStateCC.js +0 -138
- package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
- package/build/cc/ThermostatSetbackCC.d.ts +0 -46
- package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
- package/build/cc/ThermostatSetbackCC.js +0 -247
- package/build/cc/ThermostatSetbackCC.js.map +0 -1
- package/build/cc/ThermostatSetpointCC.d.ts +0 -197
- package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
- package/build/cc/ThermostatSetpointCC.js +0 -658
- package/build/cc/ThermostatSetpointCC.js.map +0 -1
- package/build/cc/TimeCC.d.ts +0 -88
- package/build/cc/TimeCC.d.ts.map +0 -1
- package/build/cc/TimeCC.js +0 -454
- package/build/cc/TimeCC.js.map +0 -1
- package/build/cc/TimeParametersCC.d.ts +0 -72
- package/build/cc/TimeParametersCC.d.ts.map +0 -1
- package/build/cc/TimeParametersCC.js +0 -303
- package/build/cc/TimeParametersCC.js.map +0 -1
- package/build/cc/TransportServiceCC.d.ts +0 -107
- package/build/cc/TransportServiceCC.d.ts.map +0 -1
- package/build/cc/TransportServiceCC.js +0 -426
- package/build/cc/TransportServiceCC.js.map +0 -1
- package/build/cc/UserCodeCC.d.ts +0 -683
- package/build/cc/UserCodeCC.d.ts.map +0 -1
- package/build/cc/UserCodeCC.js +0 -1699
- package/build/cc/UserCodeCC.js.map +0 -1
- package/build/cc/VersionCC.d.ts +0 -469
- package/build/cc/VersionCC.d.ts.map +0 -1
- package/build/cc/VersionCC.js +0 -865
- package/build/cc/VersionCC.js.map +0 -1
- package/build/cc/WakeUpCC.d.ts +0 -150
- package/build/cc/WakeUpCC.d.ts.map +0 -1
- package/build/cc/WakeUpCC.js +0 -441
- package/build/cc/WakeUpCC.js.map +0 -1
- package/build/cc/WindowCoveringCC.d.ts +0 -315
- package/build/cc/WindowCoveringCC.d.ts.map +0 -1
- package/build/cc/WindowCoveringCC.js +0 -783
- package/build/cc/WindowCoveringCC.js.map +0 -1
- package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
- package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
- package/build/cc/ZWaveLongRangeCC.js +0 -20
- package/build/cc/ZWaveLongRangeCC.js.map +0 -1
- package/build/cc/ZWavePlusCC.d.ts +0 -163
- package/build/cc/ZWavePlusCC.d.ts.map +0 -1
- package/build/cc/ZWavePlusCC.js +0 -270
- package/build/cc/ZWavePlusCC.js.map +0 -1
- package/build/cc/ZWaveProtocolCC.d.ts +0 -344
- package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
- package/build/cc/ZWaveProtocolCC.js +0 -1033
- package/build/cc/ZWaveProtocolCC.js.map +0 -1
- package/build/cc/index.d.ts +0 -132
- package/build/cc/index.d.ts.map +0 -1
- package/build/cc/index.js +0 -627
- package/build/cc/index.js.map +0 -1
- package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
- package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
- package/build/cc/manufacturerProprietary/Decorators.js +0 -83
- package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
- package/build/index.d.ts +0 -15
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -52
- package/build/index.js.map +0 -1
- package/build/index_safe.d.ts +0 -3
- package/build/index_safe.d.ts.map +0 -1
- package/build/index_safe.js +0 -20
- package/build/index_safe.js.map +0 -1
- package/build/lib/API.d.ts +0 -271
- package/build/lib/API.d.ts.map +0 -1
- package/build/lib/API.js +0 -458
- package/build/lib/API.js.map +0 -1
- package/build/lib/CommandClass.d.ts +0 -234
- package/build/lib/CommandClass.d.ts.map +0 -1
- package/build/lib/CommandClass.js +0 -788
- package/build/lib/CommandClass.js.map +0 -1
- package/build/lib/CommandClassDecorators.d.ts +0 -112
- package/build/lib/CommandClassDecorators.d.ts.map +0 -1
- package/build/lib/CommandClassDecorators.js +0 -243
- package/build/lib/CommandClassDecorators.js.map +0 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
- package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
- package/build/lib/EncapsulatingCommandClass.js +0 -61
- package/build/lib/EncapsulatingCommandClass.js.map +0 -1
- package/build/lib/ICommandClassContainer.d.ts.map +0 -1
- package/build/lib/ICommandClassContainer.js +0 -3
- package/build/lib/ICommandClassContainer.js.map +0 -1
- package/build/lib/NotificationEventPayload.d.ts +0 -10
- package/build/lib/NotificationEventPayload.d.ts.map +0 -1
- package/build/lib/NotificationEventPayload.js +0 -10
- package/build/lib/NotificationEventPayload.js.map +0 -1
- package/build/lib/Security2/Extension.d.ts.map +0 -1
- package/build/lib/Security2/Extension.js +0 -303
- package/build/lib/Security2/Extension.js.map +0 -1
- package/build/lib/Security2/shared.d.ts.map +0 -1
- package/build/lib/Security2/shared.js +0 -43
- package/build/lib/Security2/shared.js.map +0 -1
- package/build/lib/SetValueResult.d.ts.map +0 -1
- package/build/lib/SetValueResult.js +0 -60
- package/build/lib/SetValueResult.js.map +0 -1
- package/build/lib/Values.d.ts +0 -223
- package/build/lib/Values.d.ts.map +0 -1
- package/build/lib/Values.js +0 -172
- package/build/lib/Values.js.map +0 -1
- package/build/lib/_Types.d.ts.map +0 -1
- package/build/lib/_Types.js +0 -1443
- package/build/lib/_Types.js.map +0 -1
- package/build/lib/serializers.d.ts +0 -34
- package/build/lib/serializers.d.ts.map +0 -1
- package/build/lib/serializers.js +0 -107
- package/build/lib/serializers.js.map +0 -1
- package/build/lib/utils.d.ts +0 -17
- package/build/lib/utils.d.ts.map +0 -1
- package/build/lib/utils.js +0 -860
- package/build/lib/utils.js.map +0 -1
- /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
- /package/build/{lib → cjs/lib}/Security2/Extension.d.ts +0 -0
- /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
- /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
- /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
|
@@ -1,1152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var ColorSwitchCCSupportedReport_1, ColorSwitchCCReport_1, ColorSwitchCCGet_1, ColorSwitchCCSet_1, ColorSwitchCCStartLevelChange_1, ColorSwitchCCStopLevelChange_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ColorSwitchCCStopLevelChange = exports.ColorSwitchCCStartLevelChange = exports.ColorSwitchCCSet = exports.ColorSwitchCCGet = exports.ColorSwitchCCReport = exports.ColorSwitchCCSupportedGet = exports.ColorSwitchCCSupportedReport = exports.ColorSwitchCC = exports.ColorSwitchCCAPI = exports.ColorSwitchCCValues = void 0;
|
|
11
|
-
function __assertType(argName, typeName, boundHasError) {
|
|
12
|
-
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
13
|
-
if (boundHasError()) {
|
|
14
|
-
throw new ZWaveError(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes.Argument_Invalid);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
const __assertType__ColorComponent = $o => {
|
|
18
|
-
function su__1__2__3__4__5__6__7__8__9_eu($o) {
|
|
19
|
-
return ![0, 1, 2, 3, 4, 5, 6, 7, 8].includes($o) ? {} : null;
|
|
20
|
-
}
|
|
21
|
-
return su__1__2__3__4__5__6__7__8__9_eu($o);
|
|
22
|
-
};
|
|
23
|
-
const __assertType__ColorSwitchCCSetOptions = $o => {
|
|
24
|
-
function _undefined($o) {
|
|
25
|
-
return $o !== undefined ? {} : null;
|
|
26
|
-
}
|
|
27
|
-
function _number($o) {
|
|
28
|
-
return typeof $o !== "number" ? {} : null;
|
|
29
|
-
}
|
|
30
|
-
function su__undefined__number_eu($o) {
|
|
31
|
-
const conditions = [_undefined, _number];
|
|
32
|
-
for (const condition of conditions) {
|
|
33
|
-
const error = condition($o);
|
|
34
|
-
if (!error)
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
function _2($o) {
|
|
40
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
41
|
-
return {};
|
|
42
|
-
if ("warmWhite" in $o && $o["warmWhite"] !== undefined) {
|
|
43
|
-
const error = su__undefined__number_eu($o["warmWhite"]);
|
|
44
|
-
if (error)
|
|
45
|
-
return error;
|
|
46
|
-
}
|
|
47
|
-
if ("coldWhite" in $o && $o["coldWhite"] !== undefined) {
|
|
48
|
-
const error = su__undefined__number_eu($o["coldWhite"]);
|
|
49
|
-
if (error)
|
|
50
|
-
return error;
|
|
51
|
-
}
|
|
52
|
-
if ("red" in $o && $o["red"] !== undefined) {
|
|
53
|
-
const error = su__undefined__number_eu($o["red"]);
|
|
54
|
-
if (error)
|
|
55
|
-
return error;
|
|
56
|
-
}
|
|
57
|
-
if ("green" in $o && $o["green"] !== undefined) {
|
|
58
|
-
const error = su__undefined__number_eu($o["green"]);
|
|
59
|
-
if (error)
|
|
60
|
-
return error;
|
|
61
|
-
}
|
|
62
|
-
if ("blue" in $o && $o["blue"] !== undefined) {
|
|
63
|
-
const error = su__undefined__number_eu($o["blue"]);
|
|
64
|
-
if (error)
|
|
65
|
-
return error;
|
|
66
|
-
}
|
|
67
|
-
if ("amber" in $o && $o["amber"] !== undefined) {
|
|
68
|
-
const error = su__undefined__number_eu($o["amber"]);
|
|
69
|
-
if (error)
|
|
70
|
-
return error;
|
|
71
|
-
}
|
|
72
|
-
if ("cyan" in $o && $o["cyan"] !== undefined) {
|
|
73
|
-
const error = su__undefined__number_eu($o["cyan"]);
|
|
74
|
-
if (error)
|
|
75
|
-
return error;
|
|
76
|
-
}
|
|
77
|
-
if ("purple" in $o && $o["purple"] !== undefined) {
|
|
78
|
-
const error = su__undefined__number_eu($o["purple"]);
|
|
79
|
-
if (error)
|
|
80
|
-
return error;
|
|
81
|
-
}
|
|
82
|
-
if ("index" in $o && $o["index"] !== undefined) {
|
|
83
|
-
const error = su__undefined__number_eu($o["index"]);
|
|
84
|
-
if (error)
|
|
85
|
-
return error;
|
|
86
|
-
}
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
function _string($o) {
|
|
90
|
-
return typeof $o !== "string" ? {} : null;
|
|
91
|
-
}
|
|
92
|
-
function _13($o) {
|
|
93
|
-
return !($o instanceof require("@zwave-js/core").Duration) ? {} : null;
|
|
94
|
-
}
|
|
95
|
-
function su__string__13_eu($o) {
|
|
96
|
-
const conditions = [_string, _13];
|
|
97
|
-
for (const condition of conditions) {
|
|
98
|
-
const error = condition($o);
|
|
99
|
-
if (!error)
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
return {};
|
|
103
|
-
}
|
|
104
|
-
function _3($o) {
|
|
105
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
106
|
-
return {};
|
|
107
|
-
if ("duration" in $o && $o["duration"] !== undefined) {
|
|
108
|
-
const error = su__string__13_eu($o["duration"]);
|
|
109
|
-
if (error)
|
|
110
|
-
return error;
|
|
111
|
-
}
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
function si__2__3_ei($o) {
|
|
115
|
-
const conditions = [_2, _3];
|
|
116
|
-
for (const condition of conditions) {
|
|
117
|
-
const error = condition($o);
|
|
118
|
-
if (error)
|
|
119
|
-
return error;
|
|
120
|
-
}
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
function _5($o) {
|
|
124
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
125
|
-
return {};
|
|
126
|
-
if ("0" in $o && $o["0"] !== undefined) {
|
|
127
|
-
const error = su__undefined__number_eu($o["0"]);
|
|
128
|
-
if (error)
|
|
129
|
-
return error;
|
|
130
|
-
}
|
|
131
|
-
if ("1" in $o && $o["1"] !== undefined) {
|
|
132
|
-
const error = su__undefined__number_eu($o["1"]);
|
|
133
|
-
if (error)
|
|
134
|
-
return error;
|
|
135
|
-
}
|
|
136
|
-
if ("2" in $o && $o["2"] !== undefined) {
|
|
137
|
-
const error = su__undefined__number_eu($o["2"]);
|
|
138
|
-
if (error)
|
|
139
|
-
return error;
|
|
140
|
-
}
|
|
141
|
-
if ("3" in $o && $o["3"] !== undefined) {
|
|
142
|
-
const error = su__undefined__number_eu($o["3"]);
|
|
143
|
-
if (error)
|
|
144
|
-
return error;
|
|
145
|
-
}
|
|
146
|
-
if ("4" in $o && $o["4"] !== undefined) {
|
|
147
|
-
const error = su__undefined__number_eu($o["4"]);
|
|
148
|
-
if (error)
|
|
149
|
-
return error;
|
|
150
|
-
}
|
|
151
|
-
if ("5" in $o && $o["5"] !== undefined) {
|
|
152
|
-
const error = su__undefined__number_eu($o["5"]);
|
|
153
|
-
if (error)
|
|
154
|
-
return error;
|
|
155
|
-
}
|
|
156
|
-
if ("6" in $o && $o["6"] !== undefined) {
|
|
157
|
-
const error = su__undefined__number_eu($o["6"]);
|
|
158
|
-
if (error)
|
|
159
|
-
return error;
|
|
160
|
-
}
|
|
161
|
-
if ("7" in $o && $o["7"] !== undefined) {
|
|
162
|
-
const error = su__undefined__number_eu($o["7"]);
|
|
163
|
-
if (error)
|
|
164
|
-
return error;
|
|
165
|
-
}
|
|
166
|
-
if ("8" in $o && $o["8"] !== undefined) {
|
|
167
|
-
const error = su__undefined__number_eu($o["8"]);
|
|
168
|
-
if (error)
|
|
169
|
-
return error;
|
|
170
|
-
}
|
|
171
|
-
return null;
|
|
172
|
-
}
|
|
173
|
-
function si__5__3_ei($o) {
|
|
174
|
-
const conditions = [_5, _3];
|
|
175
|
-
for (const condition of conditions) {
|
|
176
|
-
const error = condition($o);
|
|
177
|
-
if (error)
|
|
178
|
-
return error;
|
|
179
|
-
}
|
|
180
|
-
return null;
|
|
181
|
-
}
|
|
182
|
-
function _7($o) {
|
|
183
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
184
|
-
return {};
|
|
185
|
-
if ("hexColor" in $o && $o["hexColor"] !== undefined) {
|
|
186
|
-
const error = _string($o["hexColor"]);
|
|
187
|
-
if (error)
|
|
188
|
-
return error;
|
|
189
|
-
}
|
|
190
|
-
else
|
|
191
|
-
return {};
|
|
192
|
-
return null;
|
|
193
|
-
}
|
|
194
|
-
function si__7__3_ei($o) {
|
|
195
|
-
const conditions = [_7, _3];
|
|
196
|
-
for (const condition of conditions) {
|
|
197
|
-
const error = condition($o);
|
|
198
|
-
if (error)
|
|
199
|
-
return error;
|
|
200
|
-
}
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
function su_si__2__3_ei_si__5__3_ei_si__7__3_ei_eu($o) {
|
|
204
|
-
const conditions = [si__2__3_ei, si__5__3_ei, si__7__3_ei];
|
|
205
|
-
for (const condition of conditions) {
|
|
206
|
-
const error = condition($o);
|
|
207
|
-
if (!error)
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
|
-
return {};
|
|
211
|
-
}
|
|
212
|
-
return su_si__2__3_ei_si__5__3_ei_si__7__3_ei_eu($o);
|
|
213
|
-
};
|
|
214
|
-
const __assertType__ColorSwitchCCStartLevelChangeOptions = $o => {
|
|
215
|
-
function su__8__9__10__11__12__13__14__15__16_eu($o) {
|
|
216
|
-
return ![0, 1, 2, 3, 4, 5, 6, 7, 8].includes($o) ? {} : null;
|
|
217
|
-
}
|
|
218
|
-
function _18($o) {
|
|
219
|
-
return $o !== "up" ? {} : null;
|
|
220
|
-
}
|
|
221
|
-
function _19($o) {
|
|
222
|
-
return $o !== "down" ? {} : null;
|
|
223
|
-
}
|
|
224
|
-
function su__18__19_eu($o) {
|
|
225
|
-
const conditions = [_18, _19];
|
|
226
|
-
for (const condition of conditions) {
|
|
227
|
-
const error = condition($o);
|
|
228
|
-
if (!error)
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
return {};
|
|
232
|
-
}
|
|
233
|
-
function _2($o) {
|
|
234
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
235
|
-
return {};
|
|
236
|
-
if ("colorComponent" in $o && $o["colorComponent"] !== undefined) {
|
|
237
|
-
const error = su__8__9__10__11__12__13__14__15__16_eu($o["colorComponent"]);
|
|
238
|
-
if (error)
|
|
239
|
-
return error;
|
|
240
|
-
}
|
|
241
|
-
else
|
|
242
|
-
return {};
|
|
243
|
-
if ("direction" in $o && $o["direction"] !== undefined) {
|
|
244
|
-
const error = su__18__19_eu($o["direction"]);
|
|
245
|
-
if (error)
|
|
246
|
-
return error;
|
|
247
|
-
}
|
|
248
|
-
else
|
|
249
|
-
return {};
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
function _true($o) {
|
|
253
|
-
return $o !== true ? {} : null;
|
|
254
|
-
}
|
|
255
|
-
function _number($o) {
|
|
256
|
-
return typeof $o !== "number" ? {} : null;
|
|
257
|
-
}
|
|
258
|
-
function _3($o) {
|
|
259
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
260
|
-
return {};
|
|
261
|
-
if ("ignoreStartLevel" in $o && $o["ignoreStartLevel"] !== undefined) {
|
|
262
|
-
const error = _true($o["ignoreStartLevel"]);
|
|
263
|
-
if (error)
|
|
264
|
-
return error;
|
|
265
|
-
}
|
|
266
|
-
else
|
|
267
|
-
return {};
|
|
268
|
-
if ("startLevel" in $o && $o["startLevel"] !== undefined) {
|
|
269
|
-
const error = _number($o["startLevel"]);
|
|
270
|
-
if (error)
|
|
271
|
-
return error;
|
|
272
|
-
}
|
|
273
|
-
return null;
|
|
274
|
-
}
|
|
275
|
-
function _string($o) {
|
|
276
|
-
return typeof $o !== "string" ? {} : null;
|
|
277
|
-
}
|
|
278
|
-
function _22($o) {
|
|
279
|
-
return !($o instanceof require("@zwave-js/core").Duration) ? {} : null;
|
|
280
|
-
}
|
|
281
|
-
function su__string__22_eu($o) {
|
|
282
|
-
const conditions = [_string, _22];
|
|
283
|
-
for (const condition of conditions) {
|
|
284
|
-
const error = condition($o);
|
|
285
|
-
if (!error)
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
return {};
|
|
289
|
-
}
|
|
290
|
-
function _4($o) {
|
|
291
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
292
|
-
return {};
|
|
293
|
-
if ("duration" in $o && $o["duration"] !== undefined) {
|
|
294
|
-
const error = su__string__22_eu($o["duration"]);
|
|
295
|
-
if (error)
|
|
296
|
-
return error;
|
|
297
|
-
}
|
|
298
|
-
return null;
|
|
299
|
-
}
|
|
300
|
-
function si__2__3__4_ei($o) {
|
|
301
|
-
const conditions = [_2, _3, _4];
|
|
302
|
-
for (const condition of conditions) {
|
|
303
|
-
const error = condition($o);
|
|
304
|
-
if (error)
|
|
305
|
-
return error;
|
|
306
|
-
}
|
|
307
|
-
return null;
|
|
308
|
-
}
|
|
309
|
-
function _false($o) {
|
|
310
|
-
return $o !== false ? {} : null;
|
|
311
|
-
}
|
|
312
|
-
function _6($o) {
|
|
313
|
-
if (typeof $o !== "object" || $o === null || Array.isArray($o))
|
|
314
|
-
return {};
|
|
315
|
-
if ("ignoreStartLevel" in $o && $o["ignoreStartLevel"] !== undefined) {
|
|
316
|
-
const error = _false($o["ignoreStartLevel"]);
|
|
317
|
-
if (error)
|
|
318
|
-
return error;
|
|
319
|
-
}
|
|
320
|
-
else
|
|
321
|
-
return {};
|
|
322
|
-
if ("startLevel" in $o && $o["startLevel"] !== undefined) {
|
|
323
|
-
const error = _number($o["startLevel"]);
|
|
324
|
-
if (error)
|
|
325
|
-
return error;
|
|
326
|
-
}
|
|
327
|
-
else
|
|
328
|
-
return {};
|
|
329
|
-
return null;
|
|
330
|
-
}
|
|
331
|
-
function si__2__6__4_ei($o) {
|
|
332
|
-
const conditions = [_2, _6, _4];
|
|
333
|
-
for (const condition of conditions) {
|
|
334
|
-
const error = condition($o);
|
|
335
|
-
if (error)
|
|
336
|
-
return error;
|
|
337
|
-
}
|
|
338
|
-
return null;
|
|
339
|
-
}
|
|
340
|
-
function su_si__2__3__4_ei_si__2__6__4_ei_eu($o) {
|
|
341
|
-
const conditions = [si__2__3__4_ei, si__2__6__4_ei];
|
|
342
|
-
for (const condition of conditions) {
|
|
343
|
-
const error = condition($o);
|
|
344
|
-
if (!error)
|
|
345
|
-
return null;
|
|
346
|
-
}
|
|
347
|
-
return {};
|
|
348
|
-
}
|
|
349
|
-
return su_si__2__3__4_ei_si__2__6__4_ei_eu($o);
|
|
350
|
-
};
|
|
351
|
-
const core_1 = require("@zwave-js/core");
|
|
352
|
-
const safe_1 = require("@zwave-js/core/safe");
|
|
353
|
-
const safe_2 = require("@zwave-js/shared/safe");
|
|
354
|
-
const safe_3 = require("@zwave-js/shared/safe");
|
|
355
|
-
const math_1 = require("alcalzone-shared/math");
|
|
356
|
-
const typeguards_1 = require("alcalzone-shared/typeguards");
|
|
357
|
-
const API_1 = require("../lib/API");
|
|
358
|
-
const CommandClass_1 = require("../lib/CommandClass");
|
|
359
|
-
const CommandClassDecorators_1 = require("../lib/CommandClassDecorators");
|
|
360
|
-
const Values_1 = require("../lib/Values");
|
|
361
|
-
const _Types_1 = require("../lib/_Types");
|
|
362
|
-
const hexColorRegex = /^#?(?<red>[0-9a-f]{2})(?<green>[0-9a-f]{2})(?<blue>[0-9a-f]{2})$/i;
|
|
363
|
-
const colorTableKeys = [
|
|
364
|
-
...(0, safe_3.keysOf)(_Types_1.ColorComponent),
|
|
365
|
-
...(0, safe_3.keysOf)(_Types_1.ColorComponentMap),
|
|
366
|
-
];
|
|
367
|
-
function colorTableKeyToComponent(key) {
|
|
368
|
-
if (/^\d+$/.test(key)) {
|
|
369
|
-
return parseInt(key, 10);
|
|
370
|
-
}
|
|
371
|
-
else if (key in _Types_1.ColorComponentMap) {
|
|
372
|
-
return _Types_1.ColorComponentMap[key];
|
|
373
|
-
}
|
|
374
|
-
else if (key in _Types_1.ColorComponent) {
|
|
375
|
-
return _Types_1.ColorComponent[key];
|
|
376
|
-
}
|
|
377
|
-
throw new core_1.ZWaveError(`Invalid color key ${key}!`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
378
|
-
}
|
|
379
|
-
function colorComponentToTableKey(component) {
|
|
380
|
-
for (const [key, comp] of Object.entries(_Types_1.ColorComponentMap)) {
|
|
381
|
-
if (comp === component)
|
|
382
|
-
return key;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
exports.ColorSwitchCCValues = Object.freeze({
|
|
386
|
-
...Values_1.V.defineStaticCCValues(core_1.CommandClasses["Color Switch"], {
|
|
387
|
-
...Values_1.V.staticProperty("supportedColorComponents", undefined, {
|
|
388
|
-
internal: true,
|
|
389
|
-
}),
|
|
390
|
-
...Values_1.V.staticProperty("supportsHexColor", undefined, {
|
|
391
|
-
internal: true,
|
|
392
|
-
}),
|
|
393
|
-
// The compound color (static)
|
|
394
|
-
...Values_1.V.staticPropertyWithName("currentColor", "currentColor", {
|
|
395
|
-
...core_1.ValueMetadata.ReadOnly,
|
|
396
|
-
label: `Current color`,
|
|
397
|
-
}),
|
|
398
|
-
...Values_1.V.staticPropertyWithName("targetColor", "targetColor", {
|
|
399
|
-
...core_1.ValueMetadata.Any,
|
|
400
|
-
label: `Target color`,
|
|
401
|
-
valueChangeOptions: ["transitionDuration"],
|
|
402
|
-
}),
|
|
403
|
-
...Values_1.V.staticProperty("duration", {
|
|
404
|
-
...core_1.ValueMetadata.ReadOnlyDuration,
|
|
405
|
-
label: "Remaining duration",
|
|
406
|
-
}),
|
|
407
|
-
// The compound color as HEX
|
|
408
|
-
...Values_1.V.staticProperty("hexColor", {
|
|
409
|
-
...core_1.ValueMetadata.Color,
|
|
410
|
-
minLength: 6,
|
|
411
|
-
maxLength: 7, // to allow #rrggbb
|
|
412
|
-
label: `RGB Color`,
|
|
413
|
-
valueChangeOptions: ["transitionDuration"],
|
|
414
|
-
}),
|
|
415
|
-
}),
|
|
416
|
-
...Values_1.V.defineDynamicCCValues(core_1.CommandClasses["Color Switch"], {
|
|
417
|
-
// The individual color channels (dynamic)
|
|
418
|
-
...Values_1.V.dynamicPropertyAndKeyWithName("currentColorChannel", "currentColor", (component) => component, ({ property, propertyKey }) => property === "currentColor" && typeof propertyKey === "number", (component) => {
|
|
419
|
-
const colorName = (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, component);
|
|
420
|
-
return {
|
|
421
|
-
...core_1.ValueMetadata.ReadOnlyUInt8,
|
|
422
|
-
label: `Current value (${colorName})`,
|
|
423
|
-
description: `The current value of the ${colorName} channel.`,
|
|
424
|
-
};
|
|
425
|
-
}),
|
|
426
|
-
...Values_1.V.dynamicPropertyAndKeyWithName("targetColorChannel", "targetColor", (component) => component, ({ property, propertyKey }) => property === "targetColor" && typeof propertyKey === "number", (component) => {
|
|
427
|
-
const colorName = (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, component);
|
|
428
|
-
return {
|
|
429
|
-
...core_1.ValueMetadata.UInt8,
|
|
430
|
-
label: `Target value (${colorName})`,
|
|
431
|
-
description: `The target value of the ${colorName} channel.`,
|
|
432
|
-
valueChangeOptions: ["transitionDuration"],
|
|
433
|
-
};
|
|
434
|
-
}),
|
|
435
|
-
}),
|
|
436
|
-
});
|
|
437
|
-
let ColorSwitchCCAPI = class ColorSwitchCCAPI extends API_1.CCAPI {
|
|
438
|
-
supportsCommand(cmd) {
|
|
439
|
-
switch (cmd) {
|
|
440
|
-
case _Types_1.ColorSwitchCommand.SupportedGet:
|
|
441
|
-
case _Types_1.ColorSwitchCommand.Get:
|
|
442
|
-
return this.isSinglecast();
|
|
443
|
-
case _Types_1.ColorSwitchCommand.Set:
|
|
444
|
-
case _Types_1.ColorSwitchCommand.StartLevelChange:
|
|
445
|
-
case _Types_1.ColorSwitchCommand.StopLevelChange:
|
|
446
|
-
return true; // These are mandatory
|
|
447
|
-
}
|
|
448
|
-
return super.supportsCommand(cmd);
|
|
449
|
-
}
|
|
450
|
-
async getSupported() {
|
|
451
|
-
this.assertSupportsCommand(_Types_1.ColorSwitchCommand, _Types_1.ColorSwitchCommand.SupportedGet);
|
|
452
|
-
const cc = new ColorSwitchCCSupportedGet({
|
|
453
|
-
nodeId: this.endpoint.nodeId,
|
|
454
|
-
endpointIndex: this.endpoint.index,
|
|
455
|
-
});
|
|
456
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
457
|
-
return response?.supportedColorComponents;
|
|
458
|
-
}
|
|
459
|
-
async get(component) {
|
|
460
|
-
__assertType("component", "ColorComponent", __assertType__ColorComponent.bind(void 0, component));
|
|
461
|
-
this.assertSupportsCommand(_Types_1.ColorSwitchCommand, _Types_1.ColorSwitchCommand.Get);
|
|
462
|
-
const cc = new ColorSwitchCCGet({
|
|
463
|
-
nodeId: this.endpoint.nodeId,
|
|
464
|
-
endpointIndex: this.endpoint.index,
|
|
465
|
-
colorComponent: component,
|
|
466
|
-
});
|
|
467
|
-
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
468
|
-
if (response) {
|
|
469
|
-
return (0, safe_3.pick)(response, ["currentValue", "targetValue", "duration"]);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
async set(options) {
|
|
473
|
-
__assertType("options", "ColorSwitchCCSetOptions", __assertType__ColorSwitchCCSetOptions.bind(void 0, options));
|
|
474
|
-
this.assertSupportsCommand(_Types_1.ColorSwitchCommand, _Types_1.ColorSwitchCommand.Set);
|
|
475
|
-
const cc = new ColorSwitchCCSet({
|
|
476
|
-
nodeId: this.endpoint.nodeId,
|
|
477
|
-
endpointIndex: this.endpoint.index,
|
|
478
|
-
...options,
|
|
479
|
-
});
|
|
480
|
-
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
481
|
-
if ((0, core_1.isUnsupervisedOrSucceeded)(result)) {
|
|
482
|
-
// If the command did not fail, assume that it succeeded and update the values accordingly
|
|
483
|
-
// TODO: The API methods should not modify the value DB directly, but to do so
|
|
484
|
-
// this requires a nicer way of synchronizing hexColor with the others
|
|
485
|
-
if (this.isSinglecast()) {
|
|
486
|
-
// Update each color component separately and record the changes to the compound value
|
|
487
|
-
this.updateCurrentColor(this.getValueDB(), cc.colorTable);
|
|
488
|
-
}
|
|
489
|
-
else if (this.isMulticast()) {
|
|
490
|
-
// Figure out which nodes were affected by this command
|
|
491
|
-
const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node
|
|
492
|
-
.getEndpoint(this.endpoint.index)
|
|
493
|
-
?.supportsCC(this.ccId));
|
|
494
|
-
// and optimistically update the currentColor
|
|
495
|
-
for (const node of affectedNodes) {
|
|
496
|
-
const valueDB = this.host.tryGetValueDB(node.id);
|
|
497
|
-
if (valueDB) {
|
|
498
|
-
this.updateCurrentColor(valueDB, cc.colorTable);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
return result;
|
|
504
|
-
}
|
|
505
|
-
/** Updates the current color for a given node by merging in the given changes */
|
|
506
|
-
updateCurrentColor(valueDB, colorTable) {
|
|
507
|
-
let updatedRGB = false;
|
|
508
|
-
const currentColorValueId = exports.ColorSwitchCCValues.currentColor.endpoint(this.endpoint.index);
|
|
509
|
-
const targetColorValueId = exports.ColorSwitchCCValues.targetColor.endpoint(this.endpoint.index);
|
|
510
|
-
const currentCompoundColor = valueDB.getValue(currentColorValueId) ?? {};
|
|
511
|
-
const targetCompoundColor = valueDB.getValue(targetColorValueId) ?? {};
|
|
512
|
-
for (const [key, value] of Object.entries(colorTable)) {
|
|
513
|
-
const component = colorTableKeyToComponent(key);
|
|
514
|
-
if (component === _Types_1.ColorComponent.Red
|
|
515
|
-
|| component === _Types_1.ColorComponent.Green
|
|
516
|
-
|| component === _Types_1.ColorComponent.Blue) {
|
|
517
|
-
updatedRGB = true;
|
|
518
|
-
}
|
|
519
|
-
valueDB.setValue(exports.ColorSwitchCCValues.currentColorChannel(component).endpoint(this.endpoint.index), value);
|
|
520
|
-
// Update the compound value
|
|
521
|
-
if (key in _Types_1.ColorComponentMap) {
|
|
522
|
-
currentCompoundColor[key] = value;
|
|
523
|
-
targetCompoundColor[key] = value;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
// And store the updated compound values
|
|
527
|
-
valueDB.setValue(currentColorValueId, currentCompoundColor);
|
|
528
|
-
valueDB.setValue(targetColorValueId, targetCompoundColor);
|
|
529
|
-
// and hex color if necessary
|
|
530
|
-
const supportsHex = valueDB.getValue(exports.ColorSwitchCCValues.supportsHexColor.endpoint(this.endpoint.index));
|
|
531
|
-
if (supportsHex && updatedRGB) {
|
|
532
|
-
const hexValueId = exports.ColorSwitchCCValues.hexColor.endpoint(this.endpoint.index);
|
|
533
|
-
const [r, g, b] = [
|
|
534
|
-
_Types_1.ColorComponent.Red,
|
|
535
|
-
_Types_1.ColorComponent.Green,
|
|
536
|
-
_Types_1.ColorComponent.Blue,
|
|
537
|
-
].map((c) => valueDB.getValue(exports.ColorSwitchCCValues.currentColorChannel(c).endpoint(this.endpoint.index)) ?? 0);
|
|
538
|
-
const hexValue = (r << 16) | (g << 8) | b;
|
|
539
|
-
valueDB.setValue(hexValueId, hexValue.toString(16).padStart(6, "0"));
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
async startLevelChange(options) {
|
|
543
|
-
__assertType("options", "ColorSwitchCCStartLevelChangeOptions", __assertType__ColorSwitchCCStartLevelChangeOptions.bind(void 0, options));
|
|
544
|
-
this.assertSupportsCommand(_Types_1.ColorSwitchCommand, _Types_1.ColorSwitchCommand.StartLevelChange);
|
|
545
|
-
const cc = new ColorSwitchCCStartLevelChange({
|
|
546
|
-
nodeId: this.endpoint.nodeId,
|
|
547
|
-
endpointIndex: this.endpoint.index,
|
|
548
|
-
...options,
|
|
549
|
-
});
|
|
550
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
551
|
-
}
|
|
552
|
-
async stopLevelChange(colorComponent) {
|
|
553
|
-
__assertType("colorComponent", "ColorComponent", __assertType__ColorComponent.bind(void 0, colorComponent));
|
|
554
|
-
this.assertSupportsCommand(_Types_1.ColorSwitchCommand, _Types_1.ColorSwitchCommand.StopLevelChange);
|
|
555
|
-
const cc = new ColorSwitchCCStopLevelChange({
|
|
556
|
-
nodeId: this.endpoint.nodeId,
|
|
557
|
-
endpointIndex: this.endpoint.index,
|
|
558
|
-
colorComponent,
|
|
559
|
-
});
|
|
560
|
-
return this.host.sendCommand(cc, this.commandOptions);
|
|
561
|
-
}
|
|
562
|
-
get [API_1.SET_VALUE]() {
|
|
563
|
-
return async function ({ property, propertyKey }, value, options) {
|
|
564
|
-
if (property === "targetColor") {
|
|
565
|
-
const duration = core_1.Duration.from(options?.transitionDuration);
|
|
566
|
-
if (propertyKey != undefined) {
|
|
567
|
-
// Single color component, only accepts numbers
|
|
568
|
-
if (typeof propertyKey !== "number") {
|
|
569
|
-
(0, API_1.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
570
|
-
}
|
|
571
|
-
else if (typeof value !== "number") {
|
|
572
|
-
(0, API_1.throwWrongValueType)(this.ccId, property, "number", typeof value);
|
|
573
|
-
}
|
|
574
|
-
const result = await this.set({
|
|
575
|
-
[propertyKey]: value,
|
|
576
|
-
duration,
|
|
577
|
-
});
|
|
578
|
-
if (this.isSinglecast()
|
|
579
|
-
&& !(0, core_1.supervisedCommandSucceeded)(result)) {
|
|
580
|
-
// Verify the current value after a (short) delay, unless the command was supervised and successful
|
|
581
|
-
this.schedulePoll({ property, propertyKey }, value, {
|
|
582
|
-
duration,
|
|
583
|
-
transition: "fast",
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
return result;
|
|
587
|
-
}
|
|
588
|
-
else {
|
|
589
|
-
// Set the compound color object
|
|
590
|
-
// Ensure the value is an object with only valid keys
|
|
591
|
-
if (!(0, typeguards_1.isObject)(value)
|
|
592
|
-
|| !Object.keys(value).every((key) => key in _Types_1.ColorComponentMap)) {
|
|
593
|
-
throw new core_1.ZWaveError(`${core_1.CommandClasses[this.ccId]}: "${property}" must be set to an object which specifies each color channel`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
594
|
-
}
|
|
595
|
-
// Ensure that each property is numeric
|
|
596
|
-
for (const [key, val] of Object.entries(value)) {
|
|
597
|
-
if (typeof val !== "number") {
|
|
598
|
-
(0, API_1.throwWrongValueType)(this.ccId, `${property}.${key}`, "number", typeof val);
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
// GH#2527: strip unsupported color components, because some devices don't react otherwise
|
|
602
|
-
if (this.isSinglecast()) {
|
|
603
|
-
const supportedColors = this.tryGetValueDB()?.getValue(exports.ColorSwitchCCValues.supportedColorComponents
|
|
604
|
-
.endpoint(this.endpoint.index));
|
|
605
|
-
if (supportedColors) {
|
|
606
|
-
value = (0, safe_3.pick)(value, supportedColors
|
|
607
|
-
.map((c) => colorComponentToTableKey(c))
|
|
608
|
-
.filter((c) => !!c));
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
// Avoid sending empty commands
|
|
612
|
-
if (Object.keys(value).length === 0)
|
|
613
|
-
return;
|
|
614
|
-
return this.set({ ...value, duration });
|
|
615
|
-
// We're not going to poll each color component separately
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
else if (property === "hexColor") {
|
|
619
|
-
// No property key, this is the hex color #rrggbb
|
|
620
|
-
if (typeof value !== "string") {
|
|
621
|
-
(0, API_1.throwWrongValueType)(this.ccId, property, "string", typeof value);
|
|
622
|
-
}
|
|
623
|
-
const duration = core_1.Duration.from(options?.transitionDuration);
|
|
624
|
-
return this.set({ hexColor: value, duration });
|
|
625
|
-
}
|
|
626
|
-
else {
|
|
627
|
-
(0, API_1.throwUnsupportedProperty)(this.ccId, property);
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
isSetValueOptimistic(_valueId) {
|
|
632
|
-
return false; // Color Switch CC handles updating the value DB itself
|
|
633
|
-
}
|
|
634
|
-
get [API_1.POLL_VALUE]() {
|
|
635
|
-
return async function ({ property, propertyKey }) {
|
|
636
|
-
if (propertyKey == undefined) {
|
|
637
|
-
(0, API_1.throwMissingPropertyKey)(this.ccId, property);
|
|
638
|
-
}
|
|
639
|
-
else if (typeof propertyKey !== "number") {
|
|
640
|
-
(0, API_1.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
|
|
641
|
-
}
|
|
642
|
-
switch (property) {
|
|
643
|
-
case "currentColor":
|
|
644
|
-
return (await this.get(propertyKey))?.currentValue;
|
|
645
|
-
case "targetColor":
|
|
646
|
-
return (await this.get(propertyKey))?.targetValue;
|
|
647
|
-
case "duration":
|
|
648
|
-
return (await this.get(propertyKey))?.duration;
|
|
649
|
-
default:
|
|
650
|
-
(0, API_1.throwUnsupportedProperty)(this.ccId, property);
|
|
651
|
-
}
|
|
652
|
-
};
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
exports.ColorSwitchCCAPI = ColorSwitchCCAPI;
|
|
656
|
-
exports.ColorSwitchCCAPI = ColorSwitchCCAPI = __decorate([
|
|
657
|
-
(0, CommandClassDecorators_1.API)(core_1.CommandClasses["Color Switch"])
|
|
658
|
-
], ColorSwitchCCAPI);
|
|
659
|
-
let ColorSwitchCC = class ColorSwitchCC extends CommandClass_1.CommandClass {
|
|
660
|
-
async interview(ctx) {
|
|
661
|
-
const node = this.getNode(ctx);
|
|
662
|
-
const endpoint = this.getEndpoint(ctx);
|
|
663
|
-
const api = API_1.CCAPI.create(core_1.CommandClasses["Color Switch"], ctx, endpoint).withOptions({
|
|
664
|
-
priority: core_1.MessagePriority.NodeQuery,
|
|
665
|
-
});
|
|
666
|
-
ctx.logNode(node.id, {
|
|
667
|
-
endpoint: this.endpointIndex,
|
|
668
|
-
message: `Interviewing ${this.ccName}...`,
|
|
669
|
-
direction: "none",
|
|
670
|
-
});
|
|
671
|
-
ctx.logNode(node.id, {
|
|
672
|
-
endpoint: this.endpointIndex,
|
|
673
|
-
message: "querying supported colors...",
|
|
674
|
-
direction: "outbound",
|
|
675
|
-
});
|
|
676
|
-
const supportedColors = await api.getSupported();
|
|
677
|
-
if (!supportedColors) {
|
|
678
|
-
ctx.logNode(node.id, {
|
|
679
|
-
endpoint: this.endpointIndex,
|
|
680
|
-
message: "Querying supported colors timed out, skipping interview...",
|
|
681
|
-
level: "warn",
|
|
682
|
-
});
|
|
683
|
-
return;
|
|
684
|
-
}
|
|
685
|
-
ctx.logNode(node.id, {
|
|
686
|
-
endpoint: this.endpointIndex,
|
|
687
|
-
message: `received supported colors:${supportedColors
|
|
688
|
-
.map((c) => `\n· ${(0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, c)}`)
|
|
689
|
-
.join("")}`,
|
|
690
|
-
direction: "outbound",
|
|
691
|
-
});
|
|
692
|
-
// Create metadata for the separate color channels
|
|
693
|
-
for (const color of supportedColors) {
|
|
694
|
-
const currentColorChannelValue = exports.ColorSwitchCCValues
|
|
695
|
-
.currentColorChannel(color);
|
|
696
|
-
this.setMetadata(ctx, currentColorChannelValue);
|
|
697
|
-
const targetColorChannelValue = exports.ColorSwitchCCValues
|
|
698
|
-
.targetColorChannel(color);
|
|
699
|
-
this.setMetadata(ctx, targetColorChannelValue);
|
|
700
|
-
}
|
|
701
|
-
// And the compound one
|
|
702
|
-
const currentColorValue = exports.ColorSwitchCCValues.currentColor;
|
|
703
|
-
this.setMetadata(ctx, currentColorValue);
|
|
704
|
-
const targetColorValue = exports.ColorSwitchCCValues.targetColor;
|
|
705
|
-
this.setMetadata(ctx, targetColorValue);
|
|
706
|
-
// Create the collective HEX color values
|
|
707
|
-
const supportsHex = [
|
|
708
|
-
_Types_1.ColorComponent.Red,
|
|
709
|
-
_Types_1.ColorComponent.Green,
|
|
710
|
-
_Types_1.ColorComponent.Blue,
|
|
711
|
-
].every((c) => supportedColors.includes(c));
|
|
712
|
-
this.setValue(ctx, exports.ColorSwitchCCValues.supportsHexColor, supportsHex);
|
|
713
|
-
if (supportsHex) {
|
|
714
|
-
const hexColorValue = exports.ColorSwitchCCValues.hexColor;
|
|
715
|
-
this.setMetadata(ctx, hexColorValue);
|
|
716
|
-
}
|
|
717
|
-
// Query all color components
|
|
718
|
-
await this.refreshValues(ctx);
|
|
719
|
-
// Remember that the interview is complete
|
|
720
|
-
this.setInterviewComplete(ctx, true);
|
|
721
|
-
}
|
|
722
|
-
async refreshValues(ctx) {
|
|
723
|
-
const node = this.getNode(ctx);
|
|
724
|
-
const endpoint = this.getEndpoint(ctx);
|
|
725
|
-
const api = API_1.CCAPI.create(core_1.CommandClasses["Color Switch"], ctx, endpoint).withOptions({
|
|
726
|
-
priority: core_1.MessagePriority.NodeQuery,
|
|
727
|
-
});
|
|
728
|
-
const supportedColors = this.getValue(ctx, exports.ColorSwitchCCValues.supportedColorComponents) ?? [];
|
|
729
|
-
for (const color of supportedColors) {
|
|
730
|
-
// Some devices report invalid colors, but the CC API checks
|
|
731
|
-
// for valid values and throws otherwise.
|
|
732
|
-
if (!(0, safe_3.isEnumMember)(_Types_1.ColorComponent, color))
|
|
733
|
-
continue;
|
|
734
|
-
const colorName = (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, color);
|
|
735
|
-
ctx.logNode(node.id, {
|
|
736
|
-
endpoint: this.endpointIndex,
|
|
737
|
-
message: `querying current color state (${colorName})`,
|
|
738
|
-
direction: "outbound",
|
|
739
|
-
});
|
|
740
|
-
await api.get(color);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
translatePropertyKey(ctx, property, propertyKey) {
|
|
744
|
-
if ((property === "currentColor" || property === "targetColor")
|
|
745
|
-
&& typeof propertyKey === "number") {
|
|
746
|
-
const translated = _Types_1.ColorComponent[propertyKey];
|
|
747
|
-
if (translated)
|
|
748
|
-
return translated;
|
|
749
|
-
}
|
|
750
|
-
return super.translatePropertyKey(ctx, property, propertyKey);
|
|
751
|
-
}
|
|
752
|
-
};
|
|
753
|
-
exports.ColorSwitchCC = ColorSwitchCC;
|
|
754
|
-
exports.ColorSwitchCC = ColorSwitchCC = __decorate([
|
|
755
|
-
(0, CommandClassDecorators_1.commandClass)(core_1.CommandClasses["Color Switch"]),
|
|
756
|
-
(0, CommandClassDecorators_1.implementedVersion)(3),
|
|
757
|
-
(0, CommandClassDecorators_1.ccValues)(exports.ColorSwitchCCValues)
|
|
758
|
-
], ColorSwitchCC);
|
|
759
|
-
let ColorSwitchCCSupportedReport = ColorSwitchCCSupportedReport_1 = class ColorSwitchCCSupportedReport extends ColorSwitchCC {
|
|
760
|
-
constructor(options) {
|
|
761
|
-
super(options);
|
|
762
|
-
this.supportedColorComponents = options.supportedColorComponents;
|
|
763
|
-
}
|
|
764
|
-
static from(raw, ctx) {
|
|
765
|
-
// Docs say 'variable length', but the table shows 2 bytes.
|
|
766
|
-
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
767
|
-
const supportedColorComponents = (0, core_1.parseBitMask)(raw.payload.subarray(0, 2), _Types_1.ColorComponent["Warm White"]);
|
|
768
|
-
return new ColorSwitchCCSupportedReport_1({
|
|
769
|
-
nodeId: ctx.sourceNodeId,
|
|
770
|
-
supportedColorComponents,
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
supportedColorComponents;
|
|
774
|
-
serialize(ctx) {
|
|
775
|
-
this.payload = (0, safe_1.encodeBitMask)(this.supportedColorComponents, 15, // fixed 2 bytes
|
|
776
|
-
_Types_1.ColorComponent["Warm White"]);
|
|
777
|
-
return super.serialize(ctx);
|
|
778
|
-
}
|
|
779
|
-
toLogEntry(ctx) {
|
|
780
|
-
return {
|
|
781
|
-
...super.toLogEntry(ctx),
|
|
782
|
-
message: {
|
|
783
|
-
"supported color components": this.supportedColorComponents
|
|
784
|
-
.map((c) => `\n· ${(0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, c)}`)
|
|
785
|
-
.join(""),
|
|
786
|
-
},
|
|
787
|
-
};
|
|
788
|
-
}
|
|
789
|
-
};
|
|
790
|
-
exports.ColorSwitchCCSupportedReport = ColorSwitchCCSupportedReport;
|
|
791
|
-
__decorate([
|
|
792
|
-
(0, CommandClassDecorators_1.ccValue)(exports.ColorSwitchCCValues.supportedColorComponents)
|
|
793
|
-
], ColorSwitchCCSupportedReport.prototype, "supportedColorComponents", void 0);
|
|
794
|
-
exports.ColorSwitchCCSupportedReport = ColorSwitchCCSupportedReport = ColorSwitchCCSupportedReport_1 = __decorate([
|
|
795
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.SupportedReport)
|
|
796
|
-
], ColorSwitchCCSupportedReport);
|
|
797
|
-
let ColorSwitchCCSupportedGet = class ColorSwitchCCSupportedGet extends ColorSwitchCC {
|
|
798
|
-
};
|
|
799
|
-
exports.ColorSwitchCCSupportedGet = ColorSwitchCCSupportedGet;
|
|
800
|
-
exports.ColorSwitchCCSupportedGet = ColorSwitchCCSupportedGet = __decorate([
|
|
801
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.SupportedGet),
|
|
802
|
-
(0, CommandClassDecorators_1.expectedCCResponse)(ColorSwitchCCSupportedReport)
|
|
803
|
-
], ColorSwitchCCSupportedGet);
|
|
804
|
-
let ColorSwitchCCReport = ColorSwitchCCReport_1 = class ColorSwitchCCReport extends ColorSwitchCC {
|
|
805
|
-
constructor(options) {
|
|
806
|
-
super(options);
|
|
807
|
-
this.colorComponent = options.colorComponent;
|
|
808
|
-
this.currentValue = options.currentValue;
|
|
809
|
-
this.targetValue = options.targetValue;
|
|
810
|
-
this.duration = core_1.Duration.from(options.duration);
|
|
811
|
-
}
|
|
812
|
-
static from(raw, ctx) {
|
|
813
|
-
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
814
|
-
const colorComponent = raw.payload[0];
|
|
815
|
-
const currentValue = raw.payload[1];
|
|
816
|
-
let targetValue;
|
|
817
|
-
let duration;
|
|
818
|
-
if (raw.payload.length >= 4) {
|
|
819
|
-
targetValue = raw.payload[2];
|
|
820
|
-
duration = core_1.Duration.parseReport(raw.payload[3]);
|
|
821
|
-
}
|
|
822
|
-
return new ColorSwitchCCReport_1({
|
|
823
|
-
nodeId: ctx.sourceNodeId,
|
|
824
|
-
colorComponent,
|
|
825
|
-
currentValue,
|
|
826
|
-
targetValue,
|
|
827
|
-
duration,
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
persistValues(ctx) {
|
|
831
|
-
// Duration is stored globally instead of per component
|
|
832
|
-
if (!super.persistValues(ctx))
|
|
833
|
-
return false;
|
|
834
|
-
// Update compound current value
|
|
835
|
-
const colorTableKey = colorComponentToTableKey(this.colorComponent);
|
|
836
|
-
if (colorTableKey) {
|
|
837
|
-
const compoundCurrentColorValue = exports.ColorSwitchCCValues.currentColor;
|
|
838
|
-
const compoundCurrentColor = this.getValue(ctx, compoundCurrentColorValue) ?? {};
|
|
839
|
-
compoundCurrentColor[colorTableKey] = this.currentValue;
|
|
840
|
-
this.setValue(ctx, compoundCurrentColorValue, compoundCurrentColor);
|
|
841
|
-
// and target value
|
|
842
|
-
if (this.targetValue != undefined) {
|
|
843
|
-
const compoundTargetColorValue = exports.ColorSwitchCCValues.targetColor;
|
|
844
|
-
const compoundTargetColor = this.getValue(ctx, compoundTargetColorValue) ?? {};
|
|
845
|
-
compoundTargetColor[colorTableKey] = this.targetValue;
|
|
846
|
-
this.setValue(ctx, compoundTargetColorValue, compoundTargetColor);
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
// Update collective hex value if required
|
|
850
|
-
const supportsHex = !!this.getValue(ctx, exports.ColorSwitchCCValues.supportsHexColor);
|
|
851
|
-
if (supportsHex
|
|
852
|
-
&& (this.colorComponent === _Types_1.ColorComponent.Red
|
|
853
|
-
|| this.colorComponent === _Types_1.ColorComponent.Green
|
|
854
|
-
|| this.colorComponent === _Types_1.ColorComponent.Blue)) {
|
|
855
|
-
const hexColorValue = exports.ColorSwitchCCValues.hexColor;
|
|
856
|
-
const hexValue = this.getValue(ctx, hexColorValue)
|
|
857
|
-
?? "000000";
|
|
858
|
-
const byteOffset = _Types_1.ColorComponent.Blue - this.colorComponent;
|
|
859
|
-
const byteMask = 0xff << (byteOffset * 8);
|
|
860
|
-
let hexValueNumeric = parseInt(hexValue, 16);
|
|
861
|
-
hexValueNumeric = (hexValueNumeric & ~byteMask)
|
|
862
|
-
| (this.currentValue << (byteOffset * 8));
|
|
863
|
-
this.setValue(ctx, hexColorValue, hexValueNumeric.toString(16).padStart(6, "0"));
|
|
864
|
-
}
|
|
865
|
-
return true;
|
|
866
|
-
}
|
|
867
|
-
colorComponent;
|
|
868
|
-
currentValue;
|
|
869
|
-
targetValue;
|
|
870
|
-
duration;
|
|
871
|
-
serialize(ctx) {
|
|
872
|
-
this.payload = safe_2.Bytes.from([
|
|
873
|
-
this.colorComponent,
|
|
874
|
-
this.currentValue,
|
|
875
|
-
]);
|
|
876
|
-
if (this.targetValue != undefined && this.duration != undefined) {
|
|
877
|
-
this.payload = safe_2.Bytes.concat([
|
|
878
|
-
this.payload,
|
|
879
|
-
safe_2.Bytes.from([
|
|
880
|
-
this.targetValue ?? 0xfe,
|
|
881
|
-
(this.duration ?? core_1.Duration.default()).serializeReport(),
|
|
882
|
-
]),
|
|
883
|
-
]);
|
|
884
|
-
}
|
|
885
|
-
return super.serialize(ctx);
|
|
886
|
-
}
|
|
887
|
-
toLogEntry(ctx) {
|
|
888
|
-
const message = {
|
|
889
|
-
"color component": (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, this.colorComponent),
|
|
890
|
-
"current value": this.currentValue,
|
|
891
|
-
};
|
|
892
|
-
if (this.targetValue != undefined) {
|
|
893
|
-
message["target value"] = this.targetValue;
|
|
894
|
-
}
|
|
895
|
-
if (this.duration != undefined) {
|
|
896
|
-
message.duration = this.duration.toString();
|
|
897
|
-
}
|
|
898
|
-
return {
|
|
899
|
-
...super.toLogEntry(ctx),
|
|
900
|
-
message,
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
exports.ColorSwitchCCReport = ColorSwitchCCReport;
|
|
905
|
-
__decorate([
|
|
906
|
-
(0, CommandClassDecorators_1.ccValue)(exports.ColorSwitchCCValues.currentColorChannel, (self) => [self.colorComponent])
|
|
907
|
-
], ColorSwitchCCReport.prototype, "currentValue", void 0);
|
|
908
|
-
__decorate([
|
|
909
|
-
(0, CommandClassDecorators_1.ccValue)(exports.ColorSwitchCCValues.targetColorChannel, (self) => [self.colorComponent])
|
|
910
|
-
], ColorSwitchCCReport.prototype, "targetValue", void 0);
|
|
911
|
-
__decorate([
|
|
912
|
-
(0, CommandClassDecorators_1.ccValue)(exports.ColorSwitchCCValues.duration)
|
|
913
|
-
], ColorSwitchCCReport.prototype, "duration", void 0);
|
|
914
|
-
exports.ColorSwitchCCReport = ColorSwitchCCReport = ColorSwitchCCReport_1 = __decorate([
|
|
915
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.Report)
|
|
916
|
-
], ColorSwitchCCReport);
|
|
917
|
-
function testResponseForColorSwitchGet(sent, received) {
|
|
918
|
-
return sent.colorComponent === received.colorComponent;
|
|
919
|
-
}
|
|
920
|
-
let ColorSwitchCCGet = ColorSwitchCCGet_1 = class ColorSwitchCCGet extends ColorSwitchCC {
|
|
921
|
-
constructor(options) {
|
|
922
|
-
super(options);
|
|
923
|
-
this._colorComponent = options.colorComponent;
|
|
924
|
-
}
|
|
925
|
-
static from(raw, ctx) {
|
|
926
|
-
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
927
|
-
const colorComponent = raw.payload[0];
|
|
928
|
-
return new ColorSwitchCCGet_1({
|
|
929
|
-
nodeId: ctx.sourceNodeId,
|
|
930
|
-
colorComponent,
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
_colorComponent;
|
|
934
|
-
get colorComponent() {
|
|
935
|
-
return this._colorComponent;
|
|
936
|
-
}
|
|
937
|
-
set colorComponent(value) {
|
|
938
|
-
if (!_Types_1.ColorComponent[value]) {
|
|
939
|
-
throw new core_1.ZWaveError("colorComponent must be a valid color component index.", core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
940
|
-
}
|
|
941
|
-
this._colorComponent = value;
|
|
942
|
-
}
|
|
943
|
-
serialize(ctx) {
|
|
944
|
-
this.payload = safe_2.Bytes.from([this._colorComponent]);
|
|
945
|
-
return super.serialize(ctx);
|
|
946
|
-
}
|
|
947
|
-
toLogEntry(ctx) {
|
|
948
|
-
return {
|
|
949
|
-
...super.toLogEntry(ctx),
|
|
950
|
-
message: {
|
|
951
|
-
"color component": (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, this.colorComponent),
|
|
952
|
-
},
|
|
953
|
-
};
|
|
954
|
-
}
|
|
955
|
-
};
|
|
956
|
-
exports.ColorSwitchCCGet = ColorSwitchCCGet;
|
|
957
|
-
exports.ColorSwitchCCGet = ColorSwitchCCGet = ColorSwitchCCGet_1 = __decorate([
|
|
958
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.Get),
|
|
959
|
-
(0, CommandClassDecorators_1.expectedCCResponse)(ColorSwitchCCReport, testResponseForColorSwitchGet)
|
|
960
|
-
], ColorSwitchCCGet);
|
|
961
|
-
let ColorSwitchCCSet = ColorSwitchCCSet_1 = class ColorSwitchCCSet extends ColorSwitchCC {
|
|
962
|
-
constructor(options) {
|
|
963
|
-
super(options);
|
|
964
|
-
// Populate properties from options object
|
|
965
|
-
if ("hexColor" in options) {
|
|
966
|
-
const match = hexColorRegex.exec(options.hexColor);
|
|
967
|
-
if (!match) {
|
|
968
|
-
throw new core_1.ZWaveError(`${options.hexColor} is not a valid HEX color string`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
969
|
-
}
|
|
970
|
-
this.colorTable = {
|
|
971
|
-
red: parseInt(match.groups.red, 16),
|
|
972
|
-
green: parseInt(match.groups.green, 16),
|
|
973
|
-
blue: parseInt(match.groups.blue, 16),
|
|
974
|
-
};
|
|
975
|
-
}
|
|
976
|
-
else {
|
|
977
|
-
this.colorTable = (0, safe_3.pick)(options, colorTableKeys);
|
|
978
|
-
}
|
|
979
|
-
this.duration = core_1.Duration.from(options.duration);
|
|
980
|
-
}
|
|
981
|
-
static from(raw, ctx) {
|
|
982
|
-
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
983
|
-
const populatedColorCount = raw.payload[0] & 0b11111;
|
|
984
|
-
(0, core_1.validatePayload)(raw.payload.length >= 1 + populatedColorCount * 2);
|
|
985
|
-
const colorTable = {};
|
|
986
|
-
let offset = 1;
|
|
987
|
-
for (let color = 0; color < populatedColorCount; color++) {
|
|
988
|
-
const component = raw.payload[offset];
|
|
989
|
-
const value = raw.payload[offset + 1];
|
|
990
|
-
const key = colorComponentToTableKey(component);
|
|
991
|
-
// @ts-expect-error
|
|
992
|
-
if (key)
|
|
993
|
-
this.colorTable[key] = value;
|
|
994
|
-
offset += 2;
|
|
995
|
-
}
|
|
996
|
-
let duration;
|
|
997
|
-
if (raw.payload.length > offset) {
|
|
998
|
-
duration = core_1.Duration.parseSet(raw.payload[offset]);
|
|
999
|
-
}
|
|
1000
|
-
return new ColorSwitchCCSet_1({
|
|
1001
|
-
nodeId: ctx.sourceNodeId,
|
|
1002
|
-
...colorTable,
|
|
1003
|
-
duration,
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
colorTable;
|
|
1007
|
-
duration;
|
|
1008
|
-
serialize(ctx) {
|
|
1009
|
-
const populatedColorCount = Object.keys(this.colorTable).length;
|
|
1010
|
-
this.payload = new safe_2.Bytes(1 + populatedColorCount * 2 + 1);
|
|
1011
|
-
this.payload[0] = populatedColorCount & 0b11111;
|
|
1012
|
-
let i = 1;
|
|
1013
|
-
for (const [key, value] of Object.entries(this.colorTable)) {
|
|
1014
|
-
const component = colorTableKeyToComponent(key);
|
|
1015
|
-
this.payload[i] = component;
|
|
1016
|
-
this.payload[i + 1] = (0, math_1.clamp)(value, 0, 0xff);
|
|
1017
|
-
i += 2;
|
|
1018
|
-
}
|
|
1019
|
-
this.payload[i] = (this.duration ?? core_1.Duration.default()).serializeSet();
|
|
1020
|
-
const ccVersion = (0, CommandClass_1.getEffectiveCCVersion)(ctx, this);
|
|
1021
|
-
if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
|
|
1022
|
-
// When forcing CC version 1, omit the duration byte
|
|
1023
|
-
this.payload = this.payload.subarray(0, -1);
|
|
1024
|
-
}
|
|
1025
|
-
return super.serialize(ctx);
|
|
1026
|
-
}
|
|
1027
|
-
toLogEntry(ctx) {
|
|
1028
|
-
const message = {};
|
|
1029
|
-
for (const [key, value] of Object.entries(this.colorTable)) {
|
|
1030
|
-
const realKey = key in _Types_1.ColorComponentMap
|
|
1031
|
-
? _Types_1.ColorComponent[_Types_1.ColorComponentMap[key]]
|
|
1032
|
-
: _Types_1.ColorComponent[key];
|
|
1033
|
-
message[realKey] = value;
|
|
1034
|
-
}
|
|
1035
|
-
if (this.duration != undefined) {
|
|
1036
|
-
message.duration = this.duration.toString();
|
|
1037
|
-
}
|
|
1038
|
-
return {
|
|
1039
|
-
...super.toLogEntry(ctx),
|
|
1040
|
-
message,
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
};
|
|
1044
|
-
exports.ColorSwitchCCSet = ColorSwitchCCSet;
|
|
1045
|
-
exports.ColorSwitchCCSet = ColorSwitchCCSet = ColorSwitchCCSet_1 = __decorate([
|
|
1046
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.Set),
|
|
1047
|
-
(0, CommandClassDecorators_1.useSupervision)()
|
|
1048
|
-
], ColorSwitchCCSet);
|
|
1049
|
-
let ColorSwitchCCStartLevelChange = ColorSwitchCCStartLevelChange_1 = class ColorSwitchCCStartLevelChange extends ColorSwitchCC {
|
|
1050
|
-
constructor(options) {
|
|
1051
|
-
super(options);
|
|
1052
|
-
this.duration = core_1.Duration.from(options.duration);
|
|
1053
|
-
this.ignoreStartLevel = options.ignoreStartLevel;
|
|
1054
|
-
this.startLevel = options.startLevel ?? 0;
|
|
1055
|
-
this.direction = options.direction;
|
|
1056
|
-
this.colorComponent = options.colorComponent;
|
|
1057
|
-
}
|
|
1058
|
-
static from(raw, ctx) {
|
|
1059
|
-
(0, core_1.validatePayload)(raw.payload.length >= 3);
|
|
1060
|
-
const ignoreStartLevel = !!((raw.payload[0] & 0b0_0_1_00000) >>> 5);
|
|
1061
|
-
const direction = ((raw.payload[0] & 0b0_1_0_00000) >>> 6)
|
|
1062
|
-
? "down"
|
|
1063
|
-
: "up";
|
|
1064
|
-
const colorComponent = raw.payload[1];
|
|
1065
|
-
const startLevel = raw.payload[2];
|
|
1066
|
-
let duration;
|
|
1067
|
-
if (raw.payload.length >= 4) {
|
|
1068
|
-
duration = core_1.Duration.parseSet(raw.payload[3]);
|
|
1069
|
-
}
|
|
1070
|
-
return new ColorSwitchCCStartLevelChange_1({
|
|
1071
|
-
nodeId: ctx.sourceNodeId,
|
|
1072
|
-
ignoreStartLevel,
|
|
1073
|
-
direction,
|
|
1074
|
-
colorComponent,
|
|
1075
|
-
startLevel,
|
|
1076
|
-
duration,
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
duration;
|
|
1080
|
-
startLevel;
|
|
1081
|
-
ignoreStartLevel;
|
|
1082
|
-
direction;
|
|
1083
|
-
colorComponent;
|
|
1084
|
-
serialize(ctx) {
|
|
1085
|
-
const controlByte = (_Types_1.LevelChangeDirection[this.direction] << 6)
|
|
1086
|
-
| (this.ignoreStartLevel ? 0b0010_0000 : 0);
|
|
1087
|
-
this.payload = safe_2.Bytes.from([
|
|
1088
|
-
controlByte,
|
|
1089
|
-
this.colorComponent,
|
|
1090
|
-
this.startLevel,
|
|
1091
|
-
(this.duration ?? core_1.Duration.default()).serializeSet(),
|
|
1092
|
-
]);
|
|
1093
|
-
const ccVersion = (0, CommandClass_1.getEffectiveCCVersion)(ctx, this);
|
|
1094
|
-
if (ccVersion < 3 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
|
|
1095
|
-
// When forcing CC version 1 or 2, omit the duration byte
|
|
1096
|
-
this.payload = this.payload.subarray(0, -1);
|
|
1097
|
-
}
|
|
1098
|
-
return super.serialize(ctx);
|
|
1099
|
-
}
|
|
1100
|
-
toLogEntry(ctx) {
|
|
1101
|
-
const message = {
|
|
1102
|
-
"color component": (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, this.colorComponent),
|
|
1103
|
-
"start level": `${this.startLevel}${this.ignoreStartLevel ? " (ignored)" : ""}`,
|
|
1104
|
-
direction: this.direction,
|
|
1105
|
-
};
|
|
1106
|
-
if (this.duration != undefined) {
|
|
1107
|
-
message.duration = this.duration.toString();
|
|
1108
|
-
}
|
|
1109
|
-
return {
|
|
1110
|
-
...super.toLogEntry(ctx),
|
|
1111
|
-
message,
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
};
|
|
1115
|
-
exports.ColorSwitchCCStartLevelChange = ColorSwitchCCStartLevelChange;
|
|
1116
|
-
exports.ColorSwitchCCStartLevelChange = ColorSwitchCCStartLevelChange = ColorSwitchCCStartLevelChange_1 = __decorate([
|
|
1117
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.StartLevelChange),
|
|
1118
|
-
(0, CommandClassDecorators_1.useSupervision)()
|
|
1119
|
-
], ColorSwitchCCStartLevelChange);
|
|
1120
|
-
let ColorSwitchCCStopLevelChange = ColorSwitchCCStopLevelChange_1 = class ColorSwitchCCStopLevelChange extends ColorSwitchCC {
|
|
1121
|
-
constructor(options) {
|
|
1122
|
-
super(options);
|
|
1123
|
-
this.colorComponent = options.colorComponent;
|
|
1124
|
-
}
|
|
1125
|
-
static from(raw, ctx) {
|
|
1126
|
-
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
1127
|
-
const colorComponent = raw.payload[0];
|
|
1128
|
-
return new ColorSwitchCCStopLevelChange_1({
|
|
1129
|
-
nodeId: ctx.sourceNodeId,
|
|
1130
|
-
colorComponent,
|
|
1131
|
-
});
|
|
1132
|
-
}
|
|
1133
|
-
colorComponent;
|
|
1134
|
-
serialize(ctx) {
|
|
1135
|
-
this.payload = safe_2.Bytes.from([this.colorComponent]);
|
|
1136
|
-
return super.serialize(ctx);
|
|
1137
|
-
}
|
|
1138
|
-
toLogEntry(ctx) {
|
|
1139
|
-
return {
|
|
1140
|
-
...super.toLogEntry(ctx),
|
|
1141
|
-
message: {
|
|
1142
|
-
"color component": (0, safe_3.getEnumMemberName)(_Types_1.ColorComponent, this.colorComponent),
|
|
1143
|
-
},
|
|
1144
|
-
};
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
exports.ColorSwitchCCStopLevelChange = ColorSwitchCCStopLevelChange;
|
|
1148
|
-
exports.ColorSwitchCCStopLevelChange = ColorSwitchCCStopLevelChange = ColorSwitchCCStopLevelChange_1 = __decorate([
|
|
1149
|
-
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ColorSwitchCommand.StopLevelChange),
|
|
1150
|
-
(0, CommandClassDecorators_1.useSupervision)()
|
|
1151
|
-
], ColorSwitchCCStopLevelChange);
|
|
1152
|
-
//# sourceMappingURL=ColorSwitchCC.js.map
|