@zwave-js/cc 15.21.0 → 15.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/cc/AlarmSensorCC.d.ts +2 -2
- package/build/cjs/cc/AlarmSensorCC.js +18 -57
- package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
- package/build/cjs/cc/ApplicationStatusCC.js +9 -48
- package/build/cjs/cc/ApplicationStatusCC.js.map +1 -1
- package/build/cjs/cc/AssociationCC.d.ts +2 -2
- package/build/cjs/cc/AssociationCC.js +32 -71
- package/build/cjs/cc/AssociationCC.js.map +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.d.ts +2 -2
- package/build/cjs/cc/AssociationGroupInfoCC.js +28 -65
- package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
- package/build/cjs/cc/BarrierOperatorCC.d.ts +2 -2
- package/build/cjs/cc/BarrierOperatorCC.js +28 -67
- package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
- package/build/cjs/cc/BasicCC.d.ts +2 -2
- package/build/cjs/cc/BasicCC.js +15 -54
- package/build/cjs/cc/BasicCC.js.map +2 -2
- package/build/cjs/cc/BasicWindowCoveringCC.js +12 -51
- package/build/cjs/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/cjs/cc/BatteryCC.d.ts +2 -2
- package/build/cjs/cc/BatteryCC.js +15 -54
- package/build/cjs/cc/BatteryCC.js.map +2 -2
- package/build/cjs/cc/BinarySensorCC.d.ts +2 -2
- package/build/cjs/cc/BinarySensorCC.js +19 -58
- package/build/cjs/cc/BinarySensorCC.js.map +2 -2
- package/build/cjs/cc/BinarySwitchCC.d.ts +2 -2
- package/build/cjs/cc/BinarySwitchCC.js +15 -54
- package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
- package/build/cjs/cc/CRC16CC.js +7 -46
- package/build/cjs/cc/CRC16CC.js.map +1 -1
- package/build/cjs/cc/CentralSceneCC.js +19 -58
- package/build/cjs/cc/CentralSceneCC.js.map +1 -1
- package/build/cjs/cc/ClimateControlScheduleCC.js +25 -64
- package/build/cjs/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cjs/cc/ClockCC.d.ts +2 -2
- package/build/cjs/cc/ClockCC.js +15 -54
- package/build/cjs/cc/ClockCC.js.map +2 -2
- package/build/cjs/cc/ColorSwitchCC.d.ts +2 -2
- package/build/cjs/cc/ColorSwitchCC.js +26 -65
- package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
- package/build/cjs/cc/ConfigurationCC.d.ts +2 -2
- package/build/cjs/cc/ConfigurationCC.js +43 -82
- package/build/cjs/cc/ConfigurationCC.js.map +2 -2
- package/build/cjs/cc/DeviceResetLocallyCC.js +7 -46
- package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cjs/cc/DoorLockCC.d.ts +2 -2
- package/build/cjs/cc/DoorLockCC.js +26 -65
- package/build/cjs/cc/DoorLockCC.js.map +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.d.ts +2 -2
- package/build/cjs/cc/DoorLockLoggingCC.js +17 -56
- package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
- package/build/cjs/cc/EnergyProductionCC.d.ts +2 -2
- package/build/cjs/cc/EnergyProductionCC.js +13 -52
- package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
- package/build/cjs/cc/EntryControlCC.d.ts +2 -2
- package/build/cjs/cc/EntryControlCC.js +25 -64
- package/build/cjs/cc/EntryControlCC.js.map +2 -2
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +34 -73
- package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cjs/cc/HailCC.js +3 -42
- package/build/cjs/cc/HailCC.js.map +1 -1
- package/build/cjs/cc/HumidityControlModeCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlModeCC.js +19 -58
- package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlOperatingStateCC.js +11 -50
- package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.d.ts +2 -2
- package/build/cjs/cc/HumidityControlSetpointCC.js +30 -69
- package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
- package/build/cjs/cc/InclusionControllerCC.js +9 -48
- package/build/cjs/cc/InclusionControllerCC.js.map +1 -1
- package/build/cjs/cc/IndicatorCC.d.ts +2 -2
- package/build/cjs/cc/IndicatorCC.js +31 -70
- package/build/cjs/cc/IndicatorCC.js.map +2 -2
- package/build/cjs/cc/IrrigationCC.d.ts +2 -2
- package/build/cjs/cc/IrrigationCC.js +54 -93
- package/build/cjs/cc/IrrigationCC.js.map +2 -2
- package/build/cjs/cc/LanguageCC.d.ts +2 -2
- package/build/cjs/cc/LanguageCC.js +15 -54
- package/build/cjs/cc/LanguageCC.js.map +2 -2
- package/build/cjs/cc/LockCC.d.ts +2 -2
- package/build/cjs/cc/LockCC.js +15 -54
- package/build/cjs/cc/LockCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -49
- package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
- package/build/cjs/cc/ManufacturerSpecificCC.js +16 -55
- package/build/cjs/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cjs/cc/MeterCC.d.ts +2 -2
- package/build/cjs/cc/MeterCC.js +23 -62
- package/build/cjs/cc/MeterCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.d.ts +2 -2
- package/build/cjs/cc/MultiChannelAssociationCC.js +26 -65
- package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
- package/build/cjs/cc/MultiChannelCC.js +34 -73
- package/build/cjs/cc/MultiChannelCC.js.map +1 -1
- package/build/cjs/cc/MultiCommandCC.js +9 -48
- package/build/cjs/cc/MultiCommandCC.js.map +1 -1
- package/build/cjs/cc/MultilevelSensorCC.d.ts +2 -2
- package/build/cjs/cc/MultilevelSensorCC.js +23 -62
- package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.d.ts +2 -2
- package/build/cjs/cc/MultilevelSwitchCC.js +24 -63
- package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
- package/build/cjs/cc/NoOperationCC.js +5 -44
- package/build/cjs/cc/NoOperationCC.js.map +1 -1
- package/build/cjs/cc/NodeNamingCC.d.ts +6 -4
- package/build/cjs/cc/NodeNamingCC.js +70 -85
- package/build/cjs/cc/NodeNamingCC.js.map +2 -2
- package/build/cjs/cc/NotificationCC.d.ts +20 -3
- package/build/cjs/cc/NotificationCC.js +141 -104
- package/build/cjs/cc/NotificationCC.js.map +2 -2
- package/build/cjs/cc/PowerlevelCC.js +22 -61
- package/build/cjs/cc/PowerlevelCC.js.map +1 -1
- package/build/cjs/cc/ProtectionCC.d.ts +2 -2
- package/build/cjs/cc/ProtectionCC.js +33 -72
- package/build/cjs/cc/ProtectionCC.js.map +2 -2
- package/build/cjs/cc/SceneActivationCC.js +9 -48
- package/build/cjs/cc/SceneActivationCC.js.map +1 -1
- package/build/cjs/cc/SceneActuatorConfigurationCC.js +14 -53
- package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +2 -2
- package/build/cjs/cc/SceneControllerConfigurationCC.js +17 -56
- package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
- package/build/cjs/cc/ScheduleEntryLockCC.js +46 -85
- package/build/cjs/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cjs/cc/Security2CC.js +33 -72
- package/build/cjs/cc/Security2CC.js.map +1 -1
- package/build/cjs/cc/SecurityCC.js +27 -66
- package/build/cjs/cc/SecurityCC.js.map +1 -1
- package/build/cjs/cc/SoundSwitchCC.js +29 -68
- package/build/cjs/cc/SoundSwitchCC.js.map +1 -1
- package/build/cjs/cc/SupervisionCC.js +9 -48
- package/build/cjs/cc/SupervisionCC.js.map +1 -1
- package/build/cjs/cc/ThermostatFanModeCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatFanModeCC.js +19 -58
- package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatFanStateCC.js +11 -50
- package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatModeCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatModeCC.js +19 -58
- package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatOperatingStateCC.js +11 -50
- package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatSetbackCC.js +15 -54
- package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.d.ts +2 -2
- package/build/cjs/cc/ThermostatSetpointCC.js +25 -64
- package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
- package/build/cjs/cc/TimeCC.js +24 -63
- package/build/cjs/cc/TimeCC.js.map +1 -1
- package/build/cjs/cc/TimeParametersCC.js +13 -52
- package/build/cjs/cc/TimeParametersCC.js.map +1 -1
- package/build/cjs/cc/TransportServiceCC.js +13 -52
- package/build/cjs/cc/TransportServiceCC.js.map +1 -1
- package/build/cjs/cc/UserCodeCC.d.ts +6 -4
- package/build/cjs/cc/UserCodeCC.js +89 -98
- package/build/cjs/cc/UserCodeCC.js.map +2 -2
- package/build/cjs/cc/VersionCC.js +25 -64
- package/build/cjs/cc/VersionCC.js.map +1 -1
- package/build/cjs/cc/WakeUpCC.js +21 -60
- package/build/cjs/cc/WakeUpCC.js.map +1 -1
- package/build/cjs/cc/WindowCoveringCC.d.ts +2 -2
- package/build/cjs/cc/WindowCoveringCC.js +26 -65
- package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
- package/build/cjs/cc/ZWaveLongRangeCC.js +3 -42
- package/build/cjs/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/cjs/cc/ZWavePlusCC.js +11 -50
- package/build/cjs/cc/ZWavePlusCC.js.map +1 -1
- package/build/cjs/cc/ZWaveProtocolCC.js +73 -112
- package/build/cjs/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cjs/cc/_CCValues.generated.d.ts +131 -7
- package/build/cjs/cc/_CCValues.generated.js +68 -5
- package/build/cjs/cc/_CCValues.generated.js.map +2 -2
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +22 -59
- package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
- package/build/cjs/lib/CommandClass.d.ts +6 -2
- package/build/cjs/lib/CommandClass.js +1 -1
- package/build/cjs/lib/CommandClass.js.map +2 -2
- package/build/cjs/lib/Security2/Extension.js +9 -48
- package/build/cjs/lib/Security2/Extension.js.map +1 -1
- package/build/cjs/lib/Values.d.ts +1 -1
- package/build/cjs/lib/Values.js.map +1 -1
- package/build/esm/cc/AlarmSensorCC.d.ts +2 -2
- package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/esm/cc/AlarmSensorCC.js +9 -38
- package/build/esm/cc/AlarmSensorCC.js.map +1 -1
- package/build/esm/cc/ApplicationStatusCC.js +1 -34
- package/build/esm/cc/ApplicationStatusCC.js.map +1 -1
- package/build/esm/cc/AssociationCC.d.ts +2 -2
- package/build/esm/cc/AssociationCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationCC.js +3 -36
- package/build/esm/cc/AssociationCC.js.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.d.ts +2 -2
- package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/esm/cc/AssociationGroupInfoCC.js +5 -36
- package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.d.ts +2 -2
- package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/esm/cc/BarrierOperatorCC.js +3 -36
- package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
- package/build/esm/cc/BasicCC.d.ts +2 -2
- package/build/esm/cc/BasicCC.d.ts.map +1 -1
- package/build/esm/cc/BasicCC.js +3 -36
- package/build/esm/cc/BasicCC.js.map +1 -1
- package/build/esm/cc/BasicWindowCoveringCC.js +1 -34
- package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
- package/build/esm/cc/BatteryCC.d.ts +2 -2
- package/build/esm/cc/BatteryCC.d.ts.map +1 -1
- package/build/esm/cc/BatteryCC.js +3 -36
- package/build/esm/cc/BatteryCC.js.map +1 -1
- package/build/esm/cc/BinarySensorCC.d.ts +2 -2
- package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySensorCC.js +3 -36
- package/build/esm/cc/BinarySensorCC.js.map +1 -1
- package/build/esm/cc/BinarySwitchCC.d.ts +2 -2
- package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/esm/cc/BinarySwitchCC.js +3 -36
- package/build/esm/cc/BinarySwitchCC.js.map +1 -1
- package/build/esm/cc/CRC16CC.js +1 -34
- package/build/esm/cc/CRC16CC.js.map +1 -1
- package/build/esm/cc/CentralSceneCC.js +1 -34
- package/build/esm/cc/CentralSceneCC.js.map +1 -1
- package/build/esm/cc/ClimateControlScheduleCC.js +1 -34
- package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/esm/cc/ClockCC.d.ts +2 -2
- package/build/esm/cc/ClockCC.d.ts.map +1 -1
- package/build/esm/cc/ClockCC.js +3 -36
- package/build/esm/cc/ClockCC.js.map +1 -1
- package/build/esm/cc/ColorSwitchCC.d.ts +2 -2
- package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/ColorSwitchCC.js +3 -36
- package/build/esm/cc/ColorSwitchCC.js.map +1 -1
- package/build/esm/cc/ConfigurationCC.d.ts +2 -2
- package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/ConfigurationCC.js +3 -36
- package/build/esm/cc/ConfigurationCC.js.map +1 -1
- package/build/esm/cc/DeviceResetLocallyCC.js +1 -34
- package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/esm/cc/DoorLockCC.d.ts +2 -2
- package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockCC.js +3 -36
- package/build/esm/cc/DoorLockCC.js.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.d.ts +2 -2
- package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/esm/cc/DoorLockLoggingCC.js +3 -36
- package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/esm/cc/EnergyProductionCC.d.ts +2 -2
- package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/esm/cc/EnergyProductionCC.js +3 -36
- package/build/esm/cc/EnergyProductionCC.js.map +1 -1
- package/build/esm/cc/EntryControlCC.d.ts +2 -2
- package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
- package/build/esm/cc/EntryControlCC.js +3 -36
- package/build/esm/cc/EntryControlCC.js.map +1 -1
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1 -34
- package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/esm/cc/HailCC.js +1 -34
- package/build/esm/cc/HailCC.js.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlModeCC.js +3 -36
- package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlOperatingStateCC.js +3 -36
- package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.d.ts +2 -2
- package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/HumidityControlSetpointCC.js +3 -36
- package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/esm/cc/InclusionControllerCC.js +1 -34
- package/build/esm/cc/InclusionControllerCC.js.map +1 -1
- package/build/esm/cc/IndicatorCC.d.ts +2 -2
- package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
- package/build/esm/cc/IndicatorCC.js +3 -36
- package/build/esm/cc/IndicatorCC.js.map +1 -1
- package/build/esm/cc/IrrigationCC.d.ts +2 -2
- package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
- package/build/esm/cc/IrrigationCC.js +3 -36
- package/build/esm/cc/IrrigationCC.js.map +1 -1
- package/build/esm/cc/LanguageCC.d.ts +2 -2
- package/build/esm/cc/LanguageCC.d.ts.map +1 -1
- package/build/esm/cc/LanguageCC.js +3 -36
- package/build/esm/cc/LanguageCC.js.map +1 -1
- package/build/esm/cc/LockCC.d.ts +2 -2
- package/build/esm/cc/LockCC.d.ts.map +1 -1
- package/build/esm/cc/LockCC.js +3 -36
- package/build/esm/cc/LockCC.js.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
- package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/esm/cc/ManufacturerProprietaryCC.js +3 -36
- package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/esm/cc/ManufacturerSpecificCC.js +1 -34
- package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/esm/cc/MeterCC.d.ts +2 -2
- package/build/esm/cc/MeterCC.d.ts.map +1 -1
- package/build/esm/cc/MeterCC.js +3 -36
- package/build/esm/cc/MeterCC.js.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.d.ts +2 -2
- package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/esm/cc/MultiChannelAssociationCC.js +4 -37
- package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/esm/cc/MultiChannelCC.js +1 -34
- package/build/esm/cc/MultiChannelCC.js.map +1 -1
- package/build/esm/cc/MultiCommandCC.js +1 -34
- package/build/esm/cc/MultiCommandCC.js.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.d.ts +2 -2
- package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSensorCC.js +3 -36
- package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.d.ts +2 -2
- package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/esm/cc/MultilevelSwitchCC.js +3 -36
- package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/esm/cc/NoOperationCC.js +1 -34
- package/build/esm/cc/NoOperationCC.js.map +1 -1
- package/build/esm/cc/NodeNamingCC.d.ts +6 -4
- package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/esm/cc/NodeNamingCC.js +52 -73
- package/build/esm/cc/NodeNamingCC.js.map +1 -1
- package/build/esm/cc/NotificationCC.d.ts +20 -3
- package/build/esm/cc/NotificationCC.d.ts.map +1 -1
- package/build/esm/cc/NotificationCC.js +143 -89
- package/build/esm/cc/NotificationCC.js.map +1 -1
- package/build/esm/cc/PowerlevelCC.js +1 -34
- package/build/esm/cc/PowerlevelCC.js.map +1 -1
- package/build/esm/cc/ProtectionCC.d.ts +2 -2
- package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
- package/build/esm/cc/ProtectionCC.js +3 -36
- package/build/esm/cc/ProtectionCC.js.map +1 -1
- package/build/esm/cc/SceneActivationCC.js +1 -34
- package/build/esm/cc/SceneActivationCC.js.map +1 -1
- package/build/esm/cc/SceneActuatorConfigurationCC.js +1 -34
- package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts +2 -2
- package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/esm/cc/SceneControllerConfigurationCC.js +3 -36
- package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/esm/cc/ScheduleEntryLockCC.js +1 -34
- package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/esm/cc/Security2CC.js +1 -34
- package/build/esm/cc/Security2CC.js.map +1 -1
- package/build/esm/cc/SecurityCC.js +1 -34
- package/build/esm/cc/SecurityCC.js.map +1 -1
- package/build/esm/cc/SoundSwitchCC.js +1 -34
- package/build/esm/cc/SoundSwitchCC.js.map +1 -1
- package/build/esm/cc/SupervisionCC.js +1 -34
- package/build/esm/cc/SupervisionCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.d.ts +2 -2
- package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanModeCC.js +3 -36
- package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.d.ts +2 -2
- package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatFanStateCC.js +3 -36
- package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatModeCC.d.ts +2 -2
- package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatModeCC.js +3 -36
- package/build/esm/cc/ThermostatModeCC.js.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts +2 -2
- package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatOperatingStateCC.js +3 -36
- package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.d.ts +2 -2
- package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetbackCC.js +3 -36
- package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.d.ts +2 -2
- package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/esm/cc/ThermostatSetpointCC.js +3 -36
- package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/esm/cc/TimeCC.js +1 -34
- package/build/esm/cc/TimeCC.js.map +1 -1
- package/build/esm/cc/TimeParametersCC.js +1 -34
- package/build/esm/cc/TimeParametersCC.js.map +1 -1
- package/build/esm/cc/TransportServiceCC.js +1 -34
- package/build/esm/cc/TransportServiceCC.js.map +1 -1
- package/build/esm/cc/UserCodeCC.d.ts +6 -4
- package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
- package/build/esm/cc/UserCodeCC.js +55 -48
- package/build/esm/cc/UserCodeCC.js.map +1 -1
- package/build/esm/cc/VersionCC.js +1 -34
- package/build/esm/cc/VersionCC.js.map +1 -1
- package/build/esm/cc/WakeUpCC.js +1 -34
- package/build/esm/cc/WakeUpCC.js.map +1 -1
- package/build/esm/cc/WindowCoveringCC.d.ts +2 -2
- package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/esm/cc/WindowCoveringCC.js +3 -36
- package/build/esm/cc/WindowCoveringCC.js.map +1 -1
- package/build/esm/cc/ZWaveLongRangeCC.js +1 -34
- package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
- package/build/esm/cc/ZWavePlusCC.js +1 -34
- package/build/esm/cc/ZWavePlusCC.js.map +1 -1
- package/build/esm/cc/ZWaveProtocolCC.js +1 -34
- package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/esm/cc/_CCValues.generated.d.ts +131 -7
- package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
- package/build/esm/cc/_CCValues.generated.js +71 -4
- package/build/esm/cc/_CCValues.generated.js.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
- package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js +7 -38
- package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/esm/lib/CommandClass.d.ts +6 -2
- package/build/esm/lib/CommandClass.d.ts.map +1 -1
- package/build/esm/lib/CommandClass.js +1 -1
- package/build/esm/lib/CommandClass.js.map +1 -1
- package/build/esm/lib/Security2/Extension.js +1 -34
- package/build/esm/lib/Security2/Extension.js.map +1 -1
- package/build/esm/lib/Values.d.ts +1 -1
- package/build/esm/lib/Values.d.ts.map +1 -1
- package/package.json +9 -8
|
@@ -37,6 +37,7 @@ __export(LanguageCC_exports, {
|
|
|
37
37
|
LanguageCCValues: () => import_CCValues_generated.LanguageCCValues
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(LanguageCC_exports);
|
|
40
|
+
var import_tslib = require("tslib");
|
|
40
41
|
var __validateArgs = __toESM(require("./LanguageCC._validateArgs.js"), 1);
|
|
41
42
|
var import_core = require("@zwave-js/core");
|
|
42
43
|
var import_shared = require("@zwave-js/shared");
|
|
@@ -45,46 +46,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
45
46
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
46
47
|
var import_Types = require("../lib/_Types.js");
|
|
47
48
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
48
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
49
|
-
var useValue = arguments.length > 2;
|
|
50
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
51
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
52
|
-
}
|
|
53
|
-
return useValue ? value : void 0;
|
|
54
|
-
};
|
|
55
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
56
|
-
function accept(f) {
|
|
57
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
58
|
-
return f;
|
|
59
|
-
}
|
|
60
|
-
__name(accept, "accept");
|
|
61
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
62
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
63
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
64
|
-
var _, done = false;
|
|
65
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
66
|
-
var context = {};
|
|
67
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
68
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
69
|
-
context.addInitializer = function(f) {
|
|
70
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
71
|
-
extraInitializers.push(accept(f || null));
|
|
72
|
-
};
|
|
73
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
74
|
-
if (kind === "accessor") {
|
|
75
|
-
if (result === void 0) continue;
|
|
76
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
77
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
78
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
79
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
80
|
-
} else if (_ = accept(result)) {
|
|
81
|
-
if (kind === "field") initializers.unshift(_);
|
|
82
|
-
else descriptor[key] = _;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
86
|
-
done = true;
|
|
87
|
-
};
|
|
88
49
|
const { validateArgs_LanguageCCAPI_set } = __validateArgs;
|
|
89
50
|
let LanguageCCAPI = (() => {
|
|
90
51
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses.Language)];
|
|
@@ -104,11 +65,11 @@ let LanguageCCAPI = (() => {
|
|
|
104
65
|
static {
|
|
105
66
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
106
67
|
_set_decorators = [validateArgs_LanguageCCAPI_set()];
|
|
107
|
-
__esDecorate(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
108
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
68
|
+
(0, import_tslib.__esDecorate)(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
69
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
109
70
|
LanguageCCAPI2 = _classThis = _classDescriptor.value;
|
|
110
71
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
111
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
72
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
112
73
|
}
|
|
113
74
|
supportsCommand(cmd) {
|
|
114
75
|
switch (cmd) {
|
|
@@ -143,7 +104,7 @@ let LanguageCCAPI = (() => {
|
|
|
143
104
|
}
|
|
144
105
|
constructor() {
|
|
145
106
|
super(...arguments);
|
|
146
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
107
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
147
108
|
}
|
|
148
109
|
};
|
|
149
110
|
return LanguageCCAPI2 = _classThis;
|
|
@@ -163,10 +124,10 @@ let LanguageCC = (() => {
|
|
|
163
124
|
}
|
|
164
125
|
static {
|
|
165
126
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
166
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
127
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
167
128
|
LanguageCC2 = _classThis = _classDescriptor.value;
|
|
168
129
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
169
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
130
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
170
131
|
}
|
|
171
132
|
async interview(ctx) {
|
|
172
133
|
const node = this.getNode(ctx);
|
|
@@ -178,11 +139,11 @@ let LanguageCC = (() => {
|
|
|
178
139
|
await this.refreshValues(ctx);
|
|
179
140
|
this.setInterviewComplete(ctx, true);
|
|
180
141
|
}
|
|
181
|
-
async refreshValues(ctx) {
|
|
142
|
+
async refreshValues(ctx, options) {
|
|
182
143
|
const node = this.getNode(ctx);
|
|
183
144
|
const endpoint = this.getEndpoint(ctx);
|
|
184
145
|
const api = import_API.CCAPI.create(import_core.CommandClasses.Language, ctx, endpoint).withOptions({
|
|
185
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
146
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
186
147
|
});
|
|
187
148
|
ctx.logNode(node.id, {
|
|
188
149
|
message: "requesting language setting...",
|
|
@@ -216,10 +177,10 @@ let LanguageCCSet = (() => {
|
|
|
216
177
|
}
|
|
217
178
|
static {
|
|
218
179
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
219
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
180
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
220
181
|
LanguageCCSet2 = _classThis = _classDescriptor.value;
|
|
221
182
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
222
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
183
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
223
184
|
}
|
|
224
185
|
constructor(options) {
|
|
225
186
|
super(options);
|
|
@@ -287,10 +248,10 @@ let LanguageCCReport = (() => {
|
|
|
287
248
|
}
|
|
288
249
|
static {
|
|
289
250
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
290
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
251
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
291
252
|
LanguageCCReport2 = _classThis = _classDescriptor.value;
|
|
292
253
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
293
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
254
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
294
255
|
}
|
|
295
256
|
constructor(options) {
|
|
296
257
|
super(options);
|
|
@@ -340,10 +301,10 @@ let LanguageCCGet = (() => {
|
|
|
340
301
|
}
|
|
341
302
|
static {
|
|
342
303
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
343
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
304
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
344
305
|
LanguageCCGet2 = _classThis = _classDescriptor.value;
|
|
345
306
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
346
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
307
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
347
308
|
}
|
|
348
309
|
};
|
|
349
310
|
return LanguageCCGet2 = _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/LanguageCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./LanguageCC._validateArgs.js\";\nconst { validateArgs_LanguageCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, pick } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { LanguageCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { LanguageCCValues } from \"./_CCValues.generated.js\";\nexport { LanguageCCValues };\n// @noSetValueAPI It doesn't make sense\n@API(CommandClasses.Language)\nexport class LanguageCCAPI extends CCAPI {\n public supportsCommand(cmd: LanguageCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case LanguageCommand.Get:\n return this.isSinglecast();\n case LanguageCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(LanguageCommand, LanguageCommand.Get);\n const cc = new LanguageCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<LanguageCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"language\", \"country\"]);\n }\n }\n @validateArgs_LanguageCCAPI_set()\n public async set(language: string, country?: string): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(LanguageCommand, LanguageCommand.Set);\n const cc = new LanguageCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n language,\n country,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Language)\n@implementedVersion(1)\n@ccValues(LanguageCCValues)\nexport class LanguageCC extends CommandClass {\n declare ccCommand: LanguageCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Language, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n message: \"requesting language setting...\",\n direction: \"outbound\",\n });\n const resp = await api.get();\n if (resp) {\n const { language, country } = resp;\n const logMessage = `received current language setting: ${language}${country != undefined ? `-${country}` : \"\"}`;\n ctx.logNode(node.id, {\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface LanguageCCSetOptions {\n language: string;\n country?: string;\n}\n@CCCommand(LanguageCommand.Set)\n@useSupervision()\nexport class LanguageCCSet extends LanguageCC {\n public constructor(options: WithAddress<LanguageCCSetOptions>) {\n super(options);\n // Populate properties from options object\n this._language = options.language;\n this._country = options.country;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): LanguageCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new LanguageCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n private _language: string;\n public get language(): string {\n return this._language;\n }\n public set language(value: string) {\n if (value.length !== 3 || value.toLowerCase() !== value) {\n throw new ZWaveError(\"language must be a 3 digit (lowercase) code according to ISO 639-2\", ZWaveErrorCodes.Argument_Invalid);\n }\n this._language = value;\n }\n private _country: MaybeNotKnown<string>;\n public get country(): MaybeNotKnown<string> {\n return this._country;\n }\n public set country(value: MaybeNotKnown<string>) {\n if (typeof value === \"string\"\n && (value.length !== 2 || value.toUpperCase() !== value)) {\n throw new ZWaveError(\"country must be a 2 digit (uppercase) code according to ISO 3166-1\", ZWaveErrorCodes.Argument_Invalid);\n }\n this._country = value;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from(this._language, \"ascii\");\n if (this._country) {\n this.payload = Bytes.concat([\n this.payload,\n Bytes.from(this._country, \"ascii\"),\n ]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = { language: this.language };\n if (this._country != undefined) {\n message.country = this._country;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface LanguageCCReportOptions {\n language: string;\n country: MaybeNotKnown<string>;\n}\n@CCCommand(LanguageCommand.Report)\n@ccValueProperty(\"language\", LanguageCCValues.language)\n@ccValueProperty(\"country\", LanguageCCValues.country)\nexport class LanguageCCReport extends LanguageCC {\n public constructor(options: WithAddress<LanguageCCReportOptions>) {\n super(options);\n this.language = options.language;\n this.country = options.country;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): LanguageCCReport {\n validatePayload(raw.payload.length >= 3);\n const language = raw.payload.subarray(0, 3).toString(\"ascii\");\n let country: MaybeNotKnown<string>;\n if (raw.payload.length >= 5) {\n country = raw.payload.subarray(3, 5).toString(\"ascii\");\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n language,\n country,\n });\n }\n public readonly language: string;\n public readonly country: MaybeNotKnown<string>;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = { language: this.language };\n if (this.country != undefined) {\n message.country = this.country;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(LanguageCommand.Get)\n@expectedCCResponse(LanguageCCReport)\nexport class LanguageCCGet extends LanguageCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./LanguageCC._validateArgs.js\";\nconst { validateArgs_LanguageCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, pick } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { LanguageCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { LanguageCCValues } from \"./_CCValues.generated.js\";\nexport { LanguageCCValues };\n// @noSetValueAPI It doesn't make sense\n@API(CommandClasses.Language)\nexport class LanguageCCAPI extends CCAPI {\n public supportsCommand(cmd: LanguageCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case LanguageCommand.Get:\n return this.isSinglecast();\n case LanguageCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(LanguageCommand, LanguageCommand.Get);\n const cc = new LanguageCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<LanguageCCReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"language\", \"country\"]);\n }\n }\n @validateArgs_LanguageCCAPI_set()\n public async set(language: string, country?: string): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(LanguageCommand, LanguageCommand.Set);\n const cc = new LanguageCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n language,\n country,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Language)\n@implementedVersion(1)\n@ccValues(LanguageCCValues)\nexport class LanguageCC extends CommandClass {\n declare ccCommand: LanguageCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Language, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n message: \"requesting language setting...\",\n direction: \"outbound\",\n });\n const resp = await api.get();\n if (resp) {\n const { language, country } = resp;\n const logMessage = `received current language setting: ${language}${country != undefined ? `-${country}` : \"\"}`;\n ctx.logNode(node.id, {\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface LanguageCCSetOptions {\n language: string;\n country?: string;\n}\n@CCCommand(LanguageCommand.Set)\n@useSupervision()\nexport class LanguageCCSet extends LanguageCC {\n public constructor(options: WithAddress<LanguageCCSetOptions>) {\n super(options);\n // Populate properties from options object\n this._language = options.language;\n this._country = options.country;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): LanguageCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new LanguageCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n private _language: string;\n public get language(): string {\n return this._language;\n }\n public set language(value: string) {\n if (value.length !== 3 || value.toLowerCase() !== value) {\n throw new ZWaveError(\"language must be a 3 digit (lowercase) code according to ISO 639-2\", ZWaveErrorCodes.Argument_Invalid);\n }\n this._language = value;\n }\n private _country: MaybeNotKnown<string>;\n public get country(): MaybeNotKnown<string> {\n return this._country;\n }\n public set country(value: MaybeNotKnown<string>) {\n if (typeof value === \"string\"\n && (value.length !== 2 || value.toUpperCase() !== value)) {\n throw new ZWaveError(\"country must be a 2 digit (uppercase) code according to ISO 3166-1\", ZWaveErrorCodes.Argument_Invalid);\n }\n this._country = value;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from(this._language, \"ascii\");\n if (this._country) {\n this.payload = Bytes.concat([\n this.payload,\n Bytes.from(this._country, \"ascii\"),\n ]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = { language: this.language };\n if (this._country != undefined) {\n message.country = this._country;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface LanguageCCReportOptions {\n language: string;\n country: MaybeNotKnown<string>;\n}\n@CCCommand(LanguageCommand.Report)\n@ccValueProperty(\"language\", LanguageCCValues.language)\n@ccValueProperty(\"country\", LanguageCCValues.country)\nexport class LanguageCCReport extends LanguageCC {\n public constructor(options: WithAddress<LanguageCCReportOptions>) {\n super(options);\n this.language = options.language;\n this.country = options.country;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): LanguageCCReport {\n validatePayload(raw.payload.length >= 3);\n const language = raw.payload.subarray(0, 3).toString(\"ascii\");\n let country: MaybeNotKnown<string>;\n if (raw.payload.length >= 5) {\n country = raw.payload.subarray(3, 5).toString(\"ascii\");\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n language,\n country,\n });\n }\n public readonly language: string;\n public readonly country: MaybeNotKnown<string>;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = { language: this.language };\n if (this.country != undefined) {\n message.country = this.country;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(LanguageCommand.Get)\n@expectedCCResponse(LanguageCCReport)\nexport class LanguageCCGet extends LanguageCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA2O;AAC3O,oBAA4B;AAC5B,iBAAsB;AACtB,0BAAuH;AACvH,oCAAiI;AAEjI,mBAAgC;AAEhC,gCAAiC;AATjC,MAAM,EAAE,+BAA8B,IAAK;IAa9B,iBAAa,MAAA;8BADzB,mCAAI,2BAAe,QAAQ,CAAC;;;;oBACM;;;qCAAA,YAAK;WAAA;;;;;;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A,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAA6C;AAC5D,YAAM,OAAO;AACb,WAAK,WAAW,QAAQ;AACxB,WAAK,UAAU,QAAQ;IAC3B;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,WAAW,IAAI,QAAQ,SAAS,GAAG,CAAC,EAAE,SAAS,OAAO;AAC5D,UAAI;AACJ,UAAI,IAAI,QAAQ,UAAU,GAAG;AACzB,kBAAU,IAAI,QAAQ,SAAS,GAAG,CAAC,EAAE,SAAS,OAAO;MACzD;AACA,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;QACA;OACH;IACL;IACgB;IACA;IACT,WAAW,KAAgB;AAC9B,YAAM,UAAyB,EAAE,UAAU,KAAK,SAAQ;AACxD,UAAI,KAAK,WAAW,QAAW;AAC3B,gBAAQ,UAAU,KAAK;MAC3B;AACA,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB;;IAER;;;;IAIS,iBAAa,MAAA;8BAFzB,yCAAU,6BAAgB,GAAG,OAC7B,kDAAmB,gBAAgB,CAAC;;;;oBACF;qCAAA,YAAU;WAAA;;;;;;;;AAA7C,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/cjs/cc/LockCC.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { Bytes } from "@zwave-js/shared";
|
|
3
3
|
import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
|
|
4
|
-
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
4
|
+
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
5
5
|
import { LockCommand } from "../lib/_Types.js";
|
|
6
6
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
7
7
|
import { LockCCValues } from "./_CCValues.generated.js";
|
|
@@ -20,7 +20,7 @@ export declare class LockCCAPI extends PhysicalCCAPI {
|
|
|
20
20
|
export declare class LockCC extends CommandClass {
|
|
21
21
|
ccCommand: LockCommand;
|
|
22
22
|
interview(ctx: InterviewContext): Promise<void>;
|
|
23
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
23
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
24
24
|
}
|
|
25
25
|
export interface LockCCSetOptions {
|
|
26
26
|
locked: boolean;
|
package/build/cjs/cc/LockCC.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(LockCC_exports, {
|
|
|
37
37
|
LockCCValues: () => import_CCValues_generated.LockCCValues
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(LockCC_exports);
|
|
40
|
+
var import_tslib = require("tslib");
|
|
40
41
|
var __validateArgs = __toESM(require("./LockCC._validateArgs.js"), 1);
|
|
41
42
|
var import_core = require("@zwave-js/core");
|
|
42
43
|
var import_shared = require("@zwave-js/shared");
|
|
@@ -45,46 +46,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
45
46
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
46
47
|
var import_Types = require("../lib/_Types.js");
|
|
47
48
|
var import_CCValues_generated = require("./_CCValues.generated.js");
|
|
48
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
49
|
-
var useValue = arguments.length > 2;
|
|
50
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
51
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
52
|
-
}
|
|
53
|
-
return useValue ? value : void 0;
|
|
54
|
-
};
|
|
55
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
56
|
-
function accept(f) {
|
|
57
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
58
|
-
return f;
|
|
59
|
-
}
|
|
60
|
-
__name(accept, "accept");
|
|
61
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
62
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
63
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
64
|
-
var _, done = false;
|
|
65
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
66
|
-
var context = {};
|
|
67
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
68
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
69
|
-
context.addInitializer = function(f) {
|
|
70
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
71
|
-
extraInitializers.push(accept(f || null));
|
|
72
|
-
};
|
|
73
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
74
|
-
if (kind === "accessor") {
|
|
75
|
-
if (result === void 0) continue;
|
|
76
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
77
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
78
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
79
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
80
|
-
} else if (_ = accept(result)) {
|
|
81
|
-
if (kind === "field") initializers.unshift(_);
|
|
82
|
-
else descriptor[key] = _;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
86
|
-
done = true;
|
|
87
|
-
};
|
|
88
49
|
const { validateArgs_LockCCAPI_set } = __validateArgs;
|
|
89
50
|
let LockCCAPI = (() => {
|
|
90
51
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses.Lock)];
|
|
@@ -103,11 +64,11 @@ let LockCCAPI = (() => {
|
|
|
103
64
|
}
|
|
104
65
|
static {
|
|
105
66
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
106
|
-
__esDecorate(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
107
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
67
|
+
(0, import_tslib.__esDecorate)(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
68
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
108
69
|
LockCCAPI2 = _classThis = _classDescriptor.value;
|
|
109
70
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
110
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
71
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
111
72
|
}
|
|
112
73
|
supportsCommand(cmd) {
|
|
113
74
|
switch (cmd) {
|
|
@@ -163,7 +124,7 @@ let LockCCAPI = (() => {
|
|
|
163
124
|
}
|
|
164
125
|
constructor() {
|
|
165
126
|
super(...arguments);
|
|
166
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
127
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
167
128
|
}
|
|
168
129
|
};
|
|
169
130
|
return LockCCAPI2 = _classThis;
|
|
@@ -183,10 +144,10 @@ let LockCC = (() => {
|
|
|
183
144
|
}
|
|
184
145
|
static {
|
|
185
146
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
186
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
147
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
187
148
|
LockCC2 = _classThis = _classDescriptor.value;
|
|
188
149
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
189
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
150
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
190
151
|
}
|
|
191
152
|
async interview(ctx) {
|
|
192
153
|
const node = this.getNode(ctx);
|
|
@@ -198,11 +159,11 @@ let LockCC = (() => {
|
|
|
198
159
|
await this.refreshValues(ctx);
|
|
199
160
|
this.setInterviewComplete(ctx, true);
|
|
200
161
|
}
|
|
201
|
-
async refreshValues(ctx) {
|
|
162
|
+
async refreshValues(ctx, options) {
|
|
202
163
|
const node = this.getNode(ctx);
|
|
203
164
|
const endpoint = this.getEndpoint(ctx);
|
|
204
165
|
const api = import_API.CCAPI.create(import_core.CommandClasses.Lock, ctx, endpoint).withOptions({
|
|
205
|
-
priority: import_core.MessagePriority.NodeQuery
|
|
166
|
+
priority: options?.priority ?? import_core.MessagePriority.NodeQuery
|
|
206
167
|
});
|
|
207
168
|
ctx.logNode(node.id, {
|
|
208
169
|
message: "requesting current lock state...",
|
|
@@ -233,10 +194,10 @@ let LockCCSet = (() => {
|
|
|
233
194
|
}
|
|
234
195
|
static {
|
|
235
196
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
236
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
197
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
237
198
|
LockCCSet2 = _classThis = _classDescriptor.value;
|
|
238
199
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
239
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
200
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
240
201
|
}
|
|
241
202
|
constructor(options) {
|
|
242
203
|
super(options);
|
|
@@ -274,10 +235,10 @@ let LockCCReport = (() => {
|
|
|
274
235
|
}
|
|
275
236
|
static {
|
|
276
237
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
277
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
238
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
278
239
|
LockCCReport2 = _classThis = _classDescriptor.value;
|
|
279
240
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
280
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
241
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
281
242
|
}
|
|
282
243
|
constructor(options) {
|
|
283
244
|
super(options);
|
|
@@ -316,10 +277,10 @@ let LockCCGet = (() => {
|
|
|
316
277
|
}
|
|
317
278
|
static {
|
|
318
279
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
319
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
280
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
320
281
|
LockCCGet2 = _classThis = _classDescriptor.value;
|
|
321
282
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
322
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
283
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
323
284
|
}
|
|
324
285
|
};
|
|
325
286
|
return LockCCGet2 = _classThis;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src_gen/cc/LockCC.ts"],
|
|
4
|
-
"sourcesContent": ["import * as __validateArgs from \"./LockCC._validateArgs.js\";\nconst { validateArgs_LockCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { LockCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { LockCCValues } from \"./_CCValues.generated.js\";\nexport { LockCCValues };\n@API(CommandClasses.Lock)\nexport class LockCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: LockCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case LockCommand.Get:\n case LockCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n public async get(): Promise<MaybeNotKnown<boolean>> {\n this.assertSupportsCommand(LockCommand, LockCommand.Get);\n const cc = new LockCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<LockCCReport>(cc, this.commandOptions);\n return response?.locked;\n }\n /**\n * Locks or unlocks the lock\n * @param locked Whether the lock should be locked\n */\n @validateArgs_LockCCAPI_set()\n public async set(locked: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(LockCommand, LockCommand.Set);\n const cc = new LockCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n locked,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: LockCCAPI, { property }, value) {\n if (property !== \"locked\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n const result = await this.set(value);\n // Verify the current value after a delay, unless the command was supervised and successful\n if (!supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: LockCCAPI, { property }) {\n if (property === \"locked\")\n return this.get();\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses.Lock)\n@implementedVersion(1)\n@ccValues(LockCCValues)\nexport class LockCC extends CommandClass {\n declare ccCommand: LockCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Lock, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n message: \"requesting current lock state...\",\n direction: \"outbound\",\n });\n const locked = await api.get();\n const logMessage = `the lock is ${locked ? \"locked\" : \"unlocked\"}`;\n ctx.logNode(node.id, {\n message: logMessage,\n direction: \"inbound\",\n });\n }\n}\n// @publicAPI\nexport interface LockCCSetOptions {\n locked: boolean;\n}\n@CCCommand(LockCommand.Set)\n@useSupervision()\nexport class LockCCSet extends LockCC {\n public constructor(options: WithAddress<LockCCSetOptions>) {\n super(options);\n this.locked = options.locked;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): LockCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new LockCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public locked: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.locked ? 1 : 0]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { locked: this.locked },\n };\n }\n}\n// @publicAPI\nexport interface LockCCReportOptions {\n locked: boolean;\n}\n@CCCommand(LockCommand.Report)\n@ccValueProperty(\"locked\", LockCCValues.locked)\nexport class LockCCReport extends LockCC {\n public constructor(options: WithAddress<LockCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.locked = options.locked;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): LockCCReport {\n validatePayload(raw.payload.length >= 1);\n const locked = raw.payload[0] === 1;\n return new this({\n nodeId: ctx.sourceNodeId,\n locked,\n });\n }\n public readonly locked: boolean;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { locked: this.locked },\n };\n }\n}\n@CCCommand(LockCommand.Get)\n@expectedCCResponse(LockCCReport)\nexport class LockCCGet extends LockCC {\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import * as __validateArgs from \"./LockCC._validateArgs.js\";\nconst { validateArgs_LockCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, PhysicalCCAPI, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { LockCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { LockCCValues } from \"./_CCValues.generated.js\";\nexport { LockCCValues };\n@API(CommandClasses.Lock)\nexport class LockCCAPI extends PhysicalCCAPI {\n public supportsCommand(cmd: LockCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case LockCommand.Get:\n case LockCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n public async get(): Promise<MaybeNotKnown<boolean>> {\n this.assertSupportsCommand(LockCommand, LockCommand.Get);\n const cc = new LockCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<LockCCReport>(cc, this.commandOptions);\n return response?.locked;\n }\n /**\n * Locks or unlocks the lock\n * @param locked Whether the lock should be locked\n */\n @validateArgs_LockCCAPI_set()\n public async set(locked: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(LockCommand, LockCommand.Set);\n const cc = new LockCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n locked,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: LockCCAPI, { property }, value) {\n if (property !== \"locked\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n const result = await this.set(value);\n // Verify the current value after a delay, unless the command was supervised and successful\n if (!supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: LockCCAPI, { property }) {\n if (property === \"locked\")\n return this.get();\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses.Lock)\n@implementedVersion(1)\n@ccValues(LockCCValues)\nexport class LockCC extends CommandClass {\n declare ccCommand: LockCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses.Lock, ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n message: \"requesting current lock state...\",\n direction: \"outbound\",\n });\n const locked = await api.get();\n const logMessage = `the lock is ${locked ? \"locked\" : \"unlocked\"}`;\n ctx.logNode(node.id, {\n message: logMessage,\n direction: \"inbound\",\n });\n }\n}\n// @publicAPI\nexport interface LockCCSetOptions {\n locked: boolean;\n}\n@CCCommand(LockCommand.Set)\n@useSupervision()\nexport class LockCCSet extends LockCC {\n public constructor(options: WithAddress<LockCCSetOptions>) {\n super(options);\n this.locked = options.locked;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): LockCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new LockCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public locked: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.locked ? 1 : 0]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { locked: this.locked },\n };\n }\n}\n// @publicAPI\nexport interface LockCCReportOptions {\n locked: boolean;\n}\n@CCCommand(LockCommand.Report)\n@ccValueProperty(\"locked\", LockCCValues.locked)\nexport class LockCCReport extends LockCC {\n public constructor(options: WithAddress<LockCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.locked = options.locked;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): LockCCReport {\n validatePayload(raw.payload.length >= 1);\n const locked = raw.payload[0] === 1;\n return new this({\n nodeId: ctx.sourceNodeId,\n locked,\n });\n }\n public readonly locked: boolean;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { locked: this.locked },\n };\n }\n}\n@CCCommand(LockCommand.Get)\n@expectedCCResponse(LockCCReport)\nexport class LockCCGet extends LockCC {\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAmP;AACnP,oBAAsB;AACtB,iBAAuK;AACvK,0BAAuH;AACvH,oCAAiI;AAEjI,mBAA4B;AAE5B,gCAA6B;AAT7B,MAAM,EAAE,2BAA0B,IAAK;IAY1B,aAAS,MAAA;8BADrB,mCAAI,2BAAe,IAAI,CAAC;;;;oBACM;;;iCAAA,YAAa;WAAA;;;;;;;;AAuBxC,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAvBpB,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACF,gBAAgB,KAAgB;AACnC,cAAQ,KAAK;QACT,KAAK,yBAAY;QACjB,KAAK,yBAAY;AACb,iBAAO;MACf;AACA,aAAO,MAAM,gBAAgB,GAAG;IACpC;IACO,MAAM,MAAG;AACZ,WAAK,sBAAsB,0BAAa,yBAAY,GAAG;AACvD,YAAM,KAAK,IAAI,UAAU;QACrB,QAAQ,KAAK,SAAS;QACtB,eAAe,KAAK,SAAS;OAChC;AACD,YAAM,WAAW,MAAM,KAAK,KAAK,YAA0B,IAAI,KAAK,cAAc;AAClF,aAAO,UAAU;IACrB;;;;;IAMO,MAAM,IAAI,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CAAa,MAAM,CAAC;;;;oBACb;oCAAA,YAAM;WAAA;;;;;;;;AAAxC,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAyC;AACxD,YAAM,OAAO;AAEb,WAAK,SAAS,QAAQ;IAC1B;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,SAAS,IAAI,QAAQ,CAAC,MAAM;AAClC,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;OACH;IACL;IACgB;IACT,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,QAAQ,KAAK,OAAM;;IAEtC;;;;IAIS,aAAS,MAAA;8BAFrB,yCAAU,yBAAY,GAAG,OACzB,kDAAmB,YAAY,CAAC;;;;oBACF;iCAAA,YAAM;WAAA;;;;;;;;AAArC,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { Bytes, type BytesView } from "@zwave-js/shared";
|
|
3
3
|
import { CCAPI, type CCAPIEndpoint, type CCAPIHost } from "../lib/API.js";
|
|
4
|
-
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
|
|
4
|
+
import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
|
|
5
5
|
import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
|
|
6
6
|
export type ManufacturerProprietaryCCConstructor<T extends typeof ManufacturerProprietaryCC = typeof ManufacturerProprietaryCC> = T & {
|
|
7
7
|
new (options: any): InstanceType<T>;
|
|
@@ -28,6 +28,6 @@ export declare class ManufacturerProprietaryCC extends CommandClass {
|
|
|
28
28
|
serialize(ctx: CCEncodingContext): Promise<Bytes>;
|
|
29
29
|
createSpecificInstance(): ManufacturerProprietaryCC | undefined;
|
|
30
30
|
interview(ctx: InterviewContext): Promise<void>;
|
|
31
|
-
refreshValues(ctx: RefreshValuesContext): Promise<void>;
|
|
31
|
+
refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=ManufacturerProprietaryCC.d.ts.map
|
|
@@ -33,6 +33,7 @@ __export(ManufacturerProprietaryCC_exports, {
|
|
|
33
33
|
ManufacturerProprietaryCCAPI: () => ManufacturerProprietaryCCAPI
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(ManufacturerProprietaryCC_exports);
|
|
36
|
+
var import_tslib = require("tslib");
|
|
36
37
|
var __validateArgs = __toESM(require("./ManufacturerProprietaryCC._validateArgs.js"), 1);
|
|
37
38
|
var import_core = require("@zwave-js/core");
|
|
38
39
|
var import_shared = require("@zwave-js/shared");
|
|
@@ -41,46 +42,6 @@ var import_CommandClass = require("../lib/CommandClass.js");
|
|
|
41
42
|
var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
|
|
42
43
|
var import_ManufacturerSpecificCC = require("./ManufacturerSpecificCC.js");
|
|
43
44
|
var import_Decorators = require("./manufacturerProprietary/Decorators.js");
|
|
44
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
45
|
-
var useValue = arguments.length > 2;
|
|
46
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
47
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
48
|
-
}
|
|
49
|
-
return useValue ? value : void 0;
|
|
50
|
-
};
|
|
51
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
52
|
-
function accept(f) {
|
|
53
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
54
|
-
return f;
|
|
55
|
-
}
|
|
56
|
-
__name(accept, "accept");
|
|
57
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
58
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
59
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
60
|
-
var _, done = false;
|
|
61
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
62
|
-
var context = {};
|
|
63
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
64
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
65
|
-
context.addInitializer = function(f) {
|
|
66
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
67
|
-
extraInitializers.push(accept(f || null));
|
|
68
|
-
};
|
|
69
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
70
|
-
if (kind === "accessor") {
|
|
71
|
-
if (result === void 0) continue;
|
|
72
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
73
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
74
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
75
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
76
|
-
} else if (_ = accept(result)) {
|
|
77
|
-
if (kind === "field") initializers.unshift(_);
|
|
78
|
-
else descriptor[key] = _;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
82
|
-
done = true;
|
|
83
|
-
};
|
|
84
45
|
const { validateArgs_ManufacturerProprietaryCCAPI_sendData, validateArgs_ManufacturerProprietaryCCAPI_sendAndReceiveData } = __validateArgs;
|
|
85
46
|
let ManufacturerProprietaryCCAPI = (() => {
|
|
86
47
|
let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Manufacturer Proprietary"])];
|
|
@@ -102,16 +63,16 @@ let ManufacturerProprietaryCCAPI = (() => {
|
|
|
102
63
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
103
64
|
_sendData_decorators = [validateArgs_ManufacturerProprietaryCCAPI_sendData()];
|
|
104
65
|
_sendAndReceiveData_decorators = [validateArgs_ManufacturerProprietaryCCAPI_sendAndReceiveData()];
|
|
105
|
-
__esDecorate(this, null, _sendData_decorators, { kind: "method", name: "sendData", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendData" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendData, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
106
|
-
__esDecorate(this, null, _sendAndReceiveData_decorators, { kind: "method", name: "sendAndReceiveData", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendAndReceiveData" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendAndReceiveData, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
107
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
66
|
+
(0, import_tslib.__esDecorate)(this, null, _sendData_decorators, { kind: "method", name: "sendData", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendData" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendData, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
67
|
+
(0, import_tslib.__esDecorate)(this, null, _sendAndReceiveData_decorators, { kind: "method", name: "sendAndReceiveData", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendAndReceiveData" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendAndReceiveData, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
68
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
108
69
|
ManufacturerProprietaryCCAPI2 = _classThis = _classDescriptor.value;
|
|
109
70
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
110
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
71
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
111
72
|
}
|
|
112
73
|
constructor(host, endpoint) {
|
|
113
74
|
super(host, endpoint);
|
|
114
|
-
__runInitializers(this, _instanceExtraInitializers);
|
|
75
|
+
(0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
|
|
115
76
|
const manufacturerId = this.getValueDB().getValue(import_ManufacturerSpecificCC.ManufacturerSpecificCCValues.manufacturerId.id);
|
|
116
77
|
if (manufacturerId != void 0) {
|
|
117
78
|
const SpecificAPIConstructor = (0, import_Decorators.getManufacturerProprietaryAPI)(manufacturerId);
|
|
@@ -171,10 +132,10 @@ let ManufacturerProprietaryCC = (() => {
|
|
|
171
132
|
}
|
|
172
133
|
static {
|
|
173
134
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
174
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
135
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
175
136
|
ManufacturerProprietaryCC2 = _classThis = _classDescriptor.value;
|
|
176
137
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
177
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
138
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
178
139
|
}
|
|
179
140
|
constructor(options) {
|
|
180
141
|
super(options);
|
|
@@ -245,14 +206,14 @@ let ManufacturerProprietaryCC = (() => {
|
|
|
245
206
|
}
|
|
246
207
|
this.setInterviewComplete(ctx, true);
|
|
247
208
|
}
|
|
248
|
-
async refreshValues(ctx) {
|
|
209
|
+
async refreshValues(ctx, options) {
|
|
249
210
|
const node = this.getNode(ctx);
|
|
250
211
|
if (this.manufacturerId == void 0) {
|
|
251
212
|
this.manufacturerId = this.getValue(ctx, import_ManufacturerSpecificCC.ManufacturerSpecificCCValues.manufacturerId);
|
|
252
213
|
}
|
|
253
214
|
const pcInstance = this.createSpecificInstance();
|
|
254
215
|
if (pcInstance) {
|
|
255
|
-
await pcInstance.refreshValues(ctx);
|
|
216
|
+
await pcInstance.refreshValues(ctx, options);
|
|
256
217
|
} else {
|
|
257
218
|
ctx.logNode(node.id, {
|
|
258
219
|
message: `${this.constructor.name}: skipping value refresh because the matching proprietary CC is not implemented...`,
|