@zwave-js/cc 14.0.0-beta.4 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +381 -266
  2. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  3. package/build/cjs/cc/AssociationCC.js +669 -503
  4. package/build/cjs/cc/AssociationCC.js.map +3 -3
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +633 -492
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  7. package/build/cjs/cc/BarrierOperatorCC.js +595 -429
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  9. package/build/cjs/cc/BasicCC.js +354 -260
  10. package/build/cjs/cc/BasicCC.js.map +3 -3
  11. package/build/cjs/cc/BatteryCC.js +427 -345
  12. package/build/cjs/cc/BatteryCC.js.map +3 -3
  13. package/build/cjs/cc/BinarySensorCC.js +391 -276
  14. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  15. package/build/cjs/cc/BinarySwitchCC.js +347 -253
  16. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  17. package/build/cjs/cc/CRC16CC.js +160 -85
  18. package/build/cjs/cc/CRC16CC.js.map +3 -3
  19. package/build/cjs/cc/CentralSceneCC.js +459 -324
  20. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  21. package/build/cjs/cc/ClimateControlScheduleCC.js +459 -293
  22. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  23. package/build/cjs/cc/ClockCC.js +254 -150
  24. package/build/cjs/cc/ClockCC.js.map +3 -3
  25. package/build/cjs/cc/ColorSwitchCC.js +758 -610
  26. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  27. package/build/cjs/cc/ConfigurationCC.js +1700 -1453
  28. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  29. package/build/cjs/cc/DeviceResetLocallyCC.js +125 -49
  30. package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
  31. package/build/cjs/cc/DoorLockCC.js +904 -777
  32. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  33. package/build/cjs/cc/DoorLockLoggingCC.js +321 -206
  34. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  35. package/build/cjs/cc/EnergyProductionCC.js +249 -160
  36. package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
  37. package/build/cjs/cc/EntryControlCC.js +619 -458
  38. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  39. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +898 -698
  40. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  41. package/build/cjs/cc/HailCC.js +57 -11
  42. package/build/cjs/cc/HailCC.js.map +2 -2
  43. package/build/cjs/cc/HumidityControlModeCC.js +359 -233
  44. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  45. package/build/cjs/cc/HumidityControlOperatingStateCC.js +189 -103
  46. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  47. package/build/cjs/cc/HumidityControlSetpointCC.js +682 -495
  48. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  49. package/build/cjs/cc/InclusionControllerCC.js +205 -114
  50. package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
  51. package/build/cjs/cc/IndicatorCC.js +897 -736
  52. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  53. package/build/cjs/cc/IrrigationCC.js +1651 -1405
  54. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  55. package/build/cjs/cc/LanguageCC.js +268 -171
  56. package/build/cjs/cc/LanguageCC.js.map +3 -3
  57. package/build/cjs/cc/LockCC.js +254 -154
  58. package/build/cjs/cc/LockCC.js.map +3 -3
  59. package/build/cjs/cc/ManufacturerProprietaryCC.js +189 -129
  60. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  61. package/build/cjs/cc/ManufacturerSpecificCC.js +319 -213
  62. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  63. package/build/cjs/cc/MeterCC.js +827 -707
  64. package/build/cjs/cc/MeterCC.js.map +3 -3
  65. package/build/cjs/cc/MultiChannelAssociationCC.js +612 -478
  66. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  67. package/build/cjs/cc/MultiChannelCC.js +1037 -819
  68. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  69. package/build/cjs/cc/MultiCommandCC.js +172 -97
  70. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  71. package/build/cjs/cc/MultilevelSensorCC.js +589 -449
  72. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  73. package/build/cjs/cc/MultilevelSwitchCC.js +587 -439
  74. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  75. package/build/cjs/cc/NoOperationCC.js +89 -27
  76. package/build/cjs/cc/NoOperationCC.js.map +2 -2
  77. package/build/cjs/cc/NodeNamingCC.js +417 -277
  78. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  79. package/build/cjs/cc/NotificationCC.js +972 -818
  80. package/build/cjs/cc/NotificationCC.js.map +3 -3
  81. package/build/cjs/cc/PowerlevelCC.js +450 -303
  82. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  83. package/build/cjs/cc/ProtectionCC.js +686 -494
  84. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  85. package/build/cjs/cc/SceneActivationCC.js +165 -97
  86. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  87. package/build/cjs/cc/SceneActuatorConfigurationCC.js +346 -243
  88. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  89. package/build/cjs/cc/SceneControllerConfigurationCC.js +401 -298
  90. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  91. package/build/cjs/cc/ScheduleEntryLockCC.js +1552 -1272
  92. package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
  93. package/build/cjs/cc/Security2CC.js +1483 -1219
  94. package/build/cjs/cc/Security2CC.js.map +3 -3
  95. package/build/cjs/cc/SecurityCC.js +839 -619
  96. package/build/cjs/cc/SecurityCC.js.map +3 -3
  97. package/build/cjs/cc/SoundSwitchCC.js +707 -515
  98. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  99. package/build/cjs/cc/SupervisionCC.js +327 -237
  100. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  101. package/build/cjs/cc/ThermostatFanModeCC.js +386 -263
  102. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  103. package/build/cjs/cc/ThermostatFanStateCC.js +192 -106
  104. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  105. package/build/cjs/cc/ThermostatModeCC.js +425 -302
  106. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  107. package/build/cjs/cc/ThermostatOperatingStateCC.js +188 -102
  108. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  109. package/build/cjs/cc/ThermostatSetbackCC.js +277 -173
  110. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  111. package/build/cjs/cc/ThermostatSetpointCC.js +645 -491
  112. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  113. package/build/cjs/cc/TimeCC.js +515 -353
  114. package/build/cjs/cc/TimeCC.js.map +3 -3
  115. package/build/cjs/cc/TimeParametersCC.js +302 -202
  116. package/build/cjs/cc/TimeParametersCC.js.map +3 -3
  117. package/build/cjs/cc/TransportServiceCC.js +433 -315
  118. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  119. package/build/cjs/cc/UserCodeCC.js +1385 -1102
  120. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  121. package/build/cjs/cc/VersionCC.js +696 -562
  122. package/build/cjs/cc/VersionCC.js.map +3 -3
  123. package/build/cjs/cc/WakeUpCC.js +499 -346
  124. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  125. package/build/cjs/cc/WindowCoveringCC.js +626 -478
  126. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  127. package/build/cjs/cc/ZWaveLongRangeCC.js +57 -10
  128. package/build/cjs/cc/ZWaveLongRangeCC.js.map +2 -2
  129. package/build/cjs/cc/ZWavePlusCC.js +233 -159
  130. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  131. package/build/cjs/cc/ZWaveProtocolCC.js +1515 -948
  132. package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
  133. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  134. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
  135. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +395 -274
  136. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
  137. package/build/cjs/lib/CommandClassDecorators.d.ts +11 -15
  138. package/build/cjs/lib/CommandClassDecorators.js +19 -20
  139. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  140. package/build/cjs/lib/Security2/Extension.d.ts +1 -1
  141. package/build/cjs/lib/Security2/Extension.js +217 -126
  142. package/build/cjs/lib/Security2/Extension.js.map +3 -3
  143. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  144. package/build/esm/cc/AlarmSensorCC.js +389 -291
  145. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  146. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  147. package/build/esm/cc/AssociationCC.js +678 -537
  148. package/build/esm/cc/AssociationCC.js.map +1 -1
  149. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  150. package/build/esm/cc/AssociationGroupInfoCC.js +659 -539
  151. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  152. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  153. package/build/esm/cc/BarrierOperatorCC.js +634 -493
  154. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  155. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  156. package/build/esm/cc/BasicCC.js +380 -302
  157. package/build/esm/cc/BasicCC.js.map +1 -1
  158. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  159. package/build/esm/cc/BatteryCC.js +449 -384
  160. package/build/esm/cc/BatteryCC.js.map +1 -1
  161. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  162. package/build/esm/cc/BinarySensorCC.js +395 -297
  163. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  164. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  165. package/build/esm/cc/BinarySwitchCC.js +353 -274
  166. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  167. package/build/esm/cc/CRC16CC.js +162 -98
  168. package/build/esm/cc/CRC16CC.js.map +1 -1
  169. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  170. package/build/esm/cc/CentralSceneCC.js +465 -351
  171. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  172. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  173. package/build/esm/cc/ClimateControlScheduleCC.js +454 -313
  174. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  175. package/build/esm/cc/ClockCC.js +248 -159
  176. package/build/esm/cc/ClockCC.js.map +1 -1
  177. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  178. package/build/esm/cc/ColorSwitchCC.js +802 -677
  179. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  180. package/build/esm/cc/ConfigurationCC.js +1899 -1687
  181. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  182. package/build/esm/cc/DeviceResetLocallyCC.js +124 -59
  183. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  184. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  185. package/build/esm/cc/DoorLockCC.js +951 -849
  186. package/build/esm/cc/DoorLockCC.js.map +1 -1
  187. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  188. package/build/esm/cc/DoorLockLoggingCC.js +316 -218
  189. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  190. package/build/esm/cc/EnergyProductionCC.js +240 -164
  191. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  192. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  193. package/build/esm/cc/EntryControlCC.js +629 -493
  194. package/build/esm/cc/EntryControlCC.js.map +1 -1
  195. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  196. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +938 -769
  197. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  198. package/build/esm/cc/HailCC.js +51 -12
  199. package/build/esm/cc/HailCC.js.map +1 -1
  200. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  201. package/build/esm/cc/HumidityControlModeCC.js +357 -250
  202. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  203. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  204. package/build/esm/cc/HumidityControlOperatingStateCC.js +182 -109
  205. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  206. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  207. package/build/esm/cc/HumidityControlSetpointCC.js +706 -546
  208. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  209. package/build/esm/cc/InclusionControllerCC.js +197 -119
  210. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  211. package/build/esm/cc/IndicatorCC.js +973 -835
  212. package/build/esm/cc/IndicatorCC.js.map +1 -1
  213. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  214. package/build/esm/cc/IrrigationCC.js +1697 -1496
  215. package/build/esm/cc/IrrigationCC.js.map +1 -1
  216. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  217. package/build/esm/cc/LanguageCC.js +266 -184
  218. package/build/esm/cc/LanguageCC.js.map +1 -1
  219. package/build/esm/cc/LockCC.d.ts.map +1 -1
  220. package/build/esm/cc/LockCC.js +247 -162
  221. package/build/esm/cc/LockCC.js.map +1 -1
  222. package/build/esm/cc/ManufacturerProprietaryCC.js +192 -141
  223. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  224. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  225. package/build/esm/cc/ManufacturerSpecificCC.js +312 -223
  226. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  227. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  228. package/build/esm/cc/MeterCC.js +896 -795
  229. package/build/esm/cc/MeterCC.js.map +1 -1
  230. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  231. package/build/esm/cc/MultiChannelAssociationCC.js +631 -518
  232. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  233. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  234. package/build/esm/cc/MultiChannelCC.js +1106 -921
  235. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  236. package/build/esm/cc/MultiCommandCC.js +166 -102
  237. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  238. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  239. package/build/esm/cc/MultilevelSensorCC.js +616 -497
  240. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  241. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  242. package/build/esm/cc/MultilevelSwitchCC.js +621 -496
  243. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  244. package/build/esm/cc/NoOperationCC.js +82 -29
  245. package/build/esm/cc/NoOperationCC.js.map +1 -1
  246. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  247. package/build/esm/cc/NodeNamingCC.js +413 -294
  248. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  249. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  250. package/build/esm/cc/NotificationCC.js +1097 -966
  251. package/build/esm/cc/NotificationCC.js.map +1 -1
  252. package/build/esm/cc/PowerlevelCC.js +437 -311
  253. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  254. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  255. package/build/esm/cc/ProtectionCC.js +704 -543
  256. package/build/esm/cc/ProtectionCC.js.map +1 -1
  257. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  258. package/build/esm/cc/SceneActivationCC.js +157 -100
  259. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  260. package/build/esm/cc/SceneActuatorConfigurationCC.js +357 -269
  261. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  262. package/build/esm/cc/SceneControllerConfigurationCC.js +434 -346
  263. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  264. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  265. package/build/esm/cc/ScheduleEntryLockCC.js +1596 -1357
  266. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  267. package/build/esm/cc/Security2CC.js +1633 -1406
  268. package/build/esm/cc/Security2CC.js.map +1 -1
  269. package/build/esm/cc/SecurityCC.js +876 -687
  270. package/build/esm/cc/SecurityCC.js.map +1 -1
  271. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  272. package/build/esm/cc/SoundSwitchCC.js +689 -526
  273. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  274. package/build/esm/cc/SupervisionCC.js +349 -272
  275. package/build/esm/cc/SupervisionCC.js.map +1 -1
  276. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  277. package/build/esm/cc/ThermostatFanModeCC.js +388 -284
  278. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  279. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  280. package/build/esm/cc/ThermostatFanStateCC.js +184 -111
  281. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  282. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  283. package/build/esm/cc/ThermostatModeCC.js +435 -331
  284. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  285. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  286. package/build/esm/cc/ThermostatOperatingStateCC.js +180 -107
  287. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  288. package/build/esm/cc/ThermostatSetbackCC.js +274 -185
  289. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  290. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  291. package/build/esm/cc/ThermostatSetpointCC.js +674 -543
  292. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  293. package/build/esm/cc/TimeCC.js +499 -360
  294. package/build/esm/cc/TimeCC.js.map +1 -1
  295. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  296. package/build/esm/cc/TimeParametersCC.js +296 -211
  297. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  298. package/build/esm/cc/TransportServiceCC.js +464 -363
  299. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  300. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  301. package/build/esm/cc/UserCodeCC.js +1443 -1205
  302. package/build/esm/cc/UserCodeCC.js.map +1 -1
  303. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  304. package/build/esm/cc/VersionCC.js +744 -635
  305. package/build/esm/cc/VersionCC.js.map +1 -1
  306. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  307. package/build/esm/cc/WakeUpCC.js +494 -364
  308. package/build/esm/cc/WakeUpCC.js.map +1 -1
  309. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  310. package/build/esm/cc/WindowCoveringCC.js +655 -530
  311. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  312. package/build/esm/cc/ZWaveLongRangeCC.js +51 -11
  313. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  314. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  315. package/build/esm/cc/ZWavePlusCC.js +223 -162
  316. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  317. package/build/esm/cc/ZWaveProtocolCC.js +1443 -953
  318. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  319. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +4 -4
  320. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  321. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +390 -286
  322. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  323. package/build/esm/lib/CommandClassDecorators.d.ts +11 -15
  324. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  325. package/build/esm/lib/CommandClassDecorators.js +24 -24
  326. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  327. package/build/esm/lib/Security2/Extension.d.ts +1 -1
  328. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  329. package/build/esm/lib/Security2/Extension.js +207 -123
  330. package/build/esm/lib/Security2/Extension.js.map +1 -1
  331. package/package.json +6 -6
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/HumidityControlSetpointCC.ts"],
4
- "sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype Scale,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype ValueMetadataNumeric,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeFloatWithScale,\n\tgetNamedScale,\n\tgetUnknownScale,\n\tparseBitMask,\n\tparseFloatWithScale,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValue,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\ttype HumidityControlSetpointCapabilities,\n\tHumidityControlSetpointCommand,\n\tHumidityControlSetpointType,\n\ttype HumidityControlSetpointValue,\n} from \"../lib/_Types.js\";\n\nexport const HumidityControlSetpointCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Humidity Control Setpoint\"], {\n\t\t...V.staticProperty(\"supportedSetpointTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Humidity Control Setpoint\"], {\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"setpoint\",\n\t\t\t\"setpoint\",\n\t\t\t(setpointType: number) => setpointType,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"setpoint\" && typeof propertyKey === \"number\",\n\t\t\t(setpointType: number) => ({\n\t\t\t\t// This is the base metadata that will be extended on the fly\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: `Setpoint (${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\t\tsetpointType,\n\t\t\t\t\t)\n\t\t\t\t})`,\n\t\t\t\tccSpecific: { setpointType },\n\t\t\t} as const),\n\t\t),\n\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"setpointScale\",\n\t\t\t\"setpointScale\",\n\t\t\t(setpointType: number) => setpointType,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"setpointScale\" && typeof propertyKey === \"number\",\n\t\t\t(setpointType: number) => ({\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: `Setpoint scale (${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\t\tsetpointType,\n\t\t\t\t\t)\n\t\t\t\t})`,\n\t\t\t} as const),\n\t\t),\n\t}),\n});\n\nfunction getScale(scale: number): Scale {\n\treturn getNamedScale(\"humidity\", scale as any) ?? getUnknownScale(scale);\n}\nfunction getSetpointUnit(scale: number): string {\n\treturn getScale(scale).unit ?? \"\";\n}\n\n@API(CommandClasses[\"Humidity Control Setpoint\"])\nexport class HumidityControlSetpointCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: HumidityControlSetpointCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase HumidityControlSetpointCommand.Get:\n\t\t\tcase HumidityControlSetpointCommand.SupportedGet:\n\t\t\tcase HumidityControlSetpointCommand.CapabilitiesGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase HumidityControlSetpointCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: HumidityControlSetpointCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t\tvalue,\n\t\t) {\n\t\t\tif (property !== \"setpoint\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof propertyKey !== \"number\") {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`${\n\t\t\t\t\t\tCommandClasses[this.ccId]\n\t\t\t\t\t}: \"${property}\" must be further specified by a numeric property key`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\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\n\t\t\tconst scaleValueId = HumidityControlSetpointCCValues.setpointScale(\n\t\t\t\tpropertyKey,\n\t\t\t).endpoint(this.endpoint.index);\n\t\t\tconst preferredScale = this.tryGetValueDB()?.getValue<number>(\n\t\t\t\tscaleValueId,\n\t\t\t);\n\n\t\t\tconst result = await this.set(\n\t\t\t\tpropertyKey,\n\t\t\t\tvalue,\n\t\t\t\tpreferredScale ?? 0,\n\t\t\t);\n\n\t\t\t// Verify the change after a delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\tthis.schedulePoll({ property, propertyKey }, value);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(\n\t\t\tthis: HumidityControlSetpointCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"setpoint\":\n\t\t\t\t\tif (typeof propertyKey !== \"number\") {\n\t\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t\t`${\n\t\t\t\t\t\t\t\tCommandClasses[this.ccId]\n\t\t\t\t\t\t\t}: \"${property}\" must be further specified by a numeric property key`,\n\t\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (await this.get(propertyKey))?.value;\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@validateArgs()\n\tpublic async get(\n\t\tsetpointType: HumidityControlSetpointType,\n\t): Promise<MaybeNotKnown<HumidityControlSetpointValue>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.Get,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tHumidityControlSetpointCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (!response) return;\n\t\treturn response.type === HumidityControlSetpointType[\"N/A\"]\n\t\t\t// not supported\n\t\t\t? undefined\n\t\t\t// supported\n\t\t\t: {\n\t\t\t\tvalue: response.value,\n\t\t\t\tscale: response.scale,\n\t\t\t};\n\t}\n\n\t@validateArgs()\n\tpublic async set(\n\t\tsetpointType: HumidityControlSetpointType,\n\t\tvalue: number,\n\t\tscale: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.Set,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async getCapabilities(\n\t\tsetpointType: HumidityControlSetpointType,\n\t): Promise<MaybeNotKnown<HumidityControlSetpointCapabilities>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.CapabilitiesGet,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCCapabilitiesGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tHumidityControlSetpointCCCapabilitiesReport\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\"minValue\",\n\t\t\t\t\"maxValue\",\n\t\t\t\t\"minValueScale\",\n\t\t\t\t\"maxValueScale\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getSupportedSetpointTypes(): Promise<\n\t\tMaybeNotKnown<readonly HumidityControlSetpointType[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCSupportedGet({\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\tHumidityControlSetpointCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedSetpointTypes;\n\t}\n\n\t@validateArgs()\n\tpublic async getSupportedScales(\n\t\tsetpointType: HumidityControlSetpointType,\n\t): Promise<MaybeNotKnown<readonly Scale[]>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCScaleSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tHumidityControlSetpointCCScaleSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn response.supportedScales.map((scale) => getScale(scale));\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Humidity Control Setpoint\"])\n@implementedVersion(2)\n@ccValues(HumidityControlSetpointCCValues)\nexport class HumidityControlSetpointCC extends CommandClass {\n\tdeclare ccCommand: HumidityControlSetpointCommand;\n\n\tpublic translatePropertyKey(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey: string | number,\n\t): string | undefined {\n\t\tif (property === \"setpoint\") {\n\t\t\treturn getEnumMemberName(\n\t\t\t\tHumidityControlSetpointType,\n\t\t\t\tpropertyKey as any,\n\t\t\t);\n\t\t} else {\n\t\t\treturn super.translatePropertyKey(ctx, property, propertyKey);\n\t\t}\n\t}\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[\"Humidity Control Setpoint\"],\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// Query the supported setpoint types\n\t\tlet setpointTypes: HumidityControlSetpointType[] = [];\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"retrieving supported setpoint types...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst resp = await api.getSupportedSetpointTypes();\n\t\tif (resp) {\n\t\t\tsetpointTypes = [...resp];\n\t\t\tconst logMessage = \"received supported setpoint types:\\n\"\n\t\t\t\t+ setpointTypes\n\t\t\t\t\t.map((type) =>\n\t\t\t\t\t\tgetEnumMemberName(HumidityControlSetpointType, type)\n\t\t\t\t\t)\n\t\t\t\t\t.map((name) => `\u00B7 ${name}`)\n\t\t\t\t\t.join(\"\\n\");\n\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported setpoint types timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const type of setpointTypes) {\n\t\t\tconst setpointName = getEnumMemberName(\n\t\t\t\tHumidityControlSetpointType,\n\t\t\t\ttype,\n\t\t\t);\n\t\t\t// Find out the capabilities of this setpoint\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`retrieving capabilities for setpoint ${setpointName}...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst setpointScaleSupported = await api.getSupportedScales(type);\n\t\t\tif (setpointScaleSupported) {\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received supported scales for setpoint ${setpointName}: \n${\n\t\t\t\t\t\tsetpointScaleSupported\n\t\t\t\t\t\t\t.map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n\t\t\t\t\t\t\t.join(\"\")\n\t\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\n\t\t\t\tconst scaleValue = HumidityControlSetpointCCValues\n\t\t\t\t\t.setpointScale(type);\n\t\t\t\tconst states: Record<number, string> = {};\n\t\t\t\tfor (const scale of setpointScaleSupported) {\n\t\t\t\t\tif (scale.unit) states[scale.key] = scale.unit;\n\t\t\t\t}\n\t\t\t\tthis.setMetadata(ctx, scaleValue, {\n\t\t\t\t\t...scaleValue.meta,\n\t\t\t\t\tstates,\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst setpointCaps = await api.getCapabilities(type);\n\t\t\tif (setpointCaps) {\n\t\t\t\tconst minValueUnit = getSetpointUnit(\n\t\t\t\t\tsetpointCaps.minValueScale,\n\t\t\t\t);\n\t\t\t\tconst maxValueUnit = getSetpointUnit(\n\t\t\t\t\tsetpointCaps.maxValueScale,\n\t\t\t\t);\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received capabilities for setpoint ${setpointName}:\nminimum value: ${setpointCaps.minValue} ${minValueUnit}\nmaximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// Query the current value for all setpoint types\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Humidity Control Setpoint\"],\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 setpointTypes: HumidityControlSetpointType[] = this.getValue(\n\t\t\tctx,\n\t\t\tHumidityControlSetpointCCValues.supportedSetpointTypes,\n\t\t) ?? [];\n\n\t\t// Query each setpoint's current value\n\t\tfor (const type of setpointTypes) {\n\t\t\tconst setpointName = getEnumMemberName(\n\t\t\t\tHumidityControlSetpointType,\n\t\t\t\ttype,\n\t\t\t);\n\t\t\t// Every time, query the current value\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`querying current value of setpoint ${setpointName}...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst setpoint = await api.get(type);\n\t\t\tif (setpoint) {\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received current value of setpoint ${setpointName}: ${setpoint.value} ${\n\t\t\t\t\t\tgetScale(setpoint.scale).unit ?? \"\"\n\t\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\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 HumidityControlSetpointCCSetOptions {\n\tsetpointType: HumidityControlSetpointType;\n\tvalue: number;\n\tscale: number;\n}\n\n@CCCommand(HumidityControlSetpointCommand.Set)\n@useSupervision()\nexport class HumidityControlSetpointCCSet extends HumidityControlSetpointCC {\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t\tthis.value = options.value;\n\t\tthis.scale = options.scale;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCSet {\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 HumidityControlSetpointCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\tpublic value: number;\n\tpublic scale: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.setpointType & 0b1111]),\n\t\t\tencodeFloatWithScale(this.value, this.scale),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst scale = getScale(this.scale);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t\tvalue: `${this.value} ${scale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCReportOptions {\n\ttype: HumidityControlSetpointType;\n\tscale: number;\n\tvalue: number;\n}\n\n@CCCommand(HumidityControlSetpointCommand.Report)\nexport class HumidityControlSetpointCCReport extends HumidityControlSetpointCC {\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.type = options.type;\n\t\tthis.value = options.value;\n\t\tthis.scale = options.scale;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n\n\t\t// Setpoint type 0 is not defined in the spec, prevent devices from using it.\n\t\tif (type === 0) {\n\t\t\t// Not supported\n\t\t\treturn new HumidityControlSetpointCCReport({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\ttype,\n\t\t\t\tvalue: 0,\n\t\t\t\tscale: 0,\n\t\t\t});\n\t\t}\n\n\t\t// parseFloatWithScale does its own validation\n\t\tconst { value, scale } = parseFloatWithScale(raw.payload.subarray(1));\n\n\t\treturn new HumidityControlSetpointCCReport({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tconst scale = getScale(this.scale);\n\n\t\tconst setpointValue = HumidityControlSetpointCCValues.setpoint(\n\t\t\tthis.type,\n\t\t);\n\t\tconst existingMetadata = this.getMetadata<ValueMetadataNumeric>(\n\t\t\tctx,\n\t\t\tsetpointValue,\n\t\t);\n\n\t\t// Update the metadata when it is missing or the unit has changed\n\t\tif (existingMetadata?.unit !== scale.unit) {\n\t\t\tthis.setMetadata(ctx, setpointValue, {\n\t\t\t\t...(existingMetadata ?? setpointValue.meta),\n\t\t\t\tunit: scale.unit,\n\t\t\t});\n\t\t}\n\t\tthis.setValue(ctx, setpointValue, this.value);\n\n\t\t// Remember the device-preferred setpoint scale so it can be used in SET commands\n\t\tthis.setValue(\n\t\t\tctx,\n\t\t\tHumidityControlSetpointCCValues.setpointScale(this.type),\n\t\t\tthis.scale,\n\t\t);\n\t\treturn true;\n\t}\n\n\tpublic type: HumidityControlSetpointType;\n\tpublic scale: number;\n\tpublic value: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst scale = getScale(this.scale);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.type,\n\t\t\t\t),\n\t\t\t\tvalue: `${this.value} ${scale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\nfunction testResponseForHumidityControlSetpointGet(\n\tsent: HumidityControlSetpointCCGet,\n\treceived: HumidityControlSetpointCCReport,\n) {\n\t// We expect a Humidity Control Setpoint Report that matches the requested setpoint type\n\treturn received.type === sent.setpointType;\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCGetOptions {\n\tsetpointType: HumidityControlSetpointType;\n}\n\n@CCCommand(HumidityControlSetpointCommand.Get)\n@expectedCCResponse(\n\tHumidityControlSetpointCCReport,\n\ttestResponseForHumidityControlSetpointGet,\n)\nexport class HumidityControlSetpointCCGet extends HumidityControlSetpointCC {\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCGet {\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 HumidityControlSetpointCCGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.setpointType & 0b1111]);\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\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCSupportedReportOptions {\n\tsupportedSetpointTypes: HumidityControlSetpointType[];\n}\n\n@CCCommand(HumidityControlSetpointCommand.SupportedReport)\nexport class HumidityControlSetpointCCSupportedReport\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedSetpointTypes = options.supportedSetpointTypes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst supportedSetpointTypes: HumidityControlSetpointType[] =\n\t\t\tparseBitMask(\n\t\t\t\traw.payload,\n\t\t\t\tHumidityControlSetpointType[\"N/A\"],\n\t\t\t);\n\n\t\treturn new HumidityControlSetpointCCSupportedReport({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedSetpointTypes,\n\t\t});\n\t}\n\n\t@ccValue(HumidityControlSetpointCCValues.supportedSetpointTypes)\n\tpublic readonly supportedSetpointTypes:\n\t\treadonly HumidityControlSetpointType[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported setpoint types\": this.supportedSetpointTypes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(t) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(HumidityControlSetpointCommand.SupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCSupportedReport)\nexport class HumidityControlSetpointCCSupportedGet\n\textends HumidityControlSetpointCC\n{}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedReportOptions {\n\tsupportedScales: number[];\n}\n\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedReport\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<\n\t\t\tHumidityControlSetpointCCScaleSupportedReportOptions\n\t\t>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedScales = options.supportedScales;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCScaleSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst supportedScales = parseBitMask(\n\t\t\tBytes.from([raw.payload[0] & 0b1111]),\n\t\t\t0,\n\t\t);\n\n\t\treturn new HumidityControlSetpointCCScaleSupportedReport({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedScales,\n\t\t});\n\t}\n\n\tpublic readonly supportedScales: readonly number[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst supportedScales = this.supportedScales.map((scale) =>\n\t\t\tgetScale(scale)\n\t\t);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"scale supported\": supportedScales\n\t\t\t\t\t.map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedGetOptions {\n\tsetpointType: HumidityControlSetpointType;\n}\n\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedGet\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCScaleSupportedGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCScaleSupportedGet {\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 HumidityControlSetpointCCScaleSupportedGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.setpointType & 0b1111]);\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\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesReportOptions {\n\ttype: HumidityControlSetpointType;\n\tminValue: number;\n\tmaxValue: number;\n\tminValueScale: number;\n\tmaxValueScale: number;\n}\n\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesReport\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<\n\t\t\tHumidityControlSetpointCCCapabilitiesReportOptions\n\t\t>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.type = options.type;\n\t\tthis.minValue = options.minValue;\n\t\tthis.maxValue = options.maxValue;\n\t\tthis.minValueScale = options.minValueScale;\n\t\tthis.maxValueScale = options.maxValueScale;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCCapabilitiesReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n\n\t\t// parseFloatWithScale does its own validation\n\t\tconst {\n\t\t\tvalue: minValue,\n\t\t\tscale: minValueScale,\n\t\t\tbytesRead,\n\t\t} = parseFloatWithScale(raw.payload.subarray(1));\n\t\tconst { value: maxValue, scale: maxValueScale } = parseFloatWithScale(\n\t\t\traw.payload.subarray(1 + bytesRead),\n\t\t);\n\n\t\treturn new HumidityControlSetpointCCCapabilitiesReport({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttype,\n\t\t\tminValue,\n\t\t\tminValueScale,\n\t\t\tmaxValue,\n\t\t\tmaxValueScale,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Predefine the metadata\n\t\tconst setpointValue = HumidityControlSetpointCCValues.setpoint(\n\t\t\tthis.type,\n\t\t);\n\t\tthis.setMetadata(ctx, setpointValue, {\n\t\t\t...setpointValue.meta,\n\t\t\tmin: this.minValue,\n\t\t\tmax: this.maxValue,\n\t\t\tunit: getSetpointUnit(this.minValueScale)\n\t\t\t\t|| getSetpointUnit(this.maxValueScale),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic type: HumidityControlSetpointType;\n\tpublic minValue: number;\n\tpublic maxValue: number;\n\tpublic minValueScale: number;\n\tpublic maxValueScale: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst minValueScale = getScale(this.minValueScale);\n\t\tconst maxValueScale = getScale(this.maxValueScale);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.type,\n\t\t\t\t),\n\t\t\t\t\"min value\": `${this.minValue} ${minValueScale.unit}`,\n\t\t\t\t\"max value\": `${this.maxValue} ${maxValueScale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesGetOptions {\n\tsetpointType: HumidityControlSetpointType;\n}\n\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesGet)\n@expectedCCResponse(HumidityControlSetpointCCCapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesGet\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCCapabilitiesGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCCapabilitiesGet {\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 HumidityControlSetpointCCCapabilitiesGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.setpointType & 0b1111]);\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\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAmBO;AAMP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAKO;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,kCAAkC,OAAO,OAAO;EAC5D,GAAG,gBAAE,qBAAqB,2BAAe,2BAA2B,GAAG;IACtE,GAAG,gBAAE,eAAe,0BAA0B,QAAW;MACxD,UAAU;KACV;GACD;EAED,GAAG,gBAAE,sBAAsB,2BAAe,2BAA2B,GAAG;IACvE,GAAG,gBAAE,8BACJ,YACA,YACA,CAAC,iBAAyB,cAC1B,CAAC,EAAE,UAAU,YAAW,MACvB,aAAa,cAAc,OAAO,gBAAgB,UACnD,CAAC,kBAA0B;;MAE1B,GAAG,0BAAc;MACjB,OAAO,iBACN,gCACC,0CACA,YAAY,CAEd;MACA,YAAY,EAAE,aAAY;MAChB;IAGZ,GAAG,gBAAE,8BACJ,iBACA,iB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,WAAA;MAFpD,yCAAU,4CAA+B,eAAe;MACxD,kDAAmB,2CAA2C;GAClD,wCAAwC;",
6
- "names": ["import_safe", "HumidityControlSetpointCCAPI", "HumidityControlSetpointCC", "HumidityControlSetpointCCSet", "HumidityControlSetpointCCReport", "HumidityControlSetpointCCGet", "HumidityControlSetpointCCSupportedReport", "HumidityControlSetpointCCSupportedGet", "HumidityControlSetpointCCScaleSupportedReport", "HumidityControlSetpointCCScaleSupportedGet", "HumidityControlSetpointCCCapabilitiesReport", "HumidityControlSetpointCCCapabilitiesGet"]
4
+ "sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype Scale,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype ValueMetadataNumeric,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeFloatWithScale,\n\tgetNamedScale,\n\tgetUnknownScale,\n\tparseBitMask,\n\tparseFloatWithScale,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\ttype HumidityControlSetpointCapabilities,\n\tHumidityControlSetpointCommand,\n\tHumidityControlSetpointType,\n\ttype HumidityControlSetpointValue,\n} from \"../lib/_Types.js\";\n\nexport const HumidityControlSetpointCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Humidity Control Setpoint\"], {\n\t\t...V.staticProperty(\"supportedSetpointTypes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t}),\n\n\t...V.defineDynamicCCValues(CommandClasses[\"Humidity Control Setpoint\"], {\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"setpoint\",\n\t\t\t\"setpoint\",\n\t\t\t(setpointType: number) => setpointType,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"setpoint\" && typeof propertyKey === \"number\",\n\t\t\t(setpointType: number) => ({\n\t\t\t\t// This is the base metadata that will be extended on the fly\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: `Setpoint (${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\t\tsetpointType,\n\t\t\t\t\t)\n\t\t\t\t})`,\n\t\t\t\tccSpecific: { setpointType },\n\t\t\t} as const),\n\t\t),\n\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"setpointScale\",\n\t\t\t\"setpointScale\",\n\t\t\t(setpointType: number) => setpointType,\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"setpointScale\" && typeof propertyKey === \"number\",\n\t\t\t(setpointType: number) => ({\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: `Setpoint scale (${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\t\tsetpointType,\n\t\t\t\t\t)\n\t\t\t\t})`,\n\t\t\t} as const),\n\t\t),\n\t}),\n});\n\nfunction getScale(scale: number): Scale {\n\treturn getNamedScale(\"humidity\", scale as any) ?? getUnknownScale(scale);\n}\nfunction getSetpointUnit(scale: number): string {\n\treturn getScale(scale).unit ?? \"\";\n}\n\n@API(CommandClasses[\"Humidity Control Setpoint\"])\nexport class HumidityControlSetpointCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: HumidityControlSetpointCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase HumidityControlSetpointCommand.Get:\n\t\t\tcase HumidityControlSetpointCommand.SupportedGet:\n\t\t\tcase HumidityControlSetpointCommand.CapabilitiesGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase HumidityControlSetpointCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: HumidityControlSetpointCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t\tvalue,\n\t\t) {\n\t\t\tif (property !== \"setpoint\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof propertyKey !== \"number\") {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`${\n\t\t\t\t\t\tCommandClasses[this.ccId]\n\t\t\t\t\t}: \"${property}\" must be further specified by a numeric property key`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\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\n\t\t\tconst scaleValueId = HumidityControlSetpointCCValues.setpointScale(\n\t\t\t\tpropertyKey,\n\t\t\t).endpoint(this.endpoint.index);\n\t\t\tconst preferredScale = this.tryGetValueDB()?.getValue<number>(\n\t\t\t\tscaleValueId,\n\t\t\t);\n\n\t\t\tconst result = await this.set(\n\t\t\t\tpropertyKey,\n\t\t\t\tvalue,\n\t\t\t\tpreferredScale ?? 0,\n\t\t\t);\n\n\t\t\t// Verify the change after a delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\tthis.schedulePoll({ property, propertyKey }, value);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(\n\t\t\tthis: HumidityControlSetpointCCAPI,\n\t\t\t{ property, propertyKey },\n\t\t) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"setpoint\":\n\t\t\t\t\tif (typeof propertyKey !== \"number\") {\n\t\t\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t\t\t`${\n\t\t\t\t\t\t\t\tCommandClasses[this.ccId]\n\t\t\t\t\t\t\t}: \"${property}\" must be further specified by a numeric property key`,\n\t\t\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (await this.get(propertyKey))?.value;\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@validateArgs()\n\tpublic async get(\n\t\tsetpointType: HumidityControlSetpointType,\n\t): Promise<MaybeNotKnown<HumidityControlSetpointValue>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.Get,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tHumidityControlSetpointCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (!response) return;\n\t\treturn response.type === HumidityControlSetpointType[\"N/A\"]\n\t\t\t// not supported\n\t\t\t? undefined\n\t\t\t// supported\n\t\t\t: {\n\t\t\t\tvalue: response.value,\n\t\t\t\tscale: response.scale,\n\t\t\t};\n\t}\n\n\t@validateArgs()\n\tpublic async set(\n\t\tsetpointType: HumidityControlSetpointType,\n\t\tvalue: number,\n\t\tscale: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.Set,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t@validateArgs()\n\tpublic async getCapabilities(\n\t\tsetpointType: HumidityControlSetpointType,\n\t): Promise<MaybeNotKnown<HumidityControlSetpointCapabilities>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.CapabilitiesGet,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCCapabilitiesGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tHumidityControlSetpointCCCapabilitiesReport\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\"minValue\",\n\t\t\t\t\"maxValue\",\n\t\t\t\t\"minValueScale\",\n\t\t\t\t\"maxValueScale\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getSupportedSetpointTypes(): Promise<\n\t\tMaybeNotKnown<readonly HumidityControlSetpointType[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCSupportedGet({\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\tHumidityControlSetpointCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedSetpointTypes;\n\t}\n\n\t@validateArgs()\n\tpublic async getSupportedScales(\n\t\tsetpointType: HumidityControlSetpointType,\n\t): Promise<MaybeNotKnown<readonly Scale[]>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tHumidityControlSetpointCommand,\n\t\t\tHumidityControlSetpointCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new HumidityControlSetpointCCScaleSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsetpointType,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tHumidityControlSetpointCCScaleSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn response.supportedScales.map((scale) => getScale(scale));\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Humidity Control Setpoint\"])\n@implementedVersion(2)\n@ccValues(HumidityControlSetpointCCValues)\nexport class HumidityControlSetpointCC extends CommandClass {\n\tdeclare ccCommand: HumidityControlSetpointCommand;\n\n\tpublic translatePropertyKey(\n\t\tctx: GetValueDB,\n\t\tproperty: string | number,\n\t\tpropertyKey: string | number,\n\t): string | undefined {\n\t\tif (property === \"setpoint\") {\n\t\t\treturn getEnumMemberName(\n\t\t\t\tHumidityControlSetpointType,\n\t\t\t\tpropertyKey as any,\n\t\t\t);\n\t\t} else {\n\t\t\treturn super.translatePropertyKey(ctx, property, propertyKey);\n\t\t}\n\t}\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[\"Humidity Control Setpoint\"],\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// Query the supported setpoint types\n\t\tlet setpointTypes: HumidityControlSetpointType[] = [];\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"retrieving supported setpoint types...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst resp = await api.getSupportedSetpointTypes();\n\t\tif (resp) {\n\t\t\tsetpointTypes = [...resp];\n\t\t\tconst logMessage = \"received supported setpoint types:\\n\"\n\t\t\t\t+ setpointTypes\n\t\t\t\t\t.map((type) =>\n\t\t\t\t\t\tgetEnumMemberName(HumidityControlSetpointType, type)\n\t\t\t\t\t)\n\t\t\t\t\t.map((name) => `\u00B7 ${name}`)\n\t\t\t\t\t.join(\"\\n\");\n\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported setpoint types timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const type of setpointTypes) {\n\t\t\tconst setpointName = getEnumMemberName(\n\t\t\t\tHumidityControlSetpointType,\n\t\t\t\ttype,\n\t\t\t);\n\t\t\t// Find out the capabilities of this setpoint\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`retrieving capabilities for setpoint ${setpointName}...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst setpointScaleSupported = await api.getSupportedScales(type);\n\t\t\tif (setpointScaleSupported) {\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received supported scales for setpoint ${setpointName}: \n${\n\t\t\t\t\t\tsetpointScaleSupported\n\t\t\t\t\t\t\t.map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n\t\t\t\t\t\t\t.join(\"\")\n\t\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\n\t\t\t\tconst scaleValue = HumidityControlSetpointCCValues\n\t\t\t\t\t.setpointScale(type);\n\t\t\t\tconst states: Record<number, string> = {};\n\t\t\t\tfor (const scale of setpointScaleSupported) {\n\t\t\t\t\tif (scale.unit) states[scale.key] = scale.unit;\n\t\t\t\t}\n\t\t\t\tthis.setMetadata(ctx, scaleValue, {\n\t\t\t\t\t...scaleValue.meta,\n\t\t\t\t\tstates,\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst setpointCaps = await api.getCapabilities(type);\n\t\t\tif (setpointCaps) {\n\t\t\t\tconst minValueUnit = getSetpointUnit(\n\t\t\t\t\tsetpointCaps.minValueScale,\n\t\t\t\t);\n\t\t\t\tconst maxValueUnit = getSetpointUnit(\n\t\t\t\t\tsetpointCaps.maxValueScale,\n\t\t\t\t);\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received capabilities for setpoint ${setpointName}:\nminimum value: ${setpointCaps.minValue} ${minValueUnit}\nmaximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// Query the current value for all setpoint types\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Humidity Control Setpoint\"],\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 setpointTypes: HumidityControlSetpointType[] = this.getValue(\n\t\t\tctx,\n\t\t\tHumidityControlSetpointCCValues.supportedSetpointTypes,\n\t\t) ?? [];\n\n\t\t// Query each setpoint's current value\n\t\tfor (const type of setpointTypes) {\n\t\t\tconst setpointName = getEnumMemberName(\n\t\t\t\tHumidityControlSetpointType,\n\t\t\t\ttype,\n\t\t\t);\n\t\t\t// Every time, query the current value\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t`querying current value of setpoint ${setpointName}...`,\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst setpoint = await api.get(type);\n\t\t\tif (setpoint) {\n\t\t\t\tconst logMessage =\n\t\t\t\t\t`received current value of setpoint ${setpointName}: ${setpoint.value} ${\n\t\t\t\t\t\tgetScale(setpoint.scale).unit ?? \"\"\n\t\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\t\tmessage: logMessage,\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 HumidityControlSetpointCCSetOptions {\n\tsetpointType: HumidityControlSetpointType;\n\tvalue: number;\n\tscale: number;\n}\n\n@CCCommand(HumidityControlSetpointCommand.Set)\n@useSupervision()\nexport class HumidityControlSetpointCCSet extends HumidityControlSetpointCC {\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t\tthis.value = options.value;\n\t\tthis.scale = options.scale;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCSet {\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 HumidityControlSetpointCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\tpublic value: number;\n\tpublic scale: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([this.setpointType & 0b1111]),\n\t\t\tencodeFloatWithScale(this.value, this.scale),\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst scale = getScale(this.scale);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t\tvalue: `${this.value} ${scale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCReportOptions {\n\ttype: HumidityControlSetpointType;\n\tscale: number;\n\tvalue: number;\n}\n\n@CCCommand(HumidityControlSetpointCommand.Report)\nexport class HumidityControlSetpointCCReport extends HumidityControlSetpointCC {\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.type = options.type;\n\t\tthis.value = options.value;\n\t\tthis.scale = options.scale;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n\n\t\t// Setpoint type 0 is not defined in the spec, prevent devices from using it.\n\t\tif (type === 0) {\n\t\t\t// Not supported\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\ttype,\n\t\t\t\tvalue: 0,\n\t\t\t\tscale: 0,\n\t\t\t});\n\t\t}\n\n\t\t// parseFloatWithScale does its own validation\n\t\tconst { value, scale } = parseFloatWithScale(raw.payload.subarray(1));\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\tscale,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\tconst scale = getScale(this.scale);\n\n\t\tconst setpointValue = HumidityControlSetpointCCValues.setpoint(\n\t\t\tthis.type,\n\t\t);\n\t\tconst existingMetadata = this.getMetadata<ValueMetadataNumeric>(\n\t\t\tctx,\n\t\t\tsetpointValue,\n\t\t);\n\n\t\t// Update the metadata when it is missing or the unit has changed\n\t\tif (existingMetadata?.unit !== scale.unit) {\n\t\t\tthis.setMetadata(ctx, setpointValue, {\n\t\t\t\t...(existingMetadata ?? setpointValue.meta),\n\t\t\t\tunit: scale.unit,\n\t\t\t});\n\t\t}\n\t\tthis.setValue(ctx, setpointValue, this.value);\n\n\t\t// Remember the device-preferred setpoint scale so it can be used in SET commands\n\t\tthis.setValue(\n\t\t\tctx,\n\t\t\tHumidityControlSetpointCCValues.setpointScale(this.type),\n\t\t\tthis.scale,\n\t\t);\n\t\treturn true;\n\t}\n\n\tpublic type: HumidityControlSetpointType;\n\tpublic scale: number;\n\tpublic value: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst scale = getScale(this.scale);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.type,\n\t\t\t\t),\n\t\t\t\tvalue: `${this.value} ${scale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\nfunction testResponseForHumidityControlSetpointGet(\n\tsent: HumidityControlSetpointCCGet,\n\treceived: HumidityControlSetpointCCReport,\n) {\n\t// We expect a Humidity Control Setpoint Report that matches the requested setpoint type\n\treturn received.type === sent.setpointType;\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCGetOptions {\n\tsetpointType: HumidityControlSetpointType;\n}\n\n@CCCommand(HumidityControlSetpointCommand.Get)\n@expectedCCResponse(\n\tHumidityControlSetpointCCReport,\n\ttestResponseForHumidityControlSetpointGet,\n)\nexport class HumidityControlSetpointCCGet extends HumidityControlSetpointCC {\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCGet {\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 HumidityControlSetpointCCGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.setpointType & 0b1111]);\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\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCSupportedReportOptions {\n\tsupportedSetpointTypes: HumidityControlSetpointType[];\n}\n\n@CCCommand(HumidityControlSetpointCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportedSetpointTypes\",\n\tHumidityControlSetpointCCValues.supportedSetpointTypes,\n)\nexport class HumidityControlSetpointCCSupportedReport\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedSetpointTypes = options.supportedSetpointTypes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst supportedSetpointTypes: HumidityControlSetpointType[] =\n\t\t\tparseBitMask(\n\t\t\t\traw.payload,\n\t\t\t\tHumidityControlSetpointType[\"N/A\"],\n\t\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedSetpointTypes,\n\t\t});\n\t}\n\n\tpublic readonly supportedSetpointTypes:\n\t\treadonly HumidityControlSetpointType[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported setpoint types\": this.supportedSetpointTypes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(t) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${\n\t\t\t\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(HumidityControlSetpointCommand.SupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCSupportedReport)\nexport class HumidityControlSetpointCCSupportedGet\n\textends HumidityControlSetpointCC\n{}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedReportOptions {\n\tsupportedScales: number[];\n}\n\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedReport\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<\n\t\t\tHumidityControlSetpointCCScaleSupportedReportOptions\n\t\t>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportedScales = options.supportedScales;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCScaleSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst supportedScales = parseBitMask(\n\t\t\tBytes.from([raw.payload[0] & 0b1111]),\n\t\t\t0,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedScales,\n\t\t});\n\t}\n\n\tpublic readonly supportedScales: readonly number[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst supportedScales = this.supportedScales.map((scale) =>\n\t\t\tgetScale(scale)\n\t\t);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"scale supported\": supportedScales\n\t\t\t\t\t.map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedGetOptions {\n\tsetpointType: HumidityControlSetpointType;\n}\n\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedGet\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCScaleSupportedGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCScaleSupportedGet {\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 HumidityControlSetpointCCScaleSupportedGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.setpointType & 0b1111]);\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\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesReportOptions {\n\ttype: HumidityControlSetpointType;\n\tminValue: number;\n\tmaxValue: number;\n\tminValueScale: number;\n\tmaxValueScale: number;\n}\n\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesReport\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<\n\t\t\tHumidityControlSetpointCCCapabilitiesReportOptions\n\t\t>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.type = options.type;\n\t\tthis.minValue = options.minValue;\n\t\tthis.maxValue = options.maxValue;\n\t\tthis.minValueScale = options.minValueScale;\n\t\tthis.maxValueScale = options.maxValueScale;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): HumidityControlSetpointCCCapabilitiesReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n\n\t\t// parseFloatWithScale does its own validation\n\t\tconst {\n\t\t\tvalue: minValue,\n\t\t\tscale: minValueScale,\n\t\t\tbytesRead,\n\t\t} = parseFloatWithScale(raw.payload.subarray(1));\n\t\tconst { value: maxValue, scale: maxValueScale } = parseFloatWithScale(\n\t\t\traw.payload.subarray(1 + bytesRead),\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttype,\n\t\t\tminValue,\n\t\t\tminValueScale,\n\t\t\tmaxValue,\n\t\t\tmaxValueScale,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Predefine the metadata\n\t\tconst setpointValue = HumidityControlSetpointCCValues.setpoint(\n\t\t\tthis.type,\n\t\t);\n\t\tthis.setMetadata(ctx, setpointValue, {\n\t\t\t...setpointValue.meta,\n\t\t\tmin: this.minValue,\n\t\t\tmax: this.maxValue,\n\t\t\tunit: getSetpointUnit(this.minValueScale)\n\t\t\t\t|| getSetpointUnit(this.maxValueScale),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic type: HumidityControlSetpointType;\n\tpublic minValue: number;\n\tpublic maxValue: number;\n\tpublic minValueScale: number;\n\tpublic maxValueScale: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst minValueScale = getScale(this.minValueScale);\n\t\tconst maxValueScale = getScale(this.maxValueScale);\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.type,\n\t\t\t\t),\n\t\t\t\t\"min value\": `${this.minValue} ${minValueScale.unit}`,\n\t\t\t\t\"max value\": `${this.maxValue} ${maxValueScale.unit}`,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesGetOptions {\n\tsetpointType: HumidityControlSetpointType;\n}\n\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesGet)\n@expectedCCResponse(HumidityControlSetpointCCCapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesGet\n\textends HumidityControlSetpointCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<HumidityControlSetpointCCCapabilitiesGetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.setpointType = options.setpointType;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): HumidityControlSetpointCCCapabilitiesGet {\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 HumidityControlSetpointCCCapabilitiesGet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic setpointType: HumidityControlSetpointType;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.setpointType & 0b1111]);\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\"setpoint type\": getEnumMemberName(\n\t\t\t\t\tHumidityControlSetpointType,\n\t\t\t\t\tthis.setpointType,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAmBO;AAMP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAKO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,kCAAkC,OAAO,OAAO;EAC5D,GAAG,gBAAE,qBAAqB,2BAAe,2BAA2B,GAAG;IACtE,GAAG,gBAAE,eAAe,0BAA0B,QAAW;MACxD,UAAU;KACV;GACD;EAED,GAAG,gBAAE,sBAAsB,2BAAe,2BAA2B,GAAG;IACvE,GAAG,gBAAE,8BACJ,YACA,YACA,CAAC,iBAAyB,cAC1B,CAAC,EAAE,UAAU,YAAW,MACvB,aAAa,cAAc,OAAO,gBAAgB,UACnD,CAAC,kBAA0B;;MAE1B,GAAG,0BAAc;MACjB,OAAO,iBACN,gCACC,0CACA,YAAY,CAEd;MACA,YAAY,EAAE,aAAY;MAChB;IAGZ,GAAG,gBAAE,8BACJ,iBACA,iBACA,CAAC,iBAAyB,cAC1B,CAAC,EAAE,UAAU,YAAW,MACvB,aAAa,mBAAmB,OAAO,gBAAgB,UACxD,CAAC,kBAA0B;MAC1B,GAAG,0BAAc;MACjB,OAAO,uBACN,gCACC,0CACA,YAAY,CAEd;MACU;GAEZ;CACD;AAED,SAAS,SAAS,OAAa;AAC9B,aAAO,2BAAc,YAAY,KAAY,SAAK,6BAAgB,KAAK;AACxE;AACA,SAAS,gBAAgB,OAAa;AACrC,SAAO,SAAS,KAAK,EAAE,QAAQ;AAChC;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andClass = require("../lib/CommandClass.js");
31
31
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
32
32
  var import_Types = require("../lib/_Types.js");
33
- var __decorate = function(decorators, target, key, desc) {
34
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37
- return c > 3 && r && Object.defineProperty(target, key, r), r;
38
- };
39
- var InclusionControllerCCComplete_1, InclusionControllerCCInitiate_1;
40
- let InclusionControllerCC = class InclusionControllerCC2 extends import_CommandClass.CommandClass {
41
- };
42
- InclusionControllerCC = __decorate([
43
- (0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Inclusion Controller"]),
44
- (0, import_CommandClassDecorators.implementedVersion)(1)
45
- ], InclusionControllerCC);
46
- let InclusionControllerCCAPI = class InclusionControllerCCAPI2 extends import_API.CCAPI {
47
- supportsCommand(cmd) {
48
- switch (cmd) {
49
- case import_Types.InclusionControllerCommand.Initiate:
50
- case import_Types.InclusionControllerCommand.Complete:
51
- return true;
52
- }
53
- return super.supportsCommand(cmd);
54
- }
55
- /** Instruct the target to initiate the given inclusion step for the given node */
56
- async initiateStep(nodeId, step) {
57
- this.assertSupportsCommand(import_Types.InclusionControllerCommand, import_Types.InclusionControllerCommand.Initiate);
58
- const cc = new InclusionControllerCCInitiate({
59
- nodeId: this.endpoint.nodeId,
60
- endpointIndex: this.endpoint.index,
61
- includedNodeId: nodeId,
62
- step
63
- });
64
- await this.host.sendCommand(cc, this.commandOptions);
33
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
34
+ function accept(f) {
35
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
36
+ return f;
65
37
  }
66
- /** Indicate to the other node that the given inclusion step has been completed */
67
- async completeStep(step, status) {
68
- this.assertSupportsCommand(import_Types.InclusionControllerCommand, import_Types.InclusionControllerCommand.Complete);
69
- const cc = new InclusionControllerCCComplete({
70
- nodeId: this.endpoint.nodeId,
71
- endpointIndex: this.endpoint.index,
72
- step,
73
- status
74
- });
75
- await this.host.sendCommand(cc, this.commandOptions);
76
- }
77
- };
78
- InclusionControllerCCAPI = __decorate([
79
- (0, import_CommandClassDecorators.API)(import_core.CommandClasses["Inclusion Controller"])
80
- ], InclusionControllerCCAPI);
81
- let InclusionControllerCCComplete = InclusionControllerCCComplete_1 = class InclusionControllerCCComplete2 extends InclusionControllerCC {
82
- constructor(options) {
83
- super(options);
84
- this.step = options.step;
85
- this.status = options.status;
86
- }
87
- static from(raw, ctx) {
88
- (0, import_core.validatePayload)(raw.payload.length >= 2);
89
- const step = raw.payload[0];
90
- import_core.validatePayload.withReason("Invalid inclusion controller step")(step in import_Types.InclusionControllerStep);
91
- const status = raw.payload[1];
92
- return new InclusionControllerCCComplete_1({
93
- nodeId: ctx.sourceNodeId,
94
- step,
95
- status
96
- });
97
- }
98
- step;
99
- status;
100
- serialize(ctx) {
101
- this.payload = import_shared.Bytes.from([this.step, this.status]);
102
- return super.serialize(ctx);
103
- }
104
- toLogEntry(ctx) {
105
- return {
106
- ...super.toLogEntry(ctx),
107
- message: {
108
- step: (0, import_shared.getEnumMemberName)(import_Types.InclusionControllerStep, this.step),
109
- status: (0, import_shared.getEnumMemberName)(import_Types.InclusionControllerStatus, this.status)
110
- }
38
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
39
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
40
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
41
+ var _, done = false;
42
+ for (var i = decorators.length - 1; i >= 0; i--) {
43
+ var context = {};
44
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
45
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
46
+ context.addInitializer = function(f) {
47
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
48
+ extraInitializers.push(accept(f || null));
111
49
  };
50
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
51
+ if (kind === "accessor") {
52
+ if (result === void 0) continue;
53
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
54
+ if (_ = accept(result.get)) descriptor.get = _;
55
+ if (_ = accept(result.set)) descriptor.set = _;
56
+ if (_ = accept(result.init)) initializers.unshift(_);
57
+ } else if (_ = accept(result)) {
58
+ if (kind === "field") initializers.unshift(_);
59
+ else descriptor[key] = _;
60
+ }
112
61
  }
62
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
63
+ done = true;
113
64
  };
114
- InclusionControllerCCComplete = InclusionControllerCCComplete_1 = __decorate([
115
- (0, import_CommandClassDecorators.CCCommand)(import_Types.InclusionControllerCommand.Complete)
116
- ], InclusionControllerCCComplete);
117
- let InclusionControllerCCInitiate = InclusionControllerCCInitiate_1 = class InclusionControllerCCInitiate2 extends InclusionControllerCC {
118
- constructor(options) {
119
- super(options);
120
- this.includedNodeId = options.includedNodeId;
121
- this.step = options.step;
122
- }
123
- static from(raw, ctx) {
124
- (0, import_core.validatePayload)(raw.payload.length >= 2);
125
- const includedNodeId = raw.payload[0];
126
- const step = raw.payload[1];
127
- import_core.validatePayload.withReason("Invalid inclusion controller step")(step in import_Types.InclusionControllerStep);
128
- return new InclusionControllerCCInitiate_1({
129
- nodeId: ctx.sourceNodeId,
130
- includedNodeId,
131
- step
132
- });
133
- }
134
- includedNodeId;
135
- step;
136
- serialize(ctx) {
137
- this.payload = import_shared.Bytes.from([this.includedNodeId, this.step]);
138
- return super.serialize(ctx);
139
- }
140
- toLogEntry(ctx) {
141
- return {
142
- ...super.toLogEntry(ctx),
143
- message: {
144
- "included node id": this.includedNodeId,
145
- step: (0, import_shared.getEnumMemberName)(import_Types.InclusionControllerStep, this.step)
146
- }
147
- };
65
+ var __runInitializers = function(thisArg, initializers, value) {
66
+ var useValue = arguments.length > 2;
67
+ for (var i = 0; i < initializers.length; i++) {
68
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
148
69
  }
70
+ return useValue ? value : void 0;
149
71
  };
150
- InclusionControllerCCInitiate = InclusionControllerCCInitiate_1 = __decorate([
151
- (0, import_CommandClassDecorators.CCCommand)(import_Types.InclusionControllerCommand.Initiate)
152
- ], InclusionControllerCCInitiate);
72
+ let InclusionControllerCC = (() => {
73
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Inclusion Controller"]), (0, import_CommandClassDecorators.implementedVersion)(1)];
74
+ let _classDescriptor;
75
+ let _classExtraInitializers = [];
76
+ let _classThis;
77
+ let _classSuper = import_CommandClass.CommandClass;
78
+ var InclusionControllerCC2 = class extends _classSuper {
79
+ static {
80
+ _classThis = this;
81
+ }
82
+ static {
83
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
84
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
85
+ InclusionControllerCC2 = _classThis = _classDescriptor.value;
86
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
87
+ __runInitializers(_classThis, _classExtraInitializers);
88
+ }
89
+ };
90
+ return InclusionControllerCC2 = _classThis;
91
+ })();
92
+ let InclusionControllerCCAPI = (() => {
93
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Inclusion Controller"])];
94
+ let _classDescriptor;
95
+ let _classExtraInitializers = [];
96
+ let _classThis;
97
+ let _classSuper = import_API.CCAPI;
98
+ var InclusionControllerCCAPI2 = class extends _classSuper {
99
+ static {
100
+ _classThis = this;
101
+ }
102
+ static {
103
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
104
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
105
+ InclusionControllerCCAPI2 = _classThis = _classDescriptor.value;
106
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
107
+ __runInitializers(_classThis, _classExtraInitializers);
108
+ }
109
+ supportsCommand(cmd) {
110
+ switch (cmd) {
111
+ case import_Types.InclusionControllerCommand.Initiate:
112
+ case import_Types.InclusionControllerCommand.Complete:
113
+ return true;
114
+ }
115
+ return super.supportsCommand(cmd);
116
+ }
117
+ /** Instruct the target to initiate the given inclusion step for the given node */
118
+ async initiateStep(nodeId, step) {
119
+ this.assertSupportsCommand(import_Types.InclusionControllerCommand, import_Types.InclusionControllerCommand.Initiate);
120
+ const cc = new InclusionControllerCCInitiate({
121
+ nodeId: this.endpoint.nodeId,
122
+ endpointIndex: this.endpoint.index,
123
+ includedNodeId: nodeId,
124
+ step
125
+ });
126
+ await this.host.sendCommand(cc, this.commandOptions);
127
+ }
128
+ /** Indicate to the other node that the given inclusion step has been completed */
129
+ async completeStep(step, status) {
130
+ this.assertSupportsCommand(import_Types.InclusionControllerCommand, import_Types.InclusionControllerCommand.Complete);
131
+ const cc = new InclusionControllerCCComplete({
132
+ nodeId: this.endpoint.nodeId,
133
+ endpointIndex: this.endpoint.index,
134
+ step,
135
+ status
136
+ });
137
+ await this.host.sendCommand(cc, this.commandOptions);
138
+ }
139
+ };
140
+ return InclusionControllerCCAPI2 = _classThis;
141
+ })();
142
+ let InclusionControllerCCComplete = (() => {
143
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.InclusionControllerCommand.Complete)];
144
+ let _classDescriptor;
145
+ let _classExtraInitializers = [];
146
+ let _classThis;
147
+ let _classSuper = InclusionControllerCC;
148
+ var InclusionControllerCCComplete2 = class extends _classSuper {
149
+ static {
150
+ _classThis = this;
151
+ }
152
+ static {
153
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
154
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
155
+ InclusionControllerCCComplete2 = _classThis = _classDescriptor.value;
156
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
157
+ __runInitializers(_classThis, _classExtraInitializers);
158
+ }
159
+ constructor(options) {
160
+ super(options);
161
+ this.step = options.step;
162
+ this.status = options.status;
163
+ }
164
+ static from(raw, ctx) {
165
+ (0, import_core.validatePayload)(raw.payload.length >= 2);
166
+ const step = raw.payload[0];
167
+ import_core.validatePayload.withReason("Invalid inclusion controller step")(step in import_Types.InclusionControllerStep);
168
+ const status = raw.payload[1];
169
+ return new this({
170
+ nodeId: ctx.sourceNodeId,
171
+ step,
172
+ status
173
+ });
174
+ }
175
+ step;
176
+ status;
177
+ serialize(ctx) {
178
+ this.payload = import_shared.Bytes.from([this.step, this.status]);
179
+ return super.serialize(ctx);
180
+ }
181
+ toLogEntry(ctx) {
182
+ return {
183
+ ...super.toLogEntry(ctx),
184
+ message: {
185
+ step: (0, import_shared.getEnumMemberName)(import_Types.InclusionControllerStep, this.step),
186
+ status: (0, import_shared.getEnumMemberName)(import_Types.InclusionControllerStatus, this.status)
187
+ }
188
+ };
189
+ }
190
+ };
191
+ return InclusionControllerCCComplete2 = _classThis;
192
+ })();
193
+ let InclusionControllerCCInitiate = (() => {
194
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.InclusionControllerCommand.Initiate)];
195
+ let _classDescriptor;
196
+ let _classExtraInitializers = [];
197
+ let _classThis;
198
+ let _classSuper = InclusionControllerCC;
199
+ var InclusionControllerCCInitiate2 = class extends _classSuper {
200
+ static {
201
+ _classThis = this;
202
+ }
203
+ static {
204
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
205
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
206
+ InclusionControllerCCInitiate2 = _classThis = _classDescriptor.value;
207
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
208
+ __runInitializers(_classThis, _classExtraInitializers);
209
+ }
210
+ constructor(options) {
211
+ super(options);
212
+ this.includedNodeId = options.includedNodeId;
213
+ this.step = options.step;
214
+ }
215
+ static from(raw, ctx) {
216
+ (0, import_core.validatePayload)(raw.payload.length >= 2);
217
+ const includedNodeId = raw.payload[0];
218
+ const step = raw.payload[1];
219
+ import_core.validatePayload.withReason("Invalid inclusion controller step")(step in import_Types.InclusionControllerStep);
220
+ return new this({
221
+ nodeId: ctx.sourceNodeId,
222
+ includedNodeId,
223
+ step
224
+ });
225
+ }
226
+ includedNodeId;
227
+ step;
228
+ serialize(ctx) {
229
+ this.payload = import_shared.Bytes.from([this.includedNodeId, this.step]);
230
+ return super.serialize(ctx);
231
+ }
232
+ toLogEntry(ctx) {
233
+ return {
234
+ ...super.toLogEntry(ctx),
235
+ message: {
236
+ "included node id": this.includedNodeId,
237
+ step: (0, import_shared.getEnumMemberName)(import_Types.InclusionControllerStep, this.step)
238
+ }
239
+ };
240
+ }
241
+ };
242
+ return InclusionControllerCCInitiate2 = _classThis;
243
+ })();
153
244
  // Annotate the CommonJS export names for ESM import in node:
154
245
  0 && (module.exports = {
155
246
  InclusionControllerCC,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/InclusionControllerCC.ts"],
4
- "sourcesContent": ["import {\n\tCommandClasses,\n\ttype MessageOrCCLogEntry,\n\ttype WithAddress,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { type MaybeNotKnown } from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tcommandClass,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport {\n\tInclusionControllerCommand,\n\tInclusionControllerStatus,\n\tInclusionControllerStep,\n} from \"../lib/_Types.js\";\n\n// This CC should not be used directly from user code\n/* eslint-disable @zwave-js/ccapi-validate-args */\n\n@commandClass(CommandClasses[\"Inclusion Controller\"])\n@implementedVersion(1)\nexport class InclusionControllerCC extends CommandClass {\n\tdeclare ccCommand: InclusionControllerCommand;\n}\n\n@API(CommandClasses[\"Inclusion Controller\"])\nexport class InclusionControllerCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: InclusionControllerCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase InclusionControllerCommand.Initiate:\n\t\t\tcase InclusionControllerCommand.Complete:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t/** Instruct the target to initiate the given inclusion step for the given node */\n\tpublic async initiateStep(\n\t\tnodeId: number,\n\t\tstep: InclusionControllerStep,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tInclusionControllerCommand,\n\t\t\tInclusionControllerCommand.Initiate,\n\t\t);\n\n\t\tconst cc = new InclusionControllerCCInitiate({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tincludedNodeId: nodeId,\n\t\t\tstep,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/** Indicate to the other node that the given inclusion step has been completed */\n\tpublic async completeStep(\n\t\tstep: InclusionControllerStep,\n\t\tstatus: InclusionControllerStatus,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tInclusionControllerCommand,\n\t\t\tInclusionControllerCommand.Complete,\n\t\t);\n\n\t\tconst cc = new InclusionControllerCCComplete({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tstep,\n\t\t\tstatus,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n// @publicAPI\nexport interface InclusionControllerCCCompleteOptions {\n\tstep: InclusionControllerStep;\n\tstatus: InclusionControllerStatus;\n}\n\n@CCCommand(InclusionControllerCommand.Complete)\nexport class InclusionControllerCCComplete extends InclusionControllerCC {\n\tpublic constructor(\n\t\toptions: WithAddress<InclusionControllerCCCompleteOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.step = options.step;\n\t\tthis.status = options.status;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): InclusionControllerCCComplete {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst step: InclusionControllerStep = raw.payload[0];\n\n\t\tvalidatePayload.withReason(\"Invalid inclusion controller step\")(\n\t\t\tstep in InclusionControllerStep,\n\t\t);\n\t\tconst status: InclusionControllerStatus = raw.payload[1];\n\n\t\treturn new InclusionControllerCCComplete({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstep,\n\t\t\tstatus,\n\t\t});\n\t}\n\n\tpublic step: InclusionControllerStep;\n\tpublic status: InclusionControllerStatus;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.step, this.status]);\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\tstep: getEnumMemberName(InclusionControllerStep, this.step),\n\t\t\t\tstatus: getEnumMemberName(\n\t\t\t\t\tInclusionControllerStatus,\n\t\t\t\t\tthis.status,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface InclusionControllerCCInitiateOptions {\n\tincludedNodeId: number;\n\tstep: InclusionControllerStep;\n}\n\n@CCCommand(InclusionControllerCommand.Initiate)\nexport class InclusionControllerCCInitiate extends InclusionControllerCC {\n\tpublic constructor(\n\t\toptions: WithAddress<InclusionControllerCCInitiateOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.includedNodeId = options.includedNodeId;\n\t\tthis.step = options.step;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): InclusionControllerCCInitiate {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst includedNodeId = raw.payload[0];\n\t\tconst step: InclusionControllerStep = raw.payload[1];\n\n\t\tvalidatePayload.withReason(\"Invalid inclusion controller step\")(\n\t\t\tstep in InclusionControllerStep,\n\t\t);\n\n\t\treturn new InclusionControllerCCInitiate({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tincludedNodeId,\n\t\t\tstep,\n\t\t});\n\t}\n\n\tpublic includedNodeId: number;\n\tpublic step: InclusionControllerStep;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.includedNodeId, this.step]);\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\"included node id\": this.includedNodeId,\n\t\t\t\tstep: getEnumMemberName(InclusionControllerStep, this.step),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAKO;AAOP,oBAAyC;AACzC,iBAAsB;AACtB,0BAAyC;AACzC,oCAKO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CAPI", "InclusionControllerCCComplete", "InclusionControllerCCInitiate"]
4
+ "sourcesContent": ["import {\n\tCommandClasses,\n\ttype MessageOrCCLogEntry,\n\ttype WithAddress,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { type MaybeNotKnown } from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tcommandClass,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport {\n\tInclusionControllerCommand,\n\tInclusionControllerStatus,\n\tInclusionControllerStep,\n} from \"../lib/_Types.js\";\n\n// This CC should not be used directly from user code\n/* eslint-disable @zwave-js/ccapi-validate-args */\n\n@commandClass(CommandClasses[\"Inclusion Controller\"])\n@implementedVersion(1)\nexport class InclusionControllerCC extends CommandClass {\n\tdeclare ccCommand: InclusionControllerCommand;\n}\n\n@API(CommandClasses[\"Inclusion Controller\"])\nexport class InclusionControllerCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: InclusionControllerCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase InclusionControllerCommand.Initiate:\n\t\t\tcase InclusionControllerCommand.Complete:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t/** Instruct the target to initiate the given inclusion step for the given node */\n\tpublic async initiateStep(\n\t\tnodeId: number,\n\t\tstep: InclusionControllerStep,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tInclusionControllerCommand,\n\t\t\tInclusionControllerCommand.Initiate,\n\t\t);\n\n\t\tconst cc = new InclusionControllerCCInitiate({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tincludedNodeId: nodeId,\n\t\t\tstep,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t/** Indicate to the other node that the given inclusion step has been completed */\n\tpublic async completeStep(\n\t\tstep: InclusionControllerStep,\n\t\tstatus: InclusionControllerStatus,\n\t): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tInclusionControllerCommand,\n\t\t\tInclusionControllerCommand.Complete,\n\t\t);\n\n\t\tconst cc = new InclusionControllerCCComplete({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tstep,\n\t\t\tstatus,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n// @publicAPI\nexport interface InclusionControllerCCCompleteOptions {\n\tstep: InclusionControllerStep;\n\tstatus: InclusionControllerStatus;\n}\n\n@CCCommand(InclusionControllerCommand.Complete)\nexport class InclusionControllerCCComplete extends InclusionControllerCC {\n\tpublic constructor(\n\t\toptions: WithAddress<InclusionControllerCCCompleteOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.step = options.step;\n\t\tthis.status = options.status;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): InclusionControllerCCComplete {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst step: InclusionControllerStep = raw.payload[0];\n\n\t\tvalidatePayload.withReason(\"Invalid inclusion controller step\")(\n\t\t\tstep in InclusionControllerStep,\n\t\t);\n\t\tconst status: InclusionControllerStatus = raw.payload[1];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstep,\n\t\t\tstatus,\n\t\t});\n\t}\n\n\tpublic step: InclusionControllerStep;\n\tpublic status: InclusionControllerStatus;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.step, this.status]);\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\tstep: getEnumMemberName(InclusionControllerStep, this.step),\n\t\t\t\tstatus: getEnumMemberName(\n\t\t\t\t\tInclusionControllerStatus,\n\t\t\t\t\tthis.status,\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface InclusionControllerCCInitiateOptions {\n\tincludedNodeId: number;\n\tstep: InclusionControllerStep;\n}\n\n@CCCommand(InclusionControllerCommand.Initiate)\nexport class InclusionControllerCCInitiate extends InclusionControllerCC {\n\tpublic constructor(\n\t\toptions: WithAddress<InclusionControllerCCInitiateOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.includedNodeId = options.includedNodeId;\n\t\tthis.step = options.step;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): InclusionControllerCCInitiate {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst includedNodeId = raw.payload[0];\n\t\tconst step: InclusionControllerStep = raw.payload[1];\n\n\t\tvalidatePayload.withReason(\"Invalid inclusion controller step\")(\n\t\t\tstep in InclusionControllerStep,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tincludedNodeId,\n\t\t\tstep,\n\t\t});\n\t}\n\n\tpublic includedNodeId: number;\n\tpublic step: InclusionControllerStep;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.includedNodeId, this.step]);\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\"included node id\": this.includedNodeId,\n\t\t\t\tstep: getEnumMemberName(InclusionControllerStep, this.step),\n\t\t\t},\n\t\t};\n\t}\n}\n"],
5
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