@zwave-js/cc 15.1.0 → 15.1.2

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.
Files changed (537) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +7 -7
  2. package/build/cjs/cc/AlarmSensorCC.js +22 -23
  3. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  4. package/build/cjs/cc/AssociationCC.d.ts +8 -9
  5. package/build/cjs/cc/AssociationCC.js +29 -29
  6. package/build/cjs/cc/AssociationCC.js.map +3 -3
  7. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +7 -7
  8. package/build/cjs/cc/AssociationGroupInfoCC.js +31 -32
  9. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  10. package/build/cjs/cc/BarrierOperatorCC.d.ts +8 -8
  11. package/build/cjs/cc/BarrierOperatorCC.js +35 -36
  12. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  13. package/build/cjs/cc/BasicCC.d.ts +4 -4
  14. package/build/cjs/cc/BasicCC.js +23 -24
  15. package/build/cjs/cc/BasicCC.js.map +3 -3
  16. package/build/cjs/cc/BatteryCC.d.ts +6 -8
  17. package/build/cjs/cc/BatteryCC.js +24 -28
  18. package/build/cjs/cc/BatteryCC.js.map +3 -3
  19. package/build/cjs/cc/BinarySensorCC.d.ts +5 -5
  20. package/build/cjs/cc/BinarySensorCC.js +20 -21
  21. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  22. package/build/cjs/cc/BinarySwitchCC._validateArgs.js +2 -2
  23. package/build/cjs/cc/BinarySwitchCC.d.ts +6 -6
  24. package/build/cjs/cc/BinarySwitchCC.js +26 -26
  25. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  26. package/build/cjs/cc/CRC16CC.d.ts +3 -3
  27. package/build/cjs/cc/CRC16CC.js +15 -15
  28. package/build/cjs/cc/CRC16CC.js.map +3 -3
  29. package/build/cjs/cc/CentralSceneCC.d.ts +8 -8
  30. package/build/cjs/cc/CentralSceneCC.js +23 -24
  31. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  32. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +6 -6
  33. package/build/cjs/cc/ClimateControlScheduleCC.js +19 -20
  34. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  35. package/build/cjs/cc/ClockCC.d.ts +3 -4
  36. package/build/cjs/cc/ClockCC.js +13 -14
  37. package/build/cjs/cc/ClockCC.js.map +3 -3
  38. package/build/cjs/cc/ColorSwitchCC.d.ts +3 -4
  39. package/build/cjs/cc/ColorSwitchCC.js +22 -24
  40. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  41. package/build/cjs/cc/ConfigurationCC.d.ts +3 -3
  42. package/build/cjs/cc/ConfigurationCC.js +114 -115
  43. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  44. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +2 -2
  45. package/build/cjs/cc/DeviceResetLocallyCC.js +5 -5
  46. package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
  47. package/build/cjs/cc/DoorLockCC.d.ts +29 -29
  48. package/build/cjs/cc/DoorLockCC.js +39 -40
  49. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  50. package/build/cjs/cc/DoorLockLoggingCC.d.ts +4 -4
  51. package/build/cjs/cc/DoorLockLoggingCC.js +13 -14
  52. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  53. package/build/cjs/cc/EnergyProductionCC.d.ts +2 -3
  54. package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
  55. package/build/cjs/cc/EntryControlCC.d.ts +8 -8
  56. package/build/cjs/cc/EntryControlCC.js +41 -42
  57. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  58. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
  59. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +52 -53
  60. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  61. package/build/cjs/cc/HailCC.js +2 -2
  62. package/build/cjs/cc/HailCC.js.map +1 -1
  63. package/build/cjs/cc/HumidityControlModeCC.d.ts +5 -5
  64. package/build/cjs/cc/HumidityControlModeCC.js +20 -21
  65. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  66. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +3 -3
  67. package/build/cjs/cc/HumidityControlOperatingStateCC.js +9 -9
  68. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  69. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +6 -6
  70. package/build/cjs/cc/HumidityControlSetpointCC.js +43 -44
  71. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  72. package/build/cjs/cc/InclusionControllerCC.d.ts +2 -3
  73. package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
  74. package/build/cjs/cc/IndicatorCC.d.ts +3 -3
  75. package/build/cjs/cc/IndicatorCC.js +50 -52
  76. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  77. package/build/cjs/cc/IrrigationCC.d.ts +3 -3
  78. package/build/cjs/cc/IrrigationCC.js +74 -75
  79. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  80. package/build/cjs/cc/LanguageCC.d.ts +5 -6
  81. package/build/cjs/cc/LanguageCC.js +14 -15
  82. package/build/cjs/cc/LanguageCC.js.map +3 -3
  83. package/build/cjs/cc/LockCC.d.ts +4 -4
  84. package/build/cjs/cc/LockCC.js +10 -10
  85. package/build/cjs/cc/LockCC.js.map +3 -3
  86. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +4 -3
  87. package/build/cjs/cc/ManufacturerProprietaryCC.js +14 -12
  88. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +3 -3
  89. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +7 -8
  90. package/build/cjs/cc/ManufacturerSpecificCC.js +20 -21
  91. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  92. package/build/cjs/cc/MeterCC.d.ts +4 -6
  93. package/build/cjs/cc/MeterCC.js +52 -54
  94. package/build/cjs/cc/MeterCC.js.map +3 -3
  95. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +7 -8
  96. package/build/cjs/cc/MultiChannelAssociationCC.js +34 -35
  97. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  98. package/build/cjs/cc/MultiChannelCC.d.ts +13 -12
  99. package/build/cjs/cc/MultiChannelCC.js +104 -56
  100. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  101. package/build/cjs/cc/MultiCommandCC.d.ts +3 -3
  102. package/build/cjs/cc/MultiCommandCC.js +13 -13
  103. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  104. package/build/cjs/cc/MultilevelSensorCC.d.ts +4 -7
  105. package/build/cjs/cc/MultilevelSensorCC.js +26 -28
  106. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  107. package/build/cjs/cc/MultilevelSwitchCC._validateArgs.js +3 -3
  108. package/build/cjs/cc/MultilevelSwitchCC.d.ts +13 -13
  109. package/build/cjs/cc/MultilevelSwitchCC.js +36 -37
  110. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  111. package/build/cjs/cc/NoOperationCC.js +4 -4
  112. package/build/cjs/cc/NoOperationCC.js.map +1 -1
  113. package/build/cjs/cc/NodeNamingCC.d.ts +5 -5
  114. package/build/cjs/cc/NodeNamingCC.js +20 -20
  115. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  116. package/build/cjs/cc/NotificationCC.d.ts +4 -5
  117. package/build/cjs/cc/NotificationCC.js +66 -68
  118. package/build/cjs/cc/NotificationCC.js.map +3 -3
  119. package/build/cjs/cc/PowerlevelCC.d.ts +3 -3
  120. package/build/cjs/cc/PowerlevelCC.js +25 -26
  121. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  122. package/build/cjs/cc/ProtectionCC._validateArgs.js +2 -2
  123. package/build/cjs/cc/ProtectionCC.d.ts +11 -11
  124. package/build/cjs/cc/ProtectionCC.js +35 -36
  125. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  126. package/build/cjs/cc/SceneActivationCC._validateArgs.js +2 -2
  127. package/build/cjs/cc/SceneActivationCC.d.ts +5 -6
  128. package/build/cjs/cc/SceneActivationCC.js +10 -10
  129. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  130. package/build/cjs/cc/SceneActuatorConfigurationCC._validateArgs.js +2 -2
  131. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +5 -5
  132. package/build/cjs/cc/SceneActuatorConfigurationCC.js +19 -20
  133. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  134. package/build/cjs/cc/SceneControllerConfigurationCC._validateArgs.js +2 -2
  135. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +6 -6
  136. package/build/cjs/cc/SceneControllerConfigurationCC.js +25 -26
  137. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  138. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +2 -3
  139. package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
  140. package/build/cjs/cc/Security2CC.d.ts +3 -4
  141. package/build/cjs/cc/Security2CC.js +60 -62
  142. package/build/cjs/cc/Security2CC.js.map +3 -3
  143. package/build/cjs/cc/SecurityCC.d.ts +3 -4
  144. package/build/cjs/cc/SecurityCC.js +25 -26
  145. package/build/cjs/cc/SecurityCC.js.map +3 -3
  146. package/build/cjs/cc/SoundSwitchCC.d.ts +7 -7
  147. package/build/cjs/cc/SoundSwitchCC.js +28 -29
  148. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  149. package/build/cjs/cc/SupervisionCC.d.ts +4 -4
  150. package/build/cjs/cc/SupervisionCC.js +28 -29
  151. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  152. package/build/cjs/cc/ThermostatFanModeCC.d.ts +6 -6
  153. package/build/cjs/cc/ThermostatFanModeCC.js +21 -22
  154. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  155. package/build/cjs/cc/ThermostatFanStateCC.d.ts +3 -3
  156. package/build/cjs/cc/ThermostatFanStateCC.js +9 -9
  157. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  158. package/build/cjs/cc/ThermostatModeCC.d.ts +6 -6
  159. package/build/cjs/cc/ThermostatModeCC.js +30 -31
  160. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  161. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +3 -4
  162. package/build/cjs/cc/ThermostatOperatingStateCC.js +9 -9
  163. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  164. package/build/cjs/cc/ThermostatSetbackCC.d.ts +3 -3
  165. package/build/cjs/cc/ThermostatSetbackCC.js +14 -15
  166. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  167. package/build/cjs/cc/ThermostatSetpointCC.d.ts +6 -6
  168. package/build/cjs/cc/ThermostatSetpointCC.js +48 -49
  169. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  170. package/build/cjs/cc/TimeCC.d.ts +3 -4
  171. package/build/cjs/cc/TimeCC.js +9 -10
  172. package/build/cjs/cc/TimeCC.js.map +3 -3
  173. package/build/cjs/cc/TimeParametersCC.d.ts +3 -4
  174. package/build/cjs/cc/TimeParametersCC.js +2 -2
  175. package/build/cjs/cc/TimeParametersCC.js.map +2 -2
  176. package/build/cjs/cc/TransportServiceCC.d.ts +3 -3
  177. package/build/cjs/cc/TransportServiceCC.js +44 -45
  178. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  179. package/build/cjs/cc/UserCodeCC.d.ts +19 -19
  180. package/build/cjs/cc/UserCodeCC.js +102 -103
  181. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  182. package/build/cjs/cc/VersionCC.d.ts +17 -17
  183. package/build/cjs/cc/VersionCC.js +46 -47
  184. package/build/cjs/cc/VersionCC.js.map +3 -3
  185. package/build/cjs/cc/WakeUpCC.d.ts +6 -6
  186. package/build/cjs/cc/WakeUpCC.js +16 -17
  187. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  188. package/build/cjs/cc/WindowCoveringCC.d.ts +3 -4
  189. package/build/cjs/cc/WindowCoveringCC.js +17 -18
  190. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  191. package/build/cjs/cc/ZWavePlusCC.d.ts +8 -8
  192. package/build/cjs/cc/ZWavePlusCC.js +15 -16
  193. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  194. package/build/cjs/cc/ZWaveProtocolCC.d.ts +2 -2
  195. package/build/cjs/cc/ZWaveProtocolCC.js +35 -35
  196. package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
  197. package/build/cjs/cc/_CCValues.generated.d.ts +2 -0
  198. package/build/cjs/cc/_CCValues.generated.js +28 -27
  199. package/build/cjs/cc/_CCValues.generated.js.map +3 -3
  200. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
  201. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +14 -14
  202. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  203. package/build/cjs/lib/API.d.ts +3 -3
  204. package/build/cjs/lib/API.js.map +2 -2
  205. package/build/cjs/lib/CommandClass.d.ts +5 -6
  206. package/build/cjs/lib/CommandClass.js +45 -45
  207. package/build/cjs/lib/CommandClass.js.map +3 -3
  208. package/build/cjs/lib/CommandClassDecorators.d.ts +2 -2
  209. package/build/cjs/lib/CommandClassDecorators.js +3 -3
  210. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  211. package/build/cjs/lib/Security2/Extension.d.ts +2 -2
  212. package/build/cjs/lib/Security2/Extension.js +17 -17
  213. package/build/cjs/lib/Security2/Extension.js.map +3 -3
  214. package/build/cjs/lib/SetValueResult.d.ts +1 -1
  215. package/build/cjs/lib/SetValueResult.js.map +1 -1
  216. package/build/cjs/lib/Values.d.ts +3 -3
  217. package/build/cjs/lib/Values.js +6 -6
  218. package/build/cjs/lib/Values.js.map +2 -2
  219. package/build/cjs/lib/_Types.d.ts +2 -2
  220. package/build/cjs/lib/_Types.js +3 -3
  221. package/build/cjs/lib/_Types.js.map +1 -1
  222. package/build/cjs/lib/serializers.d.ts +1 -1
  223. package/build/cjs/lib/serializers.js +5 -5
  224. package/build/cjs/lib/serializers.js.map +2 -2
  225. package/build/cjs/lib/traits.d.ts +2 -2
  226. package/build/cjs/lib/utils.d.ts +2 -2
  227. package/build/cjs/lib/utils.js +60 -60
  228. package/build/cjs/lib/utils.js.map +3 -3
  229. package/build/esm/cc/AlarmSensorCC.d.ts +7 -7
  230. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  231. package/build/esm/cc/AlarmSensorCC.js +2 -3
  232. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  233. package/build/esm/cc/AssociationCC.d.ts +8 -9
  234. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  235. package/build/esm/cc/AssociationCC.js +2 -2
  236. package/build/esm/cc/AssociationCC.js.map +1 -1
  237. package/build/esm/cc/AssociationGroupInfoCC.d.ts +7 -7
  238. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  239. package/build/esm/cc/AssociationGroupInfoCC.js +2 -3
  240. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  241. package/build/esm/cc/BarrierOperatorCC.d.ts +8 -8
  242. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  243. package/build/esm/cc/BarrierOperatorCC.js +2 -3
  244. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  245. package/build/esm/cc/BasicCC.d.ts +4 -4
  246. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  247. package/build/esm/cc/BasicCC.js +2 -3
  248. package/build/esm/cc/BasicCC.js.map +1 -1
  249. package/build/esm/cc/BatteryCC.d.ts +6 -8
  250. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  251. package/build/esm/cc/BatteryCC.js +13 -15
  252. package/build/esm/cc/BatteryCC.js.map +1 -1
  253. package/build/esm/cc/BinarySensorCC.d.ts +5 -5
  254. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  255. package/build/esm/cc/BinarySensorCC.js +2 -3
  256. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  257. package/build/esm/cc/BinarySwitchCC._validateArgs.js +1 -1
  258. package/build/esm/cc/BinarySwitchCC._validateArgs.js.map +1 -1
  259. package/build/esm/cc/BinarySwitchCC.d.ts +6 -6
  260. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  261. package/build/esm/cc/BinarySwitchCC.js +2 -2
  262. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  263. package/build/esm/cc/CRC16CC.d.ts +3 -3
  264. package/build/esm/cc/CRC16CC.d.ts.map +1 -1
  265. package/build/esm/cc/CRC16CC.js +2 -2
  266. package/build/esm/cc/CRC16CC.js.map +1 -1
  267. package/build/esm/cc/CentralSceneCC.d.ts +8 -8
  268. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  269. package/build/esm/cc/CentralSceneCC.js +2 -3
  270. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  271. package/build/esm/cc/ClimateControlScheduleCC.d.ts +6 -6
  272. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  273. package/build/esm/cc/ClimateControlScheduleCC.js +2 -3
  274. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  275. package/build/esm/cc/ClockCC.d.ts +3 -4
  276. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  277. package/build/esm/cc/ClockCC.js +2 -3
  278. package/build/esm/cc/ClockCC.js.map +1 -1
  279. package/build/esm/cc/ColorSwitchCC.d.ts +3 -4
  280. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  281. package/build/esm/cc/ColorSwitchCC.js +2 -4
  282. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  283. package/build/esm/cc/ConfigurationCC.d.ts +3 -3
  284. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  285. package/build/esm/cc/ConfigurationCC.js +2 -3
  286. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  287. package/build/esm/cc/DeviceResetLocallyCC.d.ts +2 -2
  288. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  289. package/build/esm/cc/DeviceResetLocallyCC.js +1 -1
  290. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  291. package/build/esm/cc/DoorLockCC.d.ts +29 -29
  292. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  293. package/build/esm/cc/DoorLockCC.js +2 -3
  294. package/build/esm/cc/DoorLockCC.js.map +1 -1
  295. package/build/esm/cc/DoorLockLoggingCC.d.ts +4 -4
  296. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  297. package/build/esm/cc/DoorLockLoggingCC.js +2 -3
  298. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  299. package/build/esm/cc/EnergyProductionCC.d.ts +2 -3
  300. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
  301. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  302. package/build/esm/cc/EntryControlCC.d.ts +8 -8
  303. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  304. package/build/esm/cc/EntryControlCC.js +2 -3
  305. package/build/esm/cc/EntryControlCC.js.map +1 -1
  306. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +9 -10
  307. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  308. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +2 -3
  309. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  310. package/build/esm/cc/HailCC.js +1 -1
  311. package/build/esm/cc/HailCC.js.map +1 -1
  312. package/build/esm/cc/HumidityControlModeCC.d.ts +5 -5
  313. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  314. package/build/esm/cc/HumidityControlModeCC.js +2 -3
  315. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  316. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +3 -3
  317. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  318. package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -2
  319. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  320. package/build/esm/cc/HumidityControlSetpointCC.d.ts +6 -6
  321. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  322. package/build/esm/cc/HumidityControlSetpointCC.js +2 -3
  323. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  324. package/build/esm/cc/InclusionControllerCC.d.ts +2 -3
  325. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
  326. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  327. package/build/esm/cc/IndicatorCC.d.ts +3 -3
  328. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  329. package/build/esm/cc/IndicatorCC.js +2 -4
  330. package/build/esm/cc/IndicatorCC.js.map +1 -1
  331. package/build/esm/cc/IrrigationCC.d.ts +3 -3
  332. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  333. package/build/esm/cc/IrrigationCC.js +2 -3
  334. package/build/esm/cc/IrrigationCC.js.map +1 -1
  335. package/build/esm/cc/LanguageCC.d.ts +5 -6
  336. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  337. package/build/esm/cc/LanguageCC.js +2 -3
  338. package/build/esm/cc/LanguageCC.js.map +1 -1
  339. package/build/esm/cc/LockCC.d.ts +4 -4
  340. package/build/esm/cc/LockCC.d.ts.map +1 -1
  341. package/build/esm/cc/LockCC.js +2 -2
  342. package/build/esm/cc/LockCC.js.map +1 -1
  343. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +4 -3
  344. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  345. package/build/esm/cc/ManufacturerProprietaryCC.js +5 -3
  346. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  347. package/build/esm/cc/ManufacturerSpecificCC.d.ts +7 -8
  348. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  349. package/build/esm/cc/ManufacturerSpecificCC.js +2 -3
  350. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  351. package/build/esm/cc/MeterCC.d.ts +4 -6
  352. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  353. package/build/esm/cc/MeterCC.js +2 -4
  354. package/build/esm/cc/MeterCC.js.map +1 -1
  355. package/build/esm/cc/MultiChannelAssociationCC.d.ts +7 -8
  356. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  357. package/build/esm/cc/MultiChannelAssociationCC.js +2 -3
  358. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  359. package/build/esm/cc/MultiChannelCC.d.ts +13 -12
  360. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  361. package/build/esm/cc/MultiChannelCC.js +65 -16
  362. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  363. package/build/esm/cc/MultiCommandCC.d.ts +3 -3
  364. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
  365. package/build/esm/cc/MultiCommandCC.js +2 -2
  366. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  367. package/build/esm/cc/MultilevelSensorCC.d.ts +4 -7
  368. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  369. package/build/esm/cc/MultilevelSensorCC.js +2 -4
  370. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  371. package/build/esm/cc/MultilevelSwitchCC._validateArgs.js +1 -1
  372. package/build/esm/cc/MultilevelSwitchCC._validateArgs.js.map +1 -1
  373. package/build/esm/cc/MultilevelSwitchCC.d.ts +13 -13
  374. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  375. package/build/esm/cc/MultilevelSwitchCC.js +2 -3
  376. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  377. package/build/esm/cc/NoOperationCC.js +1 -1
  378. package/build/esm/cc/NoOperationCC.js.map +1 -1
  379. package/build/esm/cc/NodeNamingCC.d.ts +5 -5
  380. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  381. package/build/esm/cc/NodeNamingCC.js +2 -2
  382. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  383. package/build/esm/cc/NotificationCC.d.ts +4 -5
  384. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  385. package/build/esm/cc/NotificationCC.js +2 -4
  386. package/build/esm/cc/NotificationCC.js.map +1 -1
  387. package/build/esm/cc/PowerlevelCC.d.ts +3 -3
  388. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
  389. package/build/esm/cc/PowerlevelCC.js +2 -3
  390. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  391. package/build/esm/cc/ProtectionCC._validateArgs.js +1 -1
  392. package/build/esm/cc/ProtectionCC._validateArgs.js.map +1 -1
  393. package/build/esm/cc/ProtectionCC.d.ts +11 -11
  394. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  395. package/build/esm/cc/ProtectionCC.js +2 -3
  396. package/build/esm/cc/ProtectionCC.js.map +1 -1
  397. package/build/esm/cc/SceneActivationCC._validateArgs.js +1 -1
  398. package/build/esm/cc/SceneActivationCC._validateArgs.js.map +1 -1
  399. package/build/esm/cc/SceneActivationCC.d.ts +5 -6
  400. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  401. package/build/esm/cc/SceneActivationCC.js +2 -2
  402. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  403. package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js +1 -1
  404. package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js.map +1 -1
  405. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +5 -5
  406. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  407. package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -3
  408. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  409. package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js +1 -1
  410. package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js.map +1 -1
  411. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +6 -6
  412. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  413. package/build/esm/cc/SceneControllerConfigurationCC.js +2 -3
  414. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  415. package/build/esm/cc/ScheduleEntryLockCC.d.ts +2 -3
  416. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  417. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  418. package/build/esm/cc/Security2CC.d.ts +3 -4
  419. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  420. package/build/esm/cc/Security2CC.js +2 -4
  421. package/build/esm/cc/Security2CC.js.map +1 -1
  422. package/build/esm/cc/SecurityCC.d.ts +3 -4
  423. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  424. package/build/esm/cc/SecurityCC.js +1 -2
  425. package/build/esm/cc/SecurityCC.js.map +1 -1
  426. package/build/esm/cc/SoundSwitchCC.d.ts +7 -7
  427. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  428. package/build/esm/cc/SoundSwitchCC.js +2 -3
  429. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  430. package/build/esm/cc/SupervisionCC.d.ts +4 -4
  431. package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
  432. package/build/esm/cc/SupervisionCC.js +2 -3
  433. package/build/esm/cc/SupervisionCC.js.map +1 -1
  434. package/build/esm/cc/ThermostatFanModeCC.d.ts +6 -6
  435. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  436. package/build/esm/cc/ThermostatFanModeCC.js +2 -3
  437. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  438. package/build/esm/cc/ThermostatFanStateCC.d.ts +3 -3
  439. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  440. package/build/esm/cc/ThermostatFanStateCC.js +2 -2
  441. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  442. package/build/esm/cc/ThermostatModeCC.d.ts +6 -6
  443. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  444. package/build/esm/cc/ThermostatModeCC.js +2 -3
  445. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  446. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +3 -4
  447. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  448. package/build/esm/cc/ThermostatOperatingStateCC.js +2 -2
  449. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  450. package/build/esm/cc/ThermostatSetbackCC.d.ts +3 -3
  451. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
  452. package/build/esm/cc/ThermostatSetbackCC.js +2 -3
  453. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  454. package/build/esm/cc/ThermostatSetpointCC.d.ts +6 -6
  455. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  456. package/build/esm/cc/ThermostatSetpointCC.js +2 -3
  457. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  458. package/build/esm/cc/TimeCC.d.ts +3 -4
  459. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  460. package/build/esm/cc/TimeCC.js +1 -2
  461. package/build/esm/cc/TimeCC.js.map +1 -1
  462. package/build/esm/cc/TimeParametersCC.d.ts +3 -4
  463. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  464. package/build/esm/cc/TimeParametersCC.js +1 -1
  465. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  466. package/build/esm/cc/TransportServiceCC.d.ts +3 -3
  467. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  468. package/build/esm/cc/TransportServiceCC.js +2 -3
  469. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  470. package/build/esm/cc/UserCodeCC.d.ts +19 -19
  471. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  472. package/build/esm/cc/UserCodeCC.js +2 -3
  473. package/build/esm/cc/UserCodeCC.js.map +1 -1
  474. package/build/esm/cc/VersionCC.d.ts +17 -17
  475. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  476. package/build/esm/cc/VersionCC.js +2 -3
  477. package/build/esm/cc/VersionCC.js.map +1 -1
  478. package/build/esm/cc/WakeUpCC.d.ts +6 -6
  479. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  480. package/build/esm/cc/WakeUpCC.js +2 -3
  481. package/build/esm/cc/WakeUpCC.js.map +1 -1
  482. package/build/esm/cc/WindowCoveringCC.d.ts +3 -4
  483. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  484. package/build/esm/cc/WindowCoveringCC.js +1 -2
  485. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  486. package/build/esm/cc/ZWavePlusCC.d.ts +8 -8
  487. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  488. package/build/esm/cc/ZWavePlusCC.js +2 -3
  489. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  490. package/build/esm/cc/ZWaveProtocolCC.d.ts +2 -2
  491. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  492. package/build/esm/cc/ZWaveProtocolCC.js +1 -1
  493. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  494. package/build/esm/cc/_CCValues.generated.d.ts +2 -0
  495. package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
  496. package/build/esm/cc/_CCValues.generated.js +5 -4
  497. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  498. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
  499. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  500. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +1 -1
  501. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  502. package/build/esm/lib/API.d.ts +3 -3
  503. package/build/esm/lib/API.d.ts.map +1 -1
  504. package/build/esm/lib/API.js.map +1 -1
  505. package/build/esm/lib/CommandClass.d.ts +5 -6
  506. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  507. package/build/esm/lib/CommandClass.js +2 -2
  508. package/build/esm/lib/CommandClass.js.map +1 -1
  509. package/build/esm/lib/CommandClassDecorators.d.ts +2 -2
  510. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  511. package/build/esm/lib/CommandClassDecorators.js +1 -1
  512. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  513. package/build/esm/lib/Security2/Extension.d.ts +2 -2
  514. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  515. package/build/esm/lib/Security2/Extension.js +2 -2
  516. package/build/esm/lib/Security2/Extension.js.map +1 -1
  517. package/build/esm/lib/SetValueResult.d.ts +1 -1
  518. package/build/esm/lib/SetValueResult.d.ts.map +1 -1
  519. package/build/esm/lib/Values.d.ts +3 -3
  520. package/build/esm/lib/Values.d.ts.map +1 -1
  521. package/build/esm/lib/Values.js +1 -1
  522. package/build/esm/lib/Values.js.map +1 -1
  523. package/build/esm/lib/_Types.d.ts +2 -2
  524. package/build/esm/lib/_Types.d.ts.map +1 -1
  525. package/build/esm/lib/_Types.js +1 -1
  526. package/build/esm/lib/_Types.js.map +1 -1
  527. package/build/esm/lib/serializers.d.ts +1 -1
  528. package/build/esm/lib/serializers.d.ts.map +1 -1
  529. package/build/esm/lib/serializers.js +1 -1
  530. package/build/esm/lib/serializers.js.map +1 -1
  531. package/build/esm/lib/traits.d.ts +2 -2
  532. package/build/esm/lib/traits.d.ts.map +1 -1
  533. package/build/esm/lib/utils.d.ts +2 -2
  534. package/build/esm/lib/utils.d.ts.map +1 -1
  535. package/build/esm/lib/utils.js +2 -2
  536. package/build/esm/lib/utils.js.map +1 -1
  537. package/package.json +6 -6
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/ProtectionCC.ts"],
4
- "sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tTimeout,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tLocalProtectionState,\n\tProtectionCommand,\n\tRFProtectionState,\n} from \"../lib/_Types.js\";\n\nexport const ProtectionCCValues = V.defineCCValues(CommandClasses.Protection, {\n\t...V.staticProperty(\n\t\t\"exclusiveControlNodeId\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tmin: 1,\n\t\t\tmax: MAX_NODES,\n\t\t\tlabel: \"Node ID with exclusive control\",\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticPropertyWithName(\n\t\t\"localProtectionState\",\n\t\t\"local\",\n\t\t{\n\t\t\t...ValueMetadata.Number,\n\t\t\tlabel: \"Local protection state\",\n\t\t\tstates: enumValuesToMetadataStates(LocalProtectionState),\n\t\t} as const,\n\t),\n\t...V.staticPropertyWithName(\n\t\t\"rfProtectionState\",\n\t\t\"rf\",\n\t\t{\n\t\t\t...ValueMetadata.Number,\n\t\t\tlabel: \"RF protection state\",\n\t\t\tstates: enumValuesToMetadataStates(RFProtectionState),\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticProperty(\n\t\t\"timeout\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"RF protection timeout\",\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticProperty(\"supportsExclusiveControl\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportsTimeout\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportedLocalStates\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportedRFStates\", undefined, {\n\t\tinternal: true,\n\t}),\n});\n\n@API(CommandClasses.Protection)\nexport class ProtectionCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ProtectionCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ProtectionCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ProtectionCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase ProtectionCommand.SupportedGet:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase ProtectionCommand.TimeoutGet:\n\t\t\tcase ProtectionCommand.TimeoutSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsTimeout.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase ProtectionCommand.ExclusiveControlGet:\n\t\t\tcase ProtectionCommand.ExclusiveControlSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsExclusiveControl.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }, value) {\n\t\t\tconst valueDB = this.tryGetValueDB();\n\t\t\tif (property === \"local\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst rf = valueDB?.getValue<RFProtectionState>(\n\t\t\t\t\tProtectionCCValues.rfProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(value, rf);\n\t\t\t} else if (property === \"rf\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst local = valueDB?.getValue<LocalProtectionState>(\n\t\t\t\t\tProtectionCCValues.localProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(\n\t\t\t\t\tlocal ?? LocalProtectionState.Unprotected,\n\t\t\t\t\tvalue,\n\t\t\t\t);\n\t\t\t} else if (property === \"exclusiveControlNodeId\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.setExclusiveControl(value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"local\":\n\t\t\t\tcase \"rf\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tcase \"exclusiveControlNodeId\":\n\t\t\t\t\treturn this.getExclusiveControl();\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Get);\n\n\t\tconst cc = new ProtectionCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<ProtectionCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"local\", \"rf\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tlocal: LocalProtectionState,\n\t\trf?: RFProtectionState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Set);\n\n\t\tconst cc = new ProtectionCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"supportsExclusiveControl\",\n\t\t\t\t\"supportsTimeout\",\n\t\t\t\t\"supportedLocalStates\",\n\t\t\t\t\"supportedRFStates\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getExclusiveControl(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCExclusiveControlReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.exclusiveControlNodeId;\n\t}\n\n\t@validateArgs()\n\tpublic async setExclusiveControl(\n\t\tnodeId: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\texclusiveControlNodeId: nodeId,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getTimeout(): Promise<MaybeNotKnown<Timeout>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCTimeoutReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.timeout;\n\t}\n\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\ttimeout: Timeout,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Protection)\n@implementedVersion(2)\n@ccValues(ProtectionCCValues)\nexport class ProtectionCC extends CommandClass {\n\tdeclare ccCommand: ProtectionCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// First find out what the device supports\n\t\tif (api.version >= 2) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getSupported();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received protection capabilities:\nexclusive control: ${resp.supportsExclusiveControl}\ntimeout: ${resp.supportsTimeout}\nlocal protection states: ${\n\t\t\t\t\tresp.supportedLocalStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nRF protection states: ${\n\t\t\t\t\tresp.supportedRFStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(RFProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst supportsExclusiveControl = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsExclusiveControl,\n\t\t);\n\t\tconst supportsTimeout = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsTimeout,\n\t\t);\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tmessage: \"querying protection status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst protectionResp = await api.get();\n\t\tif (protectionResp) {\n\t\t\tlet logMessage = `received protection status:\nlocal: ${getEnumMemberName(LocalProtectionState, protectionResp.local)}`;\n\t\t\tif (protectionResp.rf != undefined) {\n\t\t\t\tlogMessage += `\nrf ${getEnumMemberName(RFProtectionState, protectionResp.rf)}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tif (supportsTimeout) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection timeout...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst timeout = await api.getTimeout();\n\t\t\tif (timeout) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: `received timeout: ${timeout.toString()}`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (supportsExclusiveControl) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying exclusive control node...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst nodeId = await api.getExclusiveControl();\n\t\t\tif (nodeId != undefined) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: (nodeId !== 0\n\t\t\t\t\t\t? `Node ${nodeId.toString().padStart(3, \"0\")}`\n\t\t\t\t\t\t: `no node`) + ` has exclusive control`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCSetOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Set)\n@useSupervision()\nexport class ProtectionCCSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(_raw: CCRaw, _ctx: CCParsingContext): ProtectionCCSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic local: LocalProtectionState;\n\tpublic rf?: RFProtectionState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.local & 0b1111,\n\t\t\t(this.rf ?? RFProtectionState.Unprotected) & 0b1111,\n\t\t]);\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\t\tif (\n\t\t\tccVersion < 2 && ctx.getDeviceConfig?.(\n\t\t\t\tthis.nodeId as number,\n\t\t\t)?.compat?.encodeCCsUsingTargetVersion\n\t\t) {\n\t\t\t// When forcing CC version 1, only include the local state\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCReportOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Report)\n@ccValueProperty(\"local\", ProtectionCCValues.localProtectionState)\n@ccValueProperty(\"rf\", ProtectionCCValues.rfProtectionState)\nexport class ProtectionCCReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ProtectionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst local: LocalProtectionState = raw.payload[0] & 0b1111;\n\t\tlet rf: RFProtectionState | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\trf = raw.payload[1] & 0b1111;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t}\n\n\tpublic readonly local: LocalProtectionState;\n\n\tpublic readonly rf?: RFProtectionState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.Get)\n@expectedCCResponse(ProtectionCCReport)\nexport class ProtectionCCGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCSupportedReportOptions {\n\tsupportsTimeout: boolean;\n\tsupportsExclusiveControl: boolean;\n\tsupportedLocalStates: LocalProtectionState[];\n\tsupportedRFStates: RFProtectionState[];\n}\n\n@CCCommand(ProtectionCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportsExclusiveControl\",\n\tProtectionCCValues.supportsExclusiveControl,\n)\n@ccValueProperty(\"supportsTimeout\", ProtectionCCValues.supportsTimeout)\n@ccValueProperty(\n\t\"supportedLocalStates\",\n\tProtectionCCValues.supportedLocalStates,\n)\n@ccValueProperty(\"supportedRFStates\", ProtectionCCValues.supportedRFStates)\nexport class ProtectionCCSupportedReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportsTimeout = options.supportsTimeout;\n\t\tthis.supportsExclusiveControl = options.supportsExclusiveControl;\n\t\tthis.supportedLocalStates = options.supportedLocalStates;\n\t\tthis.supportedRFStates = options.supportedRFStates;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst supportsTimeout = !!(raw.payload[0] & 0b1);\n\t\tconst supportsExclusiveControl = !!(raw.payload[0] & 0b10);\n\t\tconst supportedLocalStates: LocalProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(1, 3),\n\t\t\tLocalProtectionState.Unprotected,\n\t\t);\n\t\tconst supportedRFStates: RFProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(3, 5),\n\t\t\tRFProtectionState.Unprotected,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportsTimeout,\n\t\t\tsupportsExclusiveControl,\n\t\t\tsupportedLocalStates,\n\t\t\tsupportedRFStates,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// update metadata (partially) for the local and rf values\n\t\tconst localStateValue = ProtectionCCValues.localProtectionState;\n\t\tthis.setMetadata(ctx, localStateValue, {\n\t\t\t...localStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tLocalProtectionState,\n\t\t\t\tthis.supportedLocalStates,\n\t\t\t),\n\t\t});\n\n\t\tconst rfStateValue = ProtectionCCValues.rfProtectionState;\n\t\tthis.setMetadata(ctx, rfStateValue, {\n\t\t\t...rfStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tRFProtectionState,\n\t\t\t\tthis.supportedRFStates,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportsExclusiveControl: boolean;\n\n\tpublic readonly supportsTimeout: boolean;\n\n\tpublic readonly supportedLocalStates: LocalProtectionState[];\n\n\tpublic readonly supportedRFStates: RFProtectionState[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supports exclusive control\": this.supportsExclusiveControl,\n\t\t\t\t\"supports timeout\": this.supportsTimeout,\n\t\t\t\t\"local protection states\": this.supportedLocalStates\n\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t)\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"RF protection states\": this.supportedRFStates\n\t\t\t\t\t.map((rf) => getEnumMemberName(RFProtectionState, rf))\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.SupportedGet)\n@expectedCCResponse(ProtectionCCSupportedReport)\nexport class ProtectionCCSupportedGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlReportOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlReport)\n@ccValueProperty(\n\t\"exclusiveControlNodeId\",\n\tProtectionCCValues.exclusiveControlNodeId,\n)\nexport class ProtectionCCExclusiveControlReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst exclusiveControlNodeId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\texclusiveControlNodeId,\n\t\t});\n\t}\n\n\tpublic readonly exclusiveControlNodeId: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlGet)\n@expectedCCResponse(ProtectionCCExclusiveControlReport)\nexport class ProtectionCCExclusiveControlGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlSetOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCExclusiveControlSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCExclusiveControlSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic exclusiveControlNodeId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.exclusiveControlNodeId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutReportOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutReport)\n@ccValueProperty(\"timeout\", ProtectionCCValues.timeout)\nexport class ProtectionCCTimeoutReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCTimeoutReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst timeout: Timeout = Timeout.parse(raw.payload[0]);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttimeout,\n\t\t});\n\t}\n\n\tpublic readonly timeout: Timeout;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.TimeoutGet)\n@expectedCCResponse(ProtectionCCTimeoutReport)\nexport class ProtectionCCTimeoutGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutSetOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCTimeoutSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCTimeoutSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCTimeoutSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic timeout: Timeout;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.timeout.serialize()]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDM,mBAAe,MAAA;8BAD3B,mCAAI,2BAAe,UAAU,CAAC;;;;o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BAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAmD;AAEnD,YAAM,OAAO;AACb,WAAK,UAAU,QAAQ;IACxB;IAEO,OAAO,KACb,MACA,MAAsB;AAGtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK,CAAC,KAAK,QAAQ,UAAS,CAAE,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,SAAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;",
6
- "names": ["import_safe"]
4
+ "sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tTimeout,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tLocalProtectionState,\n\tProtectionCommand,\n\tRFProtectionState,\n} from \"../lib/_Types.js\";\n\nexport const ProtectionCCValues = V.defineCCValues(CommandClasses.Protection, {\n\t...V.staticProperty(\n\t\t\"exclusiveControlNodeId\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tmin: 1,\n\t\t\tmax: MAX_NODES,\n\t\t\tlabel: \"Node ID with exclusive control\",\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticPropertyWithName(\n\t\t\"localProtectionState\",\n\t\t\"local\",\n\t\t{\n\t\t\t...ValueMetadata.Number,\n\t\t\tlabel: \"Local protection state\",\n\t\t\tstates: enumValuesToMetadataStates(LocalProtectionState),\n\t\t} as const,\n\t),\n\t...V.staticPropertyWithName(\n\t\t\"rfProtectionState\",\n\t\t\"rf\",\n\t\t{\n\t\t\t...ValueMetadata.Number,\n\t\t\tlabel: \"RF protection state\",\n\t\t\tstates: enumValuesToMetadataStates(RFProtectionState),\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticProperty(\n\t\t\"timeout\",\n\t\t{\n\t\t\t...ValueMetadata.UInt8,\n\t\t\tlabel: \"RF protection timeout\",\n\t\t} as const,\n\t\t{ minVersion: 2 } as const,\n\t),\n\t...V.staticProperty(\"supportsExclusiveControl\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportsTimeout\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportedLocalStates\", undefined, {\n\t\tinternal: true,\n\t}),\n\t...V.staticProperty(\"supportedRFStates\", undefined, {\n\t\tinternal: true,\n\t}),\n});\n\n@API(CommandClasses.Protection)\nexport class ProtectionCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ProtectionCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ProtectionCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ProtectionCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase ProtectionCommand.SupportedGet:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase ProtectionCommand.TimeoutGet:\n\t\t\tcase ProtectionCommand.TimeoutSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsTimeout.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase ProtectionCommand.ExclusiveControlGet:\n\t\t\tcase ProtectionCommand.ExclusiveControlSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsExclusiveControl.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }, value) {\n\t\t\tconst valueDB = this.tryGetValueDB();\n\t\t\tif (property === \"local\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst rf = valueDB?.getValue<RFProtectionState>(\n\t\t\t\t\tProtectionCCValues.rfProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(value, rf);\n\t\t\t} else if (property === \"rf\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst local = valueDB?.getValue<LocalProtectionState>(\n\t\t\t\t\tProtectionCCValues.localProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(\n\t\t\t\t\tlocal ?? LocalProtectionState.Unprotected,\n\t\t\t\t\tvalue,\n\t\t\t\t);\n\t\t\t} else if (property === \"exclusiveControlNodeId\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.setExclusiveControl(value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"local\":\n\t\t\t\tcase \"rf\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tcase \"exclusiveControlNodeId\":\n\t\t\t\t\treturn this.getExclusiveControl();\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Get);\n\n\t\tconst cc = new ProtectionCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<ProtectionCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"local\", \"rf\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tlocal: LocalProtectionState,\n\t\trf?: RFProtectionState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Set);\n\n\t\tconst cc = new ProtectionCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"supportsExclusiveControl\",\n\t\t\t\t\"supportsTimeout\",\n\t\t\t\t\"supportedLocalStates\",\n\t\t\t\t\"supportedRFStates\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getExclusiveControl(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCExclusiveControlReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.exclusiveControlNodeId;\n\t}\n\n\t@validateArgs()\n\tpublic async setExclusiveControl(\n\t\tnodeId: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\texclusiveControlNodeId: nodeId,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getTimeout(): Promise<MaybeNotKnown<Timeout>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tProtectionCCTimeoutReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.timeout;\n\t}\n\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\ttimeout: Timeout,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Protection)\n@implementedVersion(2)\n@ccValues(ProtectionCCValues)\nexport class ProtectionCC extends CommandClass {\n\tdeclare ccCommand: ProtectionCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// First find out what the device supports\n\t\tif (api.version >= 2) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getSupported();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received protection capabilities:\nexclusive control: ${resp.supportsExclusiveControl}\ntimeout: ${resp.supportsTimeout}\nlocal protection states: ${\n\t\t\t\t\tresp.supportedLocalStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nRF protection states: ${\n\t\t\t\t\tresp.supportedRFStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(RFProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst supportsExclusiveControl = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsExclusiveControl,\n\t\t);\n\t\tconst supportsTimeout = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsTimeout,\n\t\t);\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tmessage: \"querying protection status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst protectionResp = await api.get();\n\t\tif (protectionResp) {\n\t\t\tlet logMessage = `received protection status:\nlocal: ${getEnumMemberName(LocalProtectionState, protectionResp.local)}`;\n\t\t\tif (protectionResp.rf != undefined) {\n\t\t\t\tlogMessage += `\nrf ${getEnumMemberName(RFProtectionState, protectionResp.rf)}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tif (supportsTimeout) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection timeout...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst timeout = await api.getTimeout();\n\t\t\tif (timeout) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: `received timeout: ${timeout.toString()}`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (supportsExclusiveControl) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying exclusive control node...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst nodeId = await api.getExclusiveControl();\n\t\t\tif (nodeId != undefined) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: (nodeId !== 0\n\t\t\t\t\t\t? `Node ${nodeId.toString().padStart(3, \"0\")}`\n\t\t\t\t\t\t: `no node`) + ` has exclusive control`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCSetOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Set)\n@useSupervision()\nexport class ProtectionCCSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(_raw: CCRaw, _ctx: CCParsingContext): ProtectionCCSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic local: LocalProtectionState;\n\tpublic rf?: RFProtectionState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.local & 0b1111,\n\t\t\t(this.rf ?? RFProtectionState.Unprotected) & 0b1111,\n\t\t]);\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\t\tif (\n\t\t\tccVersion < 2 && ctx.getDeviceConfig?.(\n\t\t\t\tthis.nodeId as number,\n\t\t\t)?.compat?.encodeCCsUsingTargetVersion\n\t\t) {\n\t\t\t// When forcing CC version 1, only include the local state\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCReportOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Report)\n@ccValueProperty(\"local\", ProtectionCCValues.localProtectionState)\n@ccValueProperty(\"rf\", ProtectionCCValues.rfProtectionState)\nexport class ProtectionCCReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ProtectionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst local: LocalProtectionState = raw.payload[0] & 0b1111;\n\t\tlet rf: RFProtectionState | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\trf = raw.payload[1] & 0b1111;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t}\n\n\tpublic readonly local: LocalProtectionState;\n\n\tpublic readonly rf?: RFProtectionState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.Get)\n@expectedCCResponse(ProtectionCCReport)\nexport class ProtectionCCGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCSupportedReportOptions {\n\tsupportsTimeout: boolean;\n\tsupportsExclusiveControl: boolean;\n\tsupportedLocalStates: LocalProtectionState[];\n\tsupportedRFStates: RFProtectionState[];\n}\n\n@CCCommand(ProtectionCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportsExclusiveControl\",\n\tProtectionCCValues.supportsExclusiveControl,\n)\n@ccValueProperty(\"supportsTimeout\", ProtectionCCValues.supportsTimeout)\n@ccValueProperty(\n\t\"supportedLocalStates\",\n\tProtectionCCValues.supportedLocalStates,\n)\n@ccValueProperty(\"supportedRFStates\", ProtectionCCValues.supportedRFStates)\nexport class ProtectionCCSupportedReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportsTimeout = options.supportsTimeout;\n\t\tthis.supportsExclusiveControl = options.supportsExclusiveControl;\n\t\tthis.supportedLocalStates = options.supportedLocalStates;\n\t\tthis.supportedRFStates = options.supportedRFStates;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst supportsTimeout = !!(raw.payload[0] & 0b1);\n\t\tconst supportsExclusiveControl = !!(raw.payload[0] & 0b10);\n\t\tconst supportedLocalStates: LocalProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(1, 3),\n\t\t\tLocalProtectionState.Unprotected,\n\t\t);\n\t\tconst supportedRFStates: RFProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(3, 5),\n\t\t\tRFProtectionState.Unprotected,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportsTimeout,\n\t\t\tsupportsExclusiveControl,\n\t\t\tsupportedLocalStates,\n\t\t\tsupportedRFStates,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// update metadata (partially) for the local and rf values\n\t\tconst localStateValue = ProtectionCCValues.localProtectionState;\n\t\tthis.setMetadata(ctx, localStateValue, {\n\t\t\t...localStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tLocalProtectionState,\n\t\t\t\tthis.supportedLocalStates,\n\t\t\t),\n\t\t});\n\n\t\tconst rfStateValue = ProtectionCCValues.rfProtectionState;\n\t\tthis.setMetadata(ctx, rfStateValue, {\n\t\t\t...rfStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tRFProtectionState,\n\t\t\t\tthis.supportedRFStates,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportsExclusiveControl: boolean;\n\n\tpublic readonly supportsTimeout: boolean;\n\n\tpublic readonly supportedLocalStates: LocalProtectionState[];\n\n\tpublic readonly supportedRFStates: RFProtectionState[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supports exclusive control\": this.supportsExclusiveControl,\n\t\t\t\t\"supports timeout\": this.supportsTimeout,\n\t\t\t\t\"local protection states\": this.supportedLocalStates\n\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t)\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"RF protection states\": this.supportedRFStates\n\t\t\t\t\t.map((rf) => getEnumMemberName(RFProtectionState, rf))\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.SupportedGet)\n@expectedCCResponse(ProtectionCCSupportedReport)\nexport class ProtectionCCSupportedGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlReportOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlReport)\n@ccValueProperty(\n\t\"exclusiveControlNodeId\",\n\tProtectionCCValues.exclusiveControlNodeId,\n)\nexport class ProtectionCCExclusiveControlReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst exclusiveControlNodeId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\texclusiveControlNodeId,\n\t\t});\n\t}\n\n\tpublic readonly exclusiveControlNodeId: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlGet)\n@expectedCCResponse(ProtectionCCExclusiveControlReport)\nexport class ProtectionCCExclusiveControlGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlSetOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCExclusiveControlSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCExclusiveControlSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic exclusiveControlNodeId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.exclusiveControlNodeId]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutReportOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutReport)\n@ccValueProperty(\"timeout\", ProtectionCCValues.timeout)\nexport class ProtectionCCTimeoutReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCTimeoutReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst timeout: Timeout = Timeout.parse(raw.payload[0]);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttimeout,\n\t\t});\n\t}\n\n\tpublic readonly timeout: Timeout;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.TimeoutGet)\n@expectedCCResponse(ProtectionCCTimeoutReport)\nexport class ProtectionCCTimeoutGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutSetOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCTimeoutSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCTimeoutSet {\n\t\t// TODO: Deserialize payload\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new ProtectionCCTimeoutSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic timeout: Timeout;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.timeout.serialize()]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,oBAA+C;AAE/C,iBAQO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDM,mBAAe,MAAA;8BAD3B,mCAAI,2BAAe,UAAU,CAAC;;;;oBACM;;;;;uCAAA,YAAK;WAAA;;;;;;;;yBAwHxC,iCAAa,EAAE,aAAa,KAAI,CAAE,CAAC;yCA8DnC,iDAAA,CAAc;gCAoCd,wCAAA,CAAc;AAjGf,mBAAA,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;AA8DhB,mBAAA,MAAA,MAAA,iCAAA,EAAA,MAAA,UAAA,MAAA,uBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,yBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,qBAAb,OAAgC,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAoChC,mBAAA,MAAA,MAAA,wBAAA,EAAA,MAAA,UAAA,MAAA,cAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,gBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,YAAb,OAAuB,GAAA,UAAA,UAAA,GAAA,MA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,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,SAAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;IAKY,0BAAsB,MAAA;8BAFlC,yCAAU,+BAAkB,UAAU,OACtC,kDAAmB,yBAAyB,CAAC;;;;oBACF;8CAAA,YAAY;WAAA;;;;;;;;AAAxD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;IAUA,0BAAsB,MAAA;8BAHlC,yCAAU,+BAAkB,UAAU,OACtC,kDAAmB,kBAAkB,OACrC,8CAAc,CAAE;;;;oBAC2B;8CAAA,YAAY;WAAA;;;;;;;;AAAxD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAmD;AAEnD,YAAM,OAAO;AACb,WAAK,UAAU,QAAQ;IACxB;IAEO,OAAO,KACb,MACA,MAAsB;AAGtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,QAAQ,UAAS,CAAE,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,SAAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;",
6
+ "names": []
7
7
  }
@@ -32,13 +32,13 @@ __export(SceneActivationCC_validateArgs_exports, {
32
32
  validateArgs_SceneActivationCCAPI_set: () => validateArgs_SceneActivationCCAPI_set
33
33
  });
34
34
  module.exports = __toCommonJS(SceneActivationCC_validateArgs_exports);
35
- var import_safe = require("@zwave-js/core/safe");
35
+ var import_core = require("@zwave-js/core");
36
36
  var v = __toESM(require("@zwave-js/core/validation"), 1);
37
37
  function validateArgs_SceneActivationCCAPI_set() {
38
38
  return (__decoratedMethod, { kind }) => {
39
39
  if (kind === "method") {
40
40
  return /* @__PURE__ */ __name(function set(sceneId, dimmingDuration) {
41
- v.assert(v.primitive({ kind: "parameter", name: "sceneId" }, "number")(sceneId), v.optional({ kind: "parameter", name: "dimmingDuration" }, v.oneOf({ kind: "parameter", name: "dimmingDuration" }, void 0, v.primitive({ kind: "parameter", name: "dimmingDuration" }, "string"), v.class({ kind: "parameter", name: "dimmingDuration" }, "Duration", import_safe.Duration)))(dimmingDuration));
41
+ v.assert(v.primitive({ kind: "parameter", name: "sceneId" }, "number")(sceneId), v.optional({ kind: "parameter", name: "dimmingDuration" }, v.oneOf({ kind: "parameter", name: "dimmingDuration" }, void 0, v.primitive({ kind: "parameter", name: "dimmingDuration" }, "string"), v.class({ kind: "parameter", name: "dimmingDuration" }, "Duration", import_core.Duration)))(dimmingDuration));
42
42
  return __decoratedMethod.call(this, sceneId, dimmingDuration);
43
43
  }, "set");
44
44
  }
@@ -1,7 +1,6 @@
1
- import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
2
- import type { GetValueDB, MessageOrCCLogEntry, SupervisionResult, WithAddress } from "@zwave-js/core/safe";
3
- import { CommandClasses, Duration, type MaybeNotKnown } from "@zwave-js/core/safe";
4
- import { Bytes } from "@zwave-js/shared/safe";
1
+ import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
2
+ import { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
3
+ import { Bytes } from "@zwave-js/shared";
5
4
  import { CCAPI, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
6
5
  import { type CCRaw, CommandClass } from "../lib/CommandClass.js";
7
6
  import { SceneActivationCommand } from "../lib/_Types.js";
@@ -16,7 +15,7 @@ export declare const SceneActivationCCValues: Readonly<{
16
15
  readonly endpoint: number;
17
16
  readonly property: "sceneId";
18
17
  };
19
- is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
18
+ is: (valueId: import("@zwave-js/core").ValueID) => boolean;
20
19
  readonly meta: {
21
20
  readonly min: 1;
22
21
  readonly label: "Scene ID";
@@ -45,7 +44,7 @@ export declare const SceneActivationCCValues: Readonly<{
45
44
  readonly endpoint: number;
46
45
  readonly property: "dimmingDuration";
47
46
  };
48
- is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
47
+ is: (valueId: import("@zwave-js/core").ValueID) => boolean;
49
48
  readonly meta: {
50
49
  readonly label: "Dimming duration";
51
50
  readonly type: "duration";
@@ -36,8 +36,8 @@ __export(SceneActivationCC_exports, {
36
36
  });
37
37
  module.exports = __toCommonJS(SceneActivationCC_exports);
38
38
  var __validateArgs = __toESM(require("./SceneActivationCC._validateArgs.js"), 1);
39
- var import_safe = require("@zwave-js/core/safe");
40
- var import_safe2 = require("@zwave-js/shared/safe");
39
+ var import_core = require("@zwave-js/core");
40
+ var import_shared = require("@zwave-js/shared");
41
41
  var import_API = require("../lib/API.js");
42
42
  var import_CommandClass = require("../lib/CommandClass.js");
43
43
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
@@ -86,7 +86,7 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
86
86
  };
87
87
  const { validateArgs_SceneActivationCCAPI_set } = __validateArgs;
88
88
  let SceneActivationCCAPI = (() => {
89
- let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Scene Activation"])];
89
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Scene Activation"])];
90
90
  let _classDescriptor;
91
91
  let _classExtraInitializers = [];
92
92
  let _classThis;
@@ -120,7 +120,7 @@ let SceneActivationCCAPI = (() => {
120
120
  if (typeof value !== "number") {
121
121
  (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
122
122
  }
123
- const duration = import_safe.Duration.from(options?.transitionDuration);
123
+ const duration = import_core.Duration.from(options?.transitionDuration);
124
124
  return this.set(value, duration);
125
125
  };
126
126
  }
@@ -146,7 +146,7 @@ let SceneActivationCCAPI = (() => {
146
146
  return SceneActivationCCAPI2 = _classThis;
147
147
  })();
148
148
  let SceneActivationCC = (() => {
149
- let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Scene Activation"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.SceneActivationCCValues)];
149
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Scene Activation"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.SceneActivationCCValues)];
150
150
  let _classDescriptor;
151
151
  let _classExtraInitializers = [];
152
152
  let _classThis;
@@ -191,15 +191,15 @@ let SceneActivationCCSet = (() => {
191
191
  constructor(options) {
192
192
  super(options);
193
193
  this.sceneId = options.sceneId;
194
- this.dimmingDuration = import_safe.Duration.from(options.dimmingDuration);
194
+ this.dimmingDuration = import_core.Duration.from(options.dimmingDuration);
195
195
  }
196
196
  static from(raw, ctx) {
197
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
197
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
198
198
  const sceneId = raw.payload[0];
199
- (0, import_safe.validatePayload)(sceneId >= 1, sceneId <= 255);
199
+ (0, import_core.validatePayload)(sceneId >= 1, sceneId <= 255);
200
200
  let dimmingDuration;
201
201
  if (raw.payload.length >= 2) {
202
- dimmingDuration = import_safe.Duration.parseSet(raw.payload[1]);
202
+ dimmingDuration = import_core.Duration.parseSet(raw.payload[1]);
203
203
  }
204
204
  return new this({
205
205
  nodeId: ctx.sourceNodeId,
@@ -210,7 +210,7 @@ let SceneActivationCCSet = (() => {
210
210
  sceneId;
211
211
  dimmingDuration;
212
212
  serialize(ctx) {
213
- this.payload = import_safe2.Bytes.from([
213
+ this.payload = import_shared.Bytes.from([
214
214
  this.sceneId,
215
215
  this.dimmingDuration?.serializeSet() ?? 255
216
216
  ]);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/SceneActivationCC.ts"],
4
- "sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport type {\n\tGetValueDB,\n\tMessageOrCCLogEntry,\n\tMessageRecord,\n\tSupervisionResult,\n\tWithAddress,\n} from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype MaybeNotKnown,\n\tValueMetadata,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { SceneActivationCommand } from \"../lib/_Types.js\";\n\nexport const SceneActivationCCValues = V.defineCCValues(\n\tCommandClasses[\"Scene Activation\"],\n\t{\n\t\t...V.staticProperty(\n\t\t\t\"sceneId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tlabel: \"Scene ID\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t\t{ stateful: false },\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"dimmingDuration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Duration,\n\t\t\t\tlabel: \"Dimming duration\",\n\t\t\t} as const,\n\t\t),\n\t},\n);\n\n// @noInterview This CC is write-only\n\n@API(CommandClasses[\"Scene Activation\"])\nexport class SceneActivationCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\t_cmd: SceneActivationCommand,\n\t): MaybeNotKnown<boolean> {\n\t\t// There is only one mandatory command\n\t\treturn true;\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: SceneActivationCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"sceneId\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst duration = Duration.from(options?.transitionDuration);\n\t\t\treturn this.set(value, duration);\n\t\t};\n\t}\n\n\t/**\n\t * Activates the Scene with the given ID\n\t * @param duration The duration specifying how long the transition should take. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\tsceneId: number,\n\t\tdimmingDuration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tSceneActivationCommand,\n\t\t\tSceneActivationCommand.Set,\n\t\t);\n\n\t\tconst cc = new SceneActivationCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Scene Activation\"])\n@implementedVersion(1)\n@ccValues(SceneActivationCCValues)\nexport class SceneActivationCC extends CommandClass {\n\tdeclare ccCommand: SceneActivationCommand;\n}\n\n// @publicAPI\nexport interface SceneActivationCCSetOptions {\n\tsceneId: number;\n\tdimmingDuration?: Duration | string;\n}\n\n@CCCommand(SceneActivationCommand.Set)\n@useSupervision()\n@ccValueProperty(\"sceneId\", SceneActivationCCValues.sceneId)\n@ccValueProperty(\"dimmingDuration\", SceneActivationCCValues.dimmingDuration)\nexport class SceneActivationCCSet extends SceneActivationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<SceneActivationCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.sceneId = options.sceneId;\n\t\tthis.dimmingDuration = Duration.from(options.dimmingDuration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): SceneActivationCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst sceneId = raw.payload[0];\n\t\tvalidatePayload(sceneId >= 1, sceneId <= 255);\n\n\t\t// Per the specs, dimmingDuration is required, but as always the real world is different...\n\t\tlet dimmingDuration: Duration | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\tdimmingDuration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t}\n\n\tpublic sceneId: number;\n\n\tpublic dimmingDuration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.sceneId,\n\t\t\tthis.dimmingDuration?.serializeSet() ?? 0xff,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = { \"scene id\": this.sceneId };\n\t\tif (this.dimmingDuration != undefined) {\n\t\t\tmessage[\"dimming duration\"] = this.dimmingDuration.toString();\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\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mBAAM,KAAK;QACzB,KAAK;QACL,KAAK,iBAAiB,aAAY,KAAM;OACxC;AACD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,YAAM,UAAyB,EAAE,YAAY,KAAK,QAAO;AACzD,UAAI,KAAK,mBAAmB,QAAW;AACtC,gBAAQ,kBAAkB,IAAI,KAAK,gBAAgB,SAAQ;MAC5D;AACA,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;",
6
- "names": ["import_safe"]
4
+ "sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { SceneActivationCommand } from \"../lib/_Types.js\";\n\nexport const SceneActivationCCValues = V.defineCCValues(\n\tCommandClasses[\"Scene Activation\"],\n\t{\n\t\t...V.staticProperty(\n\t\t\t\"sceneId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tlabel: \"Scene ID\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t\t{ stateful: false },\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"dimmingDuration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Duration,\n\t\t\t\tlabel: \"Dimming duration\",\n\t\t\t} as const,\n\t\t),\n\t},\n);\n\n// @noInterview This CC is write-only\n\n@API(CommandClasses[\"Scene Activation\"])\nexport class SceneActivationCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\t_cmd: SceneActivationCommand,\n\t): MaybeNotKnown<boolean> {\n\t\t// There is only one mandatory command\n\t\treturn true;\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: SceneActivationCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"sceneId\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst duration = Duration.from(options?.transitionDuration);\n\t\t\treturn this.set(value, duration);\n\t\t};\n\t}\n\n\t/**\n\t * Activates the Scene with the given ID\n\t * @param duration The duration specifying how long the transition should take. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\tsceneId: number,\n\t\tdimmingDuration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tSceneActivationCommand,\n\t\t\tSceneActivationCommand.Set,\n\t\t);\n\n\t\tconst cc = new SceneActivationCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Scene Activation\"])\n@implementedVersion(1)\n@ccValues(SceneActivationCCValues)\nexport class SceneActivationCC extends CommandClass {\n\tdeclare ccCommand: SceneActivationCommand;\n}\n\n// @publicAPI\nexport interface SceneActivationCCSetOptions {\n\tsceneId: number;\n\tdimmingDuration?: Duration | string;\n}\n\n@CCCommand(SceneActivationCommand.Set)\n@useSupervision()\n@ccValueProperty(\"sceneId\", SceneActivationCCValues.sceneId)\n@ccValueProperty(\"dimmingDuration\", SceneActivationCCValues.dimmingDuration)\nexport class SceneActivationCCSet extends SceneActivationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<SceneActivationCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.sceneId = options.sceneId;\n\t\tthis.dimmingDuration = Duration.from(options.dimmingDuration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): SceneActivationCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst sceneId = raw.payload[0];\n\t\tvalidatePayload(sceneId >= 1, sceneId <= 255);\n\n\t\t// Per the specs, dimmingDuration is required, but as always the real world is different...\n\t\tlet dimmingDuration: Duration | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\tdimmingDuration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t}\n\n\tpublic sceneId: number;\n\n\tpublic dimmingDuration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.sceneId,\n\t\t\tthis.dimmingDuration?.serializeSet() ?? 0xff,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = { \"scene id\": this.sceneId };\n\t\tif (this.dimmingDuration != undefined) {\n\t\t\tmessage[\"dimming duration\"]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ACA;OACA;IACF;IAEO;IAEA;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,oBAAM,KAAK;QACzB,KAAK;QACL,KAAK,iBAAiB,aAAY,KAAM;OACxC;AACD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,YAAM,UAAyB,EAAE,YAAY,KAAK,QAAO;AACzD,UAAI,KAAK,mBAAmB,QAAW;AACtC,gBAAQ,kBAAkB,IAAI,KAAK,gBAAgB,SAAQ;MAC5D;AACA,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;",
6
+ "names": []
7
7
  }
@@ -33,13 +33,13 @@ __export(SceneActuatorConfigurationCC_validateArgs_exports, {
33
33
  validateArgs_SceneActuatorConfigurationCCAPI_set: () => validateArgs_SceneActuatorConfigurationCCAPI_set
34
34
  });
35
35
  module.exports = __toCommonJS(SceneActuatorConfigurationCC_validateArgs_exports);
36
- var import_safe = require("@zwave-js/core/safe");
36
+ var import_core = require("@zwave-js/core");
37
37
  var v = __toESM(require("@zwave-js/core/validation"), 1);
38
38
  function validateArgs_SceneActuatorConfigurationCCAPI_set() {
39
39
  return (__decoratedMethod, { kind }) => {
40
40
  if (kind === "method") {
41
41
  return /* @__PURE__ */ __name(function set(sceneId, dimmingDuration, level) {
42
- v.assert(v.primitive({ kind: "parameter", name: "sceneId" }, "number")(sceneId), v.optional({ kind: "parameter", name: "dimmingDuration" }, v.oneOf({ kind: "parameter", name: "dimmingDuration" }, void 0, v.primitive({ kind: "parameter", name: "dimmingDuration" }, "string"), v.class({ kind: "parameter", name: "dimmingDuration" }, "Duration", import_safe.Duration)))(dimmingDuration), v.optional({ kind: "parameter", name: "level" }, v.primitive({ kind: "parameter", name: "level" }, "number"))(level));
42
+ v.assert(v.primitive({ kind: "parameter", name: "sceneId" }, "number")(sceneId), v.optional({ kind: "parameter", name: "dimmingDuration" }, v.oneOf({ kind: "parameter", name: "dimmingDuration" }, void 0, v.primitive({ kind: "parameter", name: "dimmingDuration" }, "string"), v.class({ kind: "parameter", name: "dimmingDuration" }, "Duration", import_core.Duration)))(dimmingDuration), v.optional({ kind: "parameter", name: "level" }, v.primitive({ kind: "parameter", name: "level" }, "number"))(level));
43
43
  return __decoratedMethod.call(this, sceneId, dimmingDuration, level);
44
44
  }, "set");
45
45
  }
@@ -1,6 +1,6 @@
1
- import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
2
- import { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core/safe";
3
- import { Bytes } from "@zwave-js/shared/safe";
1
+ import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
2
+ import { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
3
+ import { Bytes } from "@zwave-js/shared";
4
4
  import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
5
5
  import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext } from "../lib/CommandClass.js";
6
6
  import { SceneActuatorConfigurationCommand } from "../lib/_Types.js";
@@ -27,7 +27,7 @@ export declare const SceneActuatorConfigurationCCValues: Readonly<{
27
27
  readonly writeable: true;
28
28
  };
29
29
  }) & {
30
- is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
30
+ is: (valueId: import("@zwave-js/core").ValueID) => boolean;
31
31
  options: {
32
32
  readonly internal: false;
33
33
  readonly minVersion: 1;
@@ -56,7 +56,7 @@ export declare const SceneActuatorConfigurationCCValues: Readonly<{
56
56
  readonly writeable: true;
57
57
  };
58
58
  }) & {
59
- is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
59
+ is: (valueId: import("@zwave-js/core").ValueID) => boolean;
60
60
  options: {
61
61
  readonly internal: false;
62
62
  readonly minVersion: 1;
@@ -38,9 +38,8 @@ __export(SceneActuatorConfigurationCC_exports, {
38
38
  });
39
39
  module.exports = __toCommonJS(SceneActuatorConfigurationCC_exports);
40
40
  var __validateArgs = __toESM(require("./SceneActuatorConfigurationCC._validateArgs.js"), 1);
41
- var import_safe = require("@zwave-js/core/safe");
42
- var import_safe2 = require("@zwave-js/shared/safe");
43
- var import_safe3 = require("@zwave-js/shared/safe");
41
+ var import_core = require("@zwave-js/core");
42
+ var import_shared = require("@zwave-js/shared");
44
43
  var import_API = require("../lib/API.js");
45
44
  var import_CommandClass = require("../lib/CommandClass.js");
46
45
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
@@ -89,7 +88,7 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
89
88
  };
90
89
  const { validateArgs_SceneActuatorConfigurationCCAPI_set, validateArgs_SceneActuatorConfigurationCCAPI_get } = __validateArgs;
91
90
  let SceneActuatorConfigurationCCAPI = (() => {
92
- let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Scene Actuator Configuration"])];
91
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Scene Actuator Configuration"])];
93
92
  let _classDescriptor;
94
93
  let _classExtraInitializers = [];
95
94
  let _classThis;
@@ -135,15 +134,15 @@ let SceneActuatorConfigurationCCAPI = (() => {
135
134
  if (typeof value !== "number") {
136
135
  (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
137
136
  }
138
- const dimmingDuration = import_safe.Duration.from(options?.transitionDuration) ?? this.tryGetValueDB()?.getValue(import_CCValues_generated.SceneActuatorConfigurationCCValues.dimmingDuration(propertyKey).endpoint(this.endpoint.index));
137
+ const dimmingDuration = import_core.Duration.from(options?.transitionDuration) ?? this.tryGetValueDB()?.getValue(import_CCValues_generated.SceneActuatorConfigurationCCValues.dimmingDuration(propertyKey).endpoint(this.endpoint.index));
139
138
  return this.set(propertyKey, dimmingDuration, value);
140
139
  } else if (property === "dimmingDuration") {
141
- if (typeof value !== "string" && !import_safe.Duration.isDuration(value)) {
140
+ if (typeof value !== "string" && !import_core.Duration.isDuration(value)) {
142
141
  (0, import_API.throwWrongValueType)(this.ccId, property, "duration", typeof value);
143
142
  }
144
- const dimmingDuration = import_safe.Duration.from(value);
143
+ const dimmingDuration = import_core.Duration.from(value);
145
144
  if (dimmingDuration == void 0) {
146
- throw new import_safe.ZWaveError(`${(0, import_safe.getCCName)(this.ccId)}: "${property}" could not be set. ${JSON.stringify(value)} is not a valid duration.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
145
+ throw new import_core.ZWaveError(`${(0, import_core.getCCName)(this.ccId)}: "${property}" could not be set. ${JSON.stringify(value)} is not a valid duration.`, import_core.ZWaveErrorCodes.Argument_Invalid);
147
146
  }
148
147
  const level = this.tryGetValueDB()?.getValue(import_CCValues_generated.SceneActuatorConfigurationCCValues.level(propertyKey).endpoint(this.endpoint.index));
149
148
  return this.set(propertyKey, dimmingDuration, level);
@@ -175,7 +174,7 @@ let SceneActuatorConfigurationCCAPI = (() => {
175
174
  nodeId: this.endpoint.nodeId,
176
175
  endpointIndex: this.endpoint.index,
177
176
  sceneId,
178
- dimmingDuration: import_safe.Duration.from(dimmingDuration) ?? new import_safe.Duration(0, "seconds"),
177
+ dimmingDuration: import_core.Duration.from(dimmingDuration) ?? new import_core.Duration(0, "seconds"),
179
178
  level
180
179
  });
181
180
  return this.host.sendCommand(cc, this.commandOptions);
@@ -189,13 +188,13 @@ let SceneActuatorConfigurationCCAPI = (() => {
189
188
  });
190
189
  const response = await this.host.sendCommand(cc, this.commandOptions);
191
190
  if (response) {
192
- return (0, import_safe3.pick)(response, ["sceneId", "level", "dimmingDuration"]);
191
+ return (0, import_shared.pick)(response, ["sceneId", "level", "dimmingDuration"]);
193
192
  }
194
193
  }
195
194
  async get(sceneId) {
196
195
  this.assertSupportsCommand(import_Types.SceneActuatorConfigurationCommand, import_Types.SceneActuatorConfigurationCommand.Get);
197
196
  if (sceneId === 0) {
198
- throw new import_safe.ZWaveError(`Invalid scene ID 0. To get the currently active scene, use getActive() instead.`, import_safe.ZWaveErrorCodes.Argument_Invalid);
197
+ throw new import_core.ZWaveError(`Invalid scene ID 0. To get the currently active scene, use getActive() instead.`, import_core.ZWaveErrorCodes.Argument_Invalid);
199
198
  }
200
199
  const cc = new SceneActuatorConfigurationCCGet({
201
200
  nodeId: this.endpoint.nodeId,
@@ -204,7 +203,7 @@ let SceneActuatorConfigurationCCAPI = (() => {
204
203
  });
205
204
  const response = await this.host.sendCommand(cc, this.commandOptions);
206
205
  if (response) {
207
- return (0, import_safe3.pick)(response, ["level", "dimmingDuration"]);
206
+ return (0, import_shared.pick)(response, ["level", "dimmingDuration"]);
208
207
  }
209
208
  }
210
209
  constructor() {
@@ -215,7 +214,7 @@ let SceneActuatorConfigurationCCAPI = (() => {
215
214
  return SceneActuatorConfigurationCCAPI2 = _classThis;
216
215
  })();
217
216
  let SceneActuatorConfigurationCC = (() => {
218
- let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Scene Actuator Configuration"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.SceneActuatorConfigurationCCValues)];
217
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Scene Actuator Configuration"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.SceneActuatorConfigurationCCValues)];
219
218
  let _classDescriptor;
220
219
  let _classExtraInitializers = [];
221
220
  let _classThis;
@@ -275,20 +274,20 @@ let SceneActuatorConfigurationCCSet = (() => {
275
274
  constructor(options) {
276
275
  super(options);
277
276
  if (options.sceneId < 1 || options.sceneId > 255) {
278
- throw new import_safe.ZWaveError(`The scene id ${options.sceneId} must be between 1 and 255!`, import_safe.ZWaveErrorCodes.Argument_Invalid);
277
+ throw new import_core.ZWaveError(`The scene id ${options.sceneId} must be between 1 and 255!`, import_core.ZWaveErrorCodes.Argument_Invalid);
279
278
  }
280
279
  this.sceneId = options.sceneId;
281
280
  this.dimmingDuration = options.dimmingDuration;
282
281
  this.level = options.level;
283
282
  }
284
283
  static from(_raw, _ctx) {
285
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
284
+ throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
286
285
  }
287
286
  sceneId;
288
287
  dimmingDuration;
289
288
  level;
290
289
  serialize(ctx) {
291
- this.payload = import_safe2.Bytes.from([
290
+ this.payload = import_shared.Bytes.from([
292
291
  this.sceneId,
293
292
  this.dimmingDuration.serializeSet(),
294
293
  this.level != void 0 ? 128 : 0,
@@ -339,13 +338,13 @@ let SceneActuatorConfigurationCCReport = (() => {
339
338
  this.dimmingDuration = options.dimmingDuration;
340
339
  }
341
340
  static from(raw, ctx) {
342
- (0, import_safe.validatePayload)(raw.payload.length >= 3);
341
+ (0, import_core.validatePayload)(raw.payload.length >= 3);
343
342
  const sceneId = raw.payload[0];
344
343
  let level;
345
344
  let dimmingDuration;
346
345
  if (sceneId !== 0) {
347
346
  level = raw.payload[1];
348
- dimmingDuration = import_safe.Duration.parseReport(raw.payload[2]) ?? import_safe.Duration.unknown();
347
+ dimmingDuration = import_core.Duration.parseReport(raw.payload[2]) ?? import_core.Duration.unknown();
349
348
  }
350
349
  return new this({
351
350
  nodeId: ctx.sourceNodeId,
@@ -418,11 +417,11 @@ let SceneActuatorConfigurationCCGet = (() => {
418
417
  this.sceneId = options.sceneId;
419
418
  }
420
419
  static from(_raw, _ctx) {
421
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
420
+ throw new import_core.ZWaveError(`${this.name}: deserialization not implemented`, import_core.ZWaveErrorCodes.Deserialization_NotImplemented);
422
421
  }
423
422
  sceneId;
424
423
  serialize(ctx) {
425
- this.payload = import_safe2.Bytes.from([this.sceneId]);
424
+ this.payload = import_shared.Bytes.from([this.sceneId]);
426
425
  return super.serialize(ctx);
427
426
  }
428
427
  toLogEntry(ctx) {