@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
@@ -40,13 +40,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
40
40
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
41
41
  var import_Values = require("../lib/Values.js");
42
42
  var import_Types = require("../lib/_Types.js");
43
- var __decorate = function(decorators, target, key, desc) {
44
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
46
- 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;
47
- return c > 3 && r && Object.defineProperty(target, key, r), r;
43
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
44
+ function accept(f) {
45
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
46
+ return f;
47
+ }
48
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
49
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
50
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
51
+ var _, done = false;
52
+ for (var i = decorators.length - 1; i >= 0; i--) {
53
+ var context = {};
54
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
55
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
56
+ context.addInitializer = function(f) {
57
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
58
+ extraInitializers.push(accept(f || null));
59
+ };
60
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
61
+ if (kind === "accessor") {
62
+ if (result === void 0) continue;
63
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
64
+ if (_ = accept(result.get)) descriptor.get = _;
65
+ if (_ = accept(result.set)) descriptor.set = _;
66
+ if (_ = accept(result.init)) initializers.unshift(_);
67
+ } else if (_ = accept(result)) {
68
+ if (kind === "field") initializers.unshift(_);
69
+ else descriptor[key] = _;
70
+ }
71
+ }
72
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
73
+ done = true;
74
+ };
75
+ var __runInitializers = function(thisArg, initializers, value) {
76
+ var useValue = arguments.length > 2;
77
+ for (var i = 0; i < initializers.length; i++) {
78
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
79
+ }
80
+ return useValue ? value : void 0;
48
81
  };
49
- var HumidityControlSetpointCCReport_1, HumidityControlSetpointCCSupportedReport_1, HumidityControlSetpointCCScaleSupportedReport_1, HumidityControlSetpointCCCapabilitiesReport_1;
50
82
  function __assertType(argName, typeName, boundHasError) {
51
83
  const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
52
84
  if (boundHasError()) {
@@ -84,538 +116,693 @@ function getScale(scale) {
84
116
  function getSetpointUnit(scale) {
85
117
  return getScale(scale).unit ?? "";
86
118
  }
87
- let HumidityControlSetpointCCAPI = class HumidityControlSetpointCCAPI2 extends import_API.CCAPI {
88
- supportsCommand(cmd) {
89
- switch (cmd) {
90
- case import_Types.HumidityControlSetpointCommand.Get:
91
- case import_Types.HumidityControlSetpointCommand.SupportedGet:
92
- case import_Types.HumidityControlSetpointCommand.CapabilitiesGet:
93
- return this.isSinglecast();
94
- case import_Types.HumidityControlSetpointCommand.Set:
95
- return true;
96
- }
97
- return super.supportsCommand(cmd);
98
- }
99
- get [import_API.SET_VALUE]() {
100
- return async function({ property, propertyKey }, value) {
101
- if (property !== "setpoint") {
102
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
103
- }
104
- if (typeof propertyKey !== "number") {
105
- throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
106
- }
107
- if (typeof value !== "number") {
108
- (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
109
- }
110
- const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);
111
- const preferredScale = this.tryGetValueDB()?.getValue(scaleValueId);
112
- const result = await this.set(propertyKey, value, preferredScale ?? 0);
113
- if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
114
- this.schedulePoll({ property, propertyKey }, value);
119
+ let HumidityControlSetpointCCAPI = (() => {
120
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Humidity Control Setpoint"])];
121
+ let _classDescriptor;
122
+ let _classExtraInitializers = [];
123
+ let _classThis;
124
+ let _classSuper = import_API.CCAPI;
125
+ var HumidityControlSetpointCCAPI2 = class extends _classSuper {
126
+ static {
127
+ _classThis = this;
128
+ }
129
+ static {
130
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
131
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
132
+ HumidityControlSetpointCCAPI2 = _classThis = _classDescriptor.value;
133
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
134
+ __runInitializers(_classThis, _classExtraInitializers);
135
+ }
136
+ supportsCommand(cmd) {
137
+ switch (cmd) {
138
+ case import_Types.HumidityControlSetpointCommand.Get:
139
+ case import_Types.HumidityControlSetpointCommand.SupportedGet:
140
+ case import_Types.HumidityControlSetpointCommand.CapabilitiesGet:
141
+ return this.isSinglecast();
142
+ case import_Types.HumidityControlSetpointCommand.Set:
143
+ return true;
115
144
  }
116
- return result;
117
- };
118
- }
119
- get [import_API.POLL_VALUE]() {
120
- return async function({ property, propertyKey }) {
121
- switch (property) {
122
- case "setpoint":
123
- if (typeof propertyKey !== "number") {
124
- throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
125
- }
126
- return (await this.get(propertyKey))?.value;
127
- default:
145
+ return super.supportsCommand(cmd);
146
+ }
147
+ get [import_API.SET_VALUE]() {
148
+ return async function({ property, propertyKey }, value) {
149
+ if (property !== "setpoint") {
128
150
  (0, import_API.throwUnsupportedProperty)(this.ccId, property);
151
+ }
152
+ if (typeof propertyKey !== "number") {
153
+ throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
154
+ }
155
+ if (typeof value !== "number") {
156
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
157
+ }
158
+ const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);
159
+ const preferredScale = this.tryGetValueDB()?.getValue(scaleValueId);
160
+ const result = await this.set(propertyKey, value, preferredScale ?? 0);
161
+ if (this.isSinglecast() && !(0, import_safe.supervisedCommandSucceeded)(result)) {
162
+ this.schedulePoll({ property, propertyKey }, value);
163
+ }
164
+ return result;
165
+ };
166
+ }
167
+ get [import_API.POLL_VALUE]() {
168
+ return async function({ property, propertyKey }) {
169
+ switch (property) {
170
+ case "setpoint":
171
+ if (typeof propertyKey !== "number") {
172
+ throw new import_safe.ZWaveError(`${import_safe.CommandClasses[this.ccId]}: "${property}" must be further specified by a numeric property key`, import_safe.ZWaveErrorCodes.Argument_Invalid);
173
+ }
174
+ return (await this.get(propertyKey))?.value;
175
+ default:
176
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
177
+ }
178
+ };
179
+ }
180
+ async get(setpointType) {
181
+ __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
182
+ this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Get);
183
+ const cc = new HumidityControlSetpointCCGet({
184
+ nodeId: this.endpoint.nodeId,
185
+ endpointIndex: this.endpoint.index,
186
+ setpointType
187
+ });
188
+ const response = await this.host.sendCommand(cc, this.commandOptions);
189
+ if (!response)
190
+ return;
191
+ return response.type === import_Types.HumidityControlSetpointType["N/A"] ? void 0 : {
192
+ value: response.value,
193
+ scale: response.scale
194
+ };
195
+ }
196
+ async set(setpointType, value, scale) {
197
+ __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
198
+ __assertType("value", "number", __assertType__number.bind(void 0, value));
199
+ __assertType("scale", "number", __assertType__number.bind(void 0, scale));
200
+ this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Set);
201
+ const cc = new HumidityControlSetpointCCSet({
202
+ nodeId: this.endpoint.nodeId,
203
+ endpointIndex: this.endpoint.index,
204
+ setpointType,
205
+ value,
206
+ scale
207
+ });
208
+ return this.host.sendCommand(cc, this.commandOptions);
209
+ }
210
+ async getCapabilities(setpointType) {
211
+ __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
212
+ this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.CapabilitiesGet);
213
+ const cc = new HumidityControlSetpointCCCapabilitiesGet({
214
+ nodeId: this.endpoint.nodeId,
215
+ endpointIndex: this.endpoint.index,
216
+ setpointType
217
+ });
218
+ const response = await this.host.sendCommand(cc, this.commandOptions);
219
+ if (response) {
220
+ return (0, import_safe3.pick)(response, [
221
+ "minValue",
222
+ "maxValue",
223
+ "minValueScale",
224
+ "maxValueScale"
225
+ ]);
129
226
  }
130
- };
131
- }
132
- async get(setpointType) {
133
- __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
134
- this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Get);
135
- const cc = new HumidityControlSetpointCCGet({
136
- nodeId: this.endpoint.nodeId,
137
- endpointIndex: this.endpoint.index,
138
- setpointType
139
- });
140
- const response = await this.host.sendCommand(cc, this.commandOptions);
141
- if (!response)
142
- return;
143
- return response.type === import_Types.HumidityControlSetpointType["N/A"] ? void 0 : {
144
- value: response.value,
145
- scale: response.scale
146
- };
147
- }
148
- async set(setpointType, value, scale) {
149
- __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
150
- __assertType("value", "number", __assertType__number.bind(void 0, value));
151
- __assertType("scale", "number", __assertType__number.bind(void 0, scale));
152
- this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.Set);
153
- const cc = new HumidityControlSetpointCCSet({
154
- nodeId: this.endpoint.nodeId,
155
- endpointIndex: this.endpoint.index,
156
- setpointType,
157
- value,
158
- scale
159
- });
160
- return this.host.sendCommand(cc, this.commandOptions);
161
- }
162
- async getCapabilities(setpointType) {
163
- __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
164
- this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.CapabilitiesGet);
165
- const cc = new HumidityControlSetpointCCCapabilitiesGet({
166
- nodeId: this.endpoint.nodeId,
167
- endpointIndex: this.endpoint.index,
168
- setpointType
169
- });
170
- const response = await this.host.sendCommand(cc, this.commandOptions);
171
- if (response) {
172
- return (0, import_safe3.pick)(response, [
173
- "minValue",
174
- "maxValue",
175
- "minValueScale",
176
- "maxValueScale"
177
- ]);
178
227
  }
179
- }
180
- async getSupportedSetpointTypes() {
181
- this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
182
- const cc = new HumidityControlSetpointCCSupportedGet({
183
- nodeId: this.endpoint.nodeId,
184
- endpointIndex: this.endpoint.index
185
- });
186
- const response = await this.host.sendCommand(cc, this.commandOptions);
187
- return response?.supportedSetpointTypes;
188
- }
189
- async getSupportedScales(setpointType) {
190
- __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
191
- this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
192
- const cc = new HumidityControlSetpointCCScaleSupportedGet({
193
- nodeId: this.endpoint.nodeId,
194
- endpointIndex: this.endpoint.index,
195
- setpointType
196
- });
197
- const response = await this.host.sendCommand(cc, this.commandOptions);
198
- if (response) {
199
- return response.supportedScales.map((scale) => getScale(scale));
228
+ async getSupportedSetpointTypes() {
229
+ this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
230
+ const cc = new HumidityControlSetpointCCSupportedGet({
231
+ nodeId: this.endpoint.nodeId,
232
+ endpointIndex: this.endpoint.index
233
+ });
234
+ const response = await this.host.sendCommand(cc, this.commandOptions);
235
+ return response?.supportedSetpointTypes;
200
236
  }
201
- }
202
- };
203
- HumidityControlSetpointCCAPI = __decorate([
204
- (0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Humidity Control Setpoint"])
205
- ], HumidityControlSetpointCCAPI);
206
- let HumidityControlSetpointCC = class HumidityControlSetpointCC2 extends import_CommandClass.CommandClass {
207
- translatePropertyKey(ctx, property, propertyKey) {
208
- if (property === "setpoint") {
209
- return (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, propertyKey);
210
- } else {
211
- return super.translatePropertyKey(ctx, property, propertyKey);
237
+ async getSupportedScales(setpointType) {
238
+ __assertType("setpointType", "HumidityControlSetpointType", __assertType__number.bind(void 0, setpointType));
239
+ this.assertSupportsCommand(import_Types.HumidityControlSetpointCommand, import_Types.HumidityControlSetpointCommand.SupportedGet);
240
+ const cc = new HumidityControlSetpointCCScaleSupportedGet({
241
+ nodeId: this.endpoint.nodeId,
242
+ endpointIndex: this.endpoint.index,
243
+ setpointType
244
+ });
245
+ const response = await this.host.sendCommand(cc, this.commandOptions);
246
+ if (response) {
247
+ return response.supportedScales.map((scale) => getScale(scale));
248
+ }
212
249
  }
213
- }
214
- async interview(ctx) {
215
- const node = this.getNode(ctx);
216
- const endpoint = this.getEndpoint(ctx);
217
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
218
- priority: import_safe.MessagePriority.NodeQuery
219
- });
220
- ctx.logNode(node.id, {
221
- endpoint: this.endpointIndex,
222
- message: `Interviewing ${this.ccName}...`,
223
- direction: "none"
224
- });
225
- let setpointTypes = [];
226
- ctx.logNode(node.id, {
227
- endpoint: this.endpointIndex,
228
- message: "retrieving supported setpoint types...",
229
- direction: "outbound"
230
- });
231
- const resp = await api.getSupportedSetpointTypes();
232
- if (resp) {
233
- setpointTypes = [...resp];
234
- const logMessage = "received supported setpoint types:\n" + setpointTypes.map((type) => (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type)).map((name) => `\xB7 ${name}`).join("\n");
235
- ctx.logNode(node.id, {
236
- endpoint: this.endpointIndex,
237
- message: logMessage,
238
- direction: "inbound"
250
+ };
251
+ return HumidityControlSetpointCCAPI2 = _classThis;
252
+ })();
253
+ let HumidityControlSetpointCC = (() => {
254
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Humidity Control Setpoint"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(HumidityControlSetpointCCValues)];
255
+ let _classDescriptor;
256
+ let _classExtraInitializers = [];
257
+ let _classThis;
258
+ let _classSuper = import_CommandClass.CommandClass;
259
+ var HumidityControlSetpointCC2 = class extends _classSuper {
260
+ static {
261
+ _classThis = this;
262
+ }
263
+ static {
264
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
265
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
266
+ HumidityControlSetpointCC2 = _classThis = _classDescriptor.value;
267
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
268
+ __runInitializers(_classThis, _classExtraInitializers);
269
+ }
270
+ translatePropertyKey(ctx, property, propertyKey) {
271
+ if (property === "setpoint") {
272
+ return (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, propertyKey);
273
+ } else {
274
+ return super.translatePropertyKey(ctx, property, propertyKey);
275
+ }
276
+ }
277
+ async interview(ctx) {
278
+ const node = this.getNode(ctx);
279
+ const endpoint = this.getEndpoint(ctx);
280
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
281
+ priority: import_safe.MessagePriority.NodeQuery
239
282
  });
240
- } else {
241
283
  ctx.logNode(node.id, {
242
284
  endpoint: this.endpointIndex,
243
- message: "Querying supported setpoint types timed out, skipping interview...",
244
- level: "warn"
285
+ message: `Interviewing ${this.ccName}...`,
286
+ direction: "none"
245
287
  });
246
- return;
247
- }
248
- for (const type of setpointTypes) {
249
- const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
288
+ let setpointTypes = [];
250
289
  ctx.logNode(node.id, {
251
290
  endpoint: this.endpointIndex,
252
- message: `retrieving capabilities for setpoint ${setpointName}...`,
291
+ message: "retrieving supported setpoint types...",
253
292
  direction: "outbound"
254
293
  });
255
- const setpointScaleSupported = await api.getSupportedScales(type);
256
- if (setpointScaleSupported) {
257
- const logMessage = `received supported scales for setpoint ${setpointName}:
258
- ${setpointScaleSupported.map((t) => `
259
- \xB7 ${t.key} ${t.unit} - ${t.label}`).join("")}`;
294
+ const resp = await api.getSupportedSetpointTypes();
295
+ if (resp) {
296
+ setpointTypes = [...resp];
297
+ const logMessage = "received supported setpoint types:\n" + setpointTypes.map((type) => (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type)).map((name) => `\xB7 ${name}`).join("\n");
260
298
  ctx.logNode(node.id, {
261
299
  endpoint: this.endpointIndex,
262
300
  message: logMessage,
263
301
  direction: "inbound"
264
302
  });
265
- const scaleValue = HumidityControlSetpointCCValues.setpointScale(type);
266
- const states = {};
267
- for (const scale of setpointScaleSupported) {
268
- if (scale.unit)
269
- states[scale.key] = scale.unit;
270
- }
271
- this.setMetadata(ctx, scaleValue, {
272
- ...scaleValue.meta,
273
- states
303
+ } else {
304
+ ctx.logNode(node.id, {
305
+ endpoint: this.endpointIndex,
306
+ message: "Querying supported setpoint types timed out, skipping interview...",
307
+ level: "warn"
274
308
  });
309
+ return;
275
310
  }
276
- const setpointCaps = await api.getCapabilities(type);
277
- if (setpointCaps) {
278
- const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);
279
- const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
280
- const logMessage = `received capabilities for setpoint ${setpointName}:
281
- minimum value: ${setpointCaps.minValue} ${minValueUnit}
282
- maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
311
+ for (const type of setpointTypes) {
312
+ const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
283
313
  ctx.logNode(node.id, {
284
314
  endpoint: this.endpointIndex,
285
- message: logMessage,
286
- direction: "inbound"
315
+ message: `retrieving capabilities for setpoint ${setpointName}...`,
316
+ direction: "outbound"
287
317
  });
318
+ const setpointScaleSupported = await api.getSupportedScales(type);
319
+ if (setpointScaleSupported) {
320
+ const logMessage = `received supported scales for setpoint ${setpointName}:
321
+ ${setpointScaleSupported.map((t) => `
322
+ \xB7 ${t.key} ${t.unit} - ${t.label}`).join("")}`;
323
+ ctx.logNode(node.id, {
324
+ endpoint: this.endpointIndex,
325
+ message: logMessage,
326
+ direction: "inbound"
327
+ });
328
+ const scaleValue = HumidityControlSetpointCCValues.setpointScale(type);
329
+ const states = {};
330
+ for (const scale of setpointScaleSupported) {
331
+ if (scale.unit)
332
+ states[scale.key] = scale.unit;
333
+ }
334
+ this.setMetadata(ctx, scaleValue, {
335
+ ...scaleValue.meta,
336
+ states
337
+ });
338
+ }
339
+ const setpointCaps = await api.getCapabilities(type);
340
+ if (setpointCaps) {
341
+ const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);
342
+ const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
343
+ const logMessage = `received capabilities for setpoint ${setpointName}:
344
+ minimum value: ${setpointCaps.minValue} ${minValueUnit}
345
+ maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
346
+ ctx.logNode(node.id, {
347
+ endpoint: this.endpointIndex,
348
+ message: logMessage,
349
+ direction: "inbound"
350
+ });
351
+ }
288
352
  }
353
+ await this.refreshValues(ctx);
354
+ this.setInterviewComplete(ctx, true);
289
355
  }
290
- await this.refreshValues(ctx);
291
- this.setInterviewComplete(ctx, true);
292
- }
293
- async refreshValues(ctx) {
294
- const node = this.getNode(ctx);
295
- const endpoint = this.getEndpoint(ctx);
296
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
297
- priority: import_safe.MessagePriority.NodeQuery
298
- });
299
- const setpointTypes = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];
300
- for (const type of setpointTypes) {
301
- const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
302
- ctx.logNode(node.id, {
303
- endpoint: this.endpointIndex,
304
- message: `querying current value of setpoint ${setpointName}...`,
305
- direction: "outbound"
356
+ async refreshValues(ctx) {
357
+ const node = this.getNode(ctx);
358
+ const endpoint = this.getEndpoint(ctx);
359
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Humidity Control Setpoint"], ctx, endpoint).withOptions({
360
+ priority: import_safe.MessagePriority.NodeQuery
306
361
  });
307
- const setpoint = await api.get(type);
308
- if (setpoint) {
309
- const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? ""}`;
362
+ const setpointTypes = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];
363
+ for (const type of setpointTypes) {
364
+ const setpointName = (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, type);
310
365
  ctx.logNode(node.id, {
311
366
  endpoint: this.endpointIndex,
312
- message: logMessage,
313
- direction: "inbound"
367
+ message: `querying current value of setpoint ${setpointName}...`,
368
+ direction: "outbound"
314
369
  });
370
+ const setpoint = await api.get(type);
371
+ if (setpoint) {
372
+ const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? ""}`;
373
+ ctx.logNode(node.id, {
374
+ endpoint: this.endpointIndex,
375
+ message: logMessage,
376
+ direction: "inbound"
377
+ });
378
+ }
315
379
  }
316
380
  }
317
- }
318
- };
319
- HumidityControlSetpointCC = __decorate([
320
- (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Humidity Control Setpoint"]),
321
- (0, import_CommandClassDecorators.implementedVersion)(2),
322
- (0, import_CommandClassDecorators.ccValues)(HumidityControlSetpointCCValues)
323
- ], HumidityControlSetpointCC);
324
- let HumidityControlSetpointCCSet = class HumidityControlSetpointCCSet2 extends HumidityControlSetpointCC {
325
- constructor(options) {
326
- super(options);
327
- this.setpointType = options.setpointType;
328
- this.value = options.value;
329
- this.scale = options.scale;
330
- }
331
- static from(_raw, _ctx) {
332
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
333
- }
334
- setpointType;
335
- value;
336
- scale;
337
- serialize(ctx) {
338
- this.payload = import_safe2.Bytes.concat([
339
- import_safe2.Bytes.from([this.setpointType & 15]),
340
- (0, import_safe.encodeFloatWithScale)(this.value, this.scale)
341
- ]);
342
- return super.serialize(ctx);
343
- }
344
- toLogEntry(ctx) {
345
- const scale = getScale(this.scale);
346
- return {
347
- ...super.toLogEntry(ctx),
348
- message: {
349
- "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType),
350
- value: `${this.value} ${scale.unit}`
381
+ };
382
+ return HumidityControlSetpointCC2 = _classThis;
383
+ })();
384
+ let HumidityControlSetpointCCSet = (() => {
385
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
386
+ let _classDescriptor;
387
+ let _classExtraInitializers = [];
388
+ let _classThis;
389
+ let _classSuper = HumidityControlSetpointCC;
390
+ var HumidityControlSetpointCCSet2 = class extends _classSuper {
391
+ static {
392
+ _classThis = this;
393
+ }
394
+ static {
395
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
396
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
397
+ HumidityControlSetpointCCSet2 = _classThis = _classDescriptor.value;
398
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
399
+ __runInitializers(_classThis, _classExtraInitializers);
400
+ }
401
+ constructor(options) {
402
+ super(options);
403
+ this.setpointType = options.setpointType;
404
+ this.value = options.value;
405
+ this.scale = options.scale;
406
+ }
407
+ static from(_raw, _ctx) {
408
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
409
+ }
410
+ setpointType;
411
+ value;
412
+ scale;
413
+ serialize(ctx) {
414
+ this.payload = import_safe2.Bytes.concat([
415
+ import_safe2.Bytes.from([this.setpointType & 15]),
416
+ (0, import_safe.encodeFloatWithScale)(this.value, this.scale)
417
+ ]);
418
+ return super.serialize(ctx);
419
+ }
420
+ toLogEntry(ctx) {
421
+ const scale = getScale(this.scale);
422
+ return {
423
+ ...super.toLogEntry(ctx),
424
+ message: {
425
+ "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType),
426
+ value: `${this.value} ${scale.unit}`
427
+ }
428
+ };
429
+ }
430
+ };
431
+ return HumidityControlSetpointCCSet2 = _classThis;
432
+ })();
433
+ let HumidityControlSetpointCCReport = (() => {
434
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Report)];
435
+ let _classDescriptor;
436
+ let _classExtraInitializers = [];
437
+ let _classThis;
438
+ let _classSuper = HumidityControlSetpointCC;
439
+ var HumidityControlSetpointCCReport2 = class extends _classSuper {
440
+ static {
441
+ _classThis = this;
442
+ }
443
+ static {
444
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
445
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
446
+ HumidityControlSetpointCCReport2 = _classThis = _classDescriptor.value;
447
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
448
+ __runInitializers(_classThis, _classExtraInitializers);
449
+ }
450
+ constructor(options) {
451
+ super(options);
452
+ this.type = options.type;
453
+ this.value = options.value;
454
+ this.scale = options.scale;
455
+ }
456
+ static from(raw, ctx) {
457
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
458
+ const type = raw.payload[0] & 15;
459
+ if (type === 0) {
460
+ return new this({
461
+ nodeId: ctx.sourceNodeId,
462
+ type,
463
+ value: 0,
464
+ scale: 0
465
+ });
351
466
  }
352
- };
353
- }
354
- };
355
- HumidityControlSetpointCCSet = __decorate([
356
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Set),
357
- (0, import_CommandClassDecorators.useSupervision)()
358
- ], HumidityControlSetpointCCSet);
359
- let HumidityControlSetpointCCReport = HumidityControlSetpointCCReport_1 = class HumidityControlSetpointCCReport2 extends HumidityControlSetpointCC {
360
- constructor(options) {
361
- super(options);
362
- this.type = options.type;
363
- this.value = options.value;
364
- this.scale = options.scale;
365
- }
366
- static from(raw, ctx) {
367
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
368
- const type = raw.payload[0] & 15;
369
- if (type === 0) {
370
- return new HumidityControlSetpointCCReport_1({
467
+ const { value, scale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
468
+ return new this({
371
469
  nodeId: ctx.sourceNodeId,
372
470
  type,
373
- value: 0,
374
- scale: 0
471
+ value,
472
+ scale
375
473
  });
376
474
  }
377
- const { value, scale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
378
- return new HumidityControlSetpointCCReport_1({
379
- nodeId: ctx.sourceNodeId,
380
- type,
381
- value,
382
- scale
383
- });
384
- }
385
- persistValues(ctx) {
386
- if (!super.persistValues(ctx))
387
- return false;
388
- const scale = getScale(this.scale);
389
- const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
390
- const existingMetadata = this.getMetadata(ctx, setpointValue);
391
- if (existingMetadata?.unit !== scale.unit) {
392
- this.setMetadata(ctx, setpointValue, {
393
- ...existingMetadata ?? setpointValue.meta,
394
- unit: scale.unit
395
- });
396
- }
397
- this.setValue(ctx, setpointValue, this.value);
398
- this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);
399
- return true;
400
- }
401
- type;
402
- scale;
403
- value;
404
- toLogEntry(ctx) {
405
- const scale = getScale(this.scale);
406
- return {
407
- ...super.toLogEntry(ctx),
408
- message: {
409
- "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
410
- value: `${this.value} ${scale.unit}`
475
+ persistValues(ctx) {
476
+ if (!super.persistValues(ctx))
477
+ return false;
478
+ const scale = getScale(this.scale);
479
+ const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
480
+ const existingMetadata = this.getMetadata(ctx, setpointValue);
481
+ if (existingMetadata?.unit !== scale.unit) {
482
+ this.setMetadata(ctx, setpointValue, {
483
+ ...existingMetadata ?? setpointValue.meta,
484
+ unit: scale.unit
485
+ });
411
486
  }
412
- };
413
- }
414
- };
415
- HumidityControlSetpointCCReport = HumidityControlSetpointCCReport_1 = __decorate([
416
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Report)
417
- ], HumidityControlSetpointCCReport);
487
+ this.setValue(ctx, setpointValue, this.value);
488
+ this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);
489
+ return true;
490
+ }
491
+ type;
492
+ scale;
493
+ value;
494
+ toLogEntry(ctx) {
495
+ const scale = getScale(this.scale);
496
+ return {
497
+ ...super.toLogEntry(ctx),
498
+ message: {
499
+ "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
500
+ value: `${this.value} ${scale.unit}`
501
+ }
502
+ };
503
+ }
504
+ };
505
+ return HumidityControlSetpointCCReport2 = _classThis;
506
+ })();
418
507
  function testResponseForHumidityControlSetpointGet(sent, received) {
419
508
  return received.type === sent.setpointType;
420
509
  }
421
- let HumidityControlSetpointCCGet = class HumidityControlSetpointCCGet2 extends HumidityControlSetpointCC {
422
- constructor(options) {
423
- super(options);
424
- this.setpointType = options.setpointType;
425
- }
426
- static from(_raw, _ctx) {
427
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
428
- }
429
- setpointType;
430
- serialize(ctx) {
431
- this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
432
- return super.serialize(ctx);
433
- }
434
- toLogEntry(ctx) {
435
- return {
436
- ...super.toLogEntry(ctx),
437
- message: {
438
- "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
439
- }
440
- };
441
- }
442
- };
443
- HumidityControlSetpointCCGet = __decorate([
444
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Get),
445
- (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)
446
- ], HumidityControlSetpointCCGet);
447
- let HumidityControlSetpointCCSupportedReport = HumidityControlSetpointCCSupportedReport_1 = class HumidityControlSetpointCCSupportedReport2 extends HumidityControlSetpointCC {
448
- constructor(options) {
449
- super(options);
450
- this.supportedSetpointTypes = options.supportedSetpointTypes;
451
- }
452
- static from(raw, ctx) {
453
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
454
- const supportedSetpointTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.HumidityControlSetpointType["N/A"]);
455
- return new HumidityControlSetpointCCSupportedReport_1({
456
- nodeId: ctx.sourceNodeId,
457
- supportedSetpointTypes
458
- });
459
- }
460
- supportedSetpointTypes;
461
- toLogEntry(ctx) {
462
- return {
463
- ...super.toLogEntry(ctx),
464
- message: {
465
- "supported setpoint types": this.supportedSetpointTypes.map((t) => `
510
+ let HumidityControlSetpointCCGet = (() => {
511
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)];
512
+ let _classDescriptor;
513
+ let _classExtraInitializers = [];
514
+ let _classThis;
515
+ let _classSuper = HumidityControlSetpointCC;
516
+ var HumidityControlSetpointCCGet2 = class extends _classSuper {
517
+ static {
518
+ _classThis = this;
519
+ }
520
+ static {
521
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
522
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
523
+ HumidityControlSetpointCCGet2 = _classThis = _classDescriptor.value;
524
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
525
+ __runInitializers(_classThis, _classExtraInitializers);
526
+ }
527
+ constructor(options) {
528
+ super(options);
529
+ this.setpointType = options.setpointType;
530
+ }
531
+ static from(_raw, _ctx) {
532
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
533
+ }
534
+ setpointType;
535
+ serialize(ctx) {
536
+ this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
537
+ return super.serialize(ctx);
538
+ }
539
+ toLogEntry(ctx) {
540
+ return {
541
+ ...super.toLogEntry(ctx),
542
+ message: {
543
+ "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
544
+ }
545
+ };
546
+ }
547
+ };
548
+ return HumidityControlSetpointCCGet2 = _classThis;
549
+ })();
550
+ let HumidityControlSetpointCCSupportedReport = (() => {
551
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedSetpointTypes", HumidityControlSetpointCCValues.supportedSetpointTypes)];
552
+ let _classDescriptor;
553
+ let _classExtraInitializers = [];
554
+ let _classThis;
555
+ let _classSuper = HumidityControlSetpointCC;
556
+ var HumidityControlSetpointCCSupportedReport2 = class extends _classSuper {
557
+ static {
558
+ _classThis = this;
559
+ }
560
+ static {
561
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
562
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
563
+ HumidityControlSetpointCCSupportedReport2 = _classThis = _classDescriptor.value;
564
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
565
+ __runInitializers(_classThis, _classExtraInitializers);
566
+ }
567
+ constructor(options) {
568
+ super(options);
569
+ this.supportedSetpointTypes = options.supportedSetpointTypes;
570
+ }
571
+ static from(raw, ctx) {
572
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
573
+ const supportedSetpointTypes = (0, import_safe.parseBitMask)(raw.payload, import_Types.HumidityControlSetpointType["N/A"]);
574
+ return new this({
575
+ nodeId: ctx.sourceNodeId,
576
+ supportedSetpointTypes
577
+ });
578
+ }
579
+ supportedSetpointTypes;
580
+ toLogEntry(ctx) {
581
+ return {
582
+ ...super.toLogEntry(ctx),
583
+ message: {
584
+ "supported setpoint types": this.supportedSetpointTypes.map((t) => `
466
585
  \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, t)}`).join("")
467
- }
468
- };
469
- }
470
- };
471
- __decorate([
472
- (0, import_CommandClassDecorators.ccValue)(HumidityControlSetpointCCValues.supportedSetpointTypes)
473
- ], HumidityControlSetpointCCSupportedReport.prototype, "supportedSetpointTypes", void 0);
474
- HumidityControlSetpointCCSupportedReport = HumidityControlSetpointCCSupportedReport_1 = __decorate([
475
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.SupportedReport)
476
- ], HumidityControlSetpointCCSupportedReport);
477
- let HumidityControlSetpointCCSupportedGet = class HumidityControlSetpointCCSupportedGet2 extends HumidityControlSetpointCC {
478
- };
479
- HumidityControlSetpointCCSupportedGet = __decorate([
480
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.SupportedGet),
481
- (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCSupportedReport)
482
- ], HumidityControlSetpointCCSupportedGet);
483
- let HumidityControlSetpointCCScaleSupportedReport = HumidityControlSetpointCCScaleSupportedReport_1 = class HumidityControlSetpointCCScaleSupportedReport2 extends HumidityControlSetpointCC {
484
- constructor(options) {
485
- super(options);
486
- this.supportedScales = options.supportedScales;
487
- }
488
- static from(raw, ctx) {
489
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
490
- const supportedScales = (0, import_safe.parseBitMask)(import_safe2.Bytes.from([raw.payload[0] & 15]), 0);
491
- return new HumidityControlSetpointCCScaleSupportedReport_1({
492
- nodeId: ctx.sourceNodeId,
493
- supportedScales
494
- });
495
- }
496
- supportedScales;
497
- toLogEntry(ctx) {
498
- const supportedScales = this.supportedScales.map((scale) => getScale(scale));
499
- return {
500
- ...super.toLogEntry(ctx),
501
- message: {
502
- "scale supported": supportedScales.map((t) => `
586
+ }
587
+ };
588
+ }
589
+ };
590
+ return HumidityControlSetpointCCSupportedReport2 = _classThis;
591
+ })();
592
+ let HumidityControlSetpointCCSupportedGet = (() => {
593
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCSupportedReport)];
594
+ let _classDescriptor;
595
+ let _classExtraInitializers = [];
596
+ let _classThis;
597
+ let _classSuper = HumidityControlSetpointCC;
598
+ var HumidityControlSetpointCCSupportedGet2 = class extends _classSuper {
599
+ static {
600
+ _classThis = this;
601
+ }
602
+ static {
603
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
604
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
605
+ HumidityControlSetpointCCSupportedGet2 = _classThis = _classDescriptor.value;
606
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
607
+ __runInitializers(_classThis, _classExtraInitializers);
608
+ }
609
+ };
610
+ return HumidityControlSetpointCCSupportedGet2 = _classThis;
611
+ })();
612
+ let HumidityControlSetpointCCScaleSupportedReport = (() => {
613
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.ScaleSupportedReport)];
614
+ let _classDescriptor;
615
+ let _classExtraInitializers = [];
616
+ let _classThis;
617
+ let _classSuper = HumidityControlSetpointCC;
618
+ var HumidityControlSetpointCCScaleSupportedReport2 = class extends _classSuper {
619
+ static {
620
+ _classThis = this;
621
+ }
622
+ static {
623
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
624
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
625
+ HumidityControlSetpointCCScaleSupportedReport2 = _classThis = _classDescriptor.value;
626
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
627
+ __runInitializers(_classThis, _classExtraInitializers);
628
+ }
629
+ constructor(options) {
630
+ super(options);
631
+ this.supportedScales = options.supportedScales;
632
+ }
633
+ static from(raw, ctx) {
634
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
635
+ const supportedScales = (0, import_safe.parseBitMask)(import_safe2.Bytes.from([raw.payload[0] & 15]), 0);
636
+ return new this({
637
+ nodeId: ctx.sourceNodeId,
638
+ supportedScales
639
+ });
640
+ }
641
+ supportedScales;
642
+ toLogEntry(ctx) {
643
+ const supportedScales = this.supportedScales.map((scale) => getScale(scale));
644
+ return {
645
+ ...super.toLogEntry(ctx),
646
+ message: {
647
+ "scale supported": supportedScales.map((t) => `
503
648
  \xB7 ${t.key} ${t.unit} - ${t.label}`).join("")
504
- }
505
- };
506
- }
507
- };
508
- HumidityControlSetpointCCScaleSupportedReport = HumidityControlSetpointCCScaleSupportedReport_1 = __decorate([
509
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.ScaleSupportedReport)
510
- ], HumidityControlSetpointCCScaleSupportedReport);
511
- let HumidityControlSetpointCCScaleSupportedGet = class HumidityControlSetpointCCScaleSupportedGet2 extends HumidityControlSetpointCC {
512
- constructor(options) {
513
- super(options);
514
- this.setpointType = options.setpointType;
515
- }
516
- static from(_raw, _ctx) {
517
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
518
- }
519
- setpointType;
520
- serialize(ctx) {
521
- this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
522
- return super.serialize(ctx);
523
- }
524
- toLogEntry(ctx) {
525
- return {
526
- ...super.toLogEntry(ctx),
527
- message: {
528
- "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
529
- }
530
- };
531
- }
532
- };
533
- HumidityControlSetpointCCScaleSupportedGet = __decorate([
534
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.ScaleSupportedGet),
535
- (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCScaleSupportedReport)
536
- ], HumidityControlSetpointCCScaleSupportedGet);
537
- let HumidityControlSetpointCCCapabilitiesReport = HumidityControlSetpointCCCapabilitiesReport_1 = class HumidityControlSetpointCCCapabilitiesReport2 extends HumidityControlSetpointCC {
538
- constructor(options) {
539
- super(options);
540
- this.type = options.type;
541
- this.minValue = options.minValue;
542
- this.maxValue = options.maxValue;
543
- this.minValueScale = options.minValueScale;
544
- this.maxValueScale = options.maxValueScale;
545
- }
546
- static from(raw, ctx) {
547
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
548
- const type = raw.payload[0] & 15;
549
- const { value: minValue, scale: minValueScale, bytesRead } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
550
- const { value: maxValue, scale: maxValueScale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1 + bytesRead));
551
- return new HumidityControlSetpointCCCapabilitiesReport_1({
552
- nodeId: ctx.sourceNodeId,
553
- type,
554
- minValue,
555
- minValueScale,
556
- maxValue,
557
- maxValueScale
558
- });
559
- }
560
- persistValues(ctx) {
561
- if (!super.persistValues(ctx))
562
- return false;
563
- const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
564
- this.setMetadata(ctx, setpointValue, {
565
- ...setpointValue.meta,
566
- min: this.minValue,
567
- max: this.maxValue,
568
- unit: getSetpointUnit(this.minValueScale) || getSetpointUnit(this.maxValueScale)
569
- });
570
- return true;
571
- }
572
- type;
573
- minValue;
574
- maxValue;
575
- minValueScale;
576
- maxValueScale;
577
- toLogEntry(ctx) {
578
- const minValueScale = getScale(this.minValueScale);
579
- const maxValueScale = getScale(this.maxValueScale);
580
- return {
581
- ...super.toLogEntry(ctx),
582
- message: {
583
- "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
584
- "min value": `${this.minValue} ${minValueScale.unit}`,
585
- "max value": `${this.maxValue} ${maxValueScale.unit}`
586
- }
587
- };
588
- }
589
- };
590
- HumidityControlSetpointCCCapabilitiesReport = HumidityControlSetpointCCCapabilitiesReport_1 = __decorate([
591
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.CapabilitiesReport)
592
- ], HumidityControlSetpointCCCapabilitiesReport);
593
- let HumidityControlSetpointCCCapabilitiesGet = class HumidityControlSetpointCCCapabilitiesGet2 extends HumidityControlSetpointCC {
594
- constructor(options) {
595
- super(options);
596
- this.setpointType = options.setpointType;
597
- }
598
- static from(_raw, _ctx) {
599
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
600
- }
601
- setpointType;
602
- serialize(ctx) {
603
- this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
604
- return super.serialize(ctx);
605
- }
606
- toLogEntry(ctx) {
607
- return {
608
- ...super.toLogEntry(ctx),
609
- message: {
610
- "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
611
- }
612
- };
613
- }
614
- };
615
- HumidityControlSetpointCCCapabilitiesGet = __decorate([
616
- (0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.CapabilitiesGet),
617
- (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCCapabilitiesReport)
618
- ], HumidityControlSetpointCCCapabilitiesGet);
649
+ }
650
+ };
651
+ }
652
+ };
653
+ return HumidityControlSetpointCCScaleSupportedReport2 = _classThis;
654
+ })();
655
+ let HumidityControlSetpointCCScaleSupportedGet = (() => {
656
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.ScaleSupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCScaleSupportedReport)];
657
+ let _classDescriptor;
658
+ let _classExtraInitializers = [];
659
+ let _classThis;
660
+ let _classSuper = HumidityControlSetpointCC;
661
+ var HumidityControlSetpointCCScaleSupportedGet2 = class extends _classSuper {
662
+ static {
663
+ _classThis = this;
664
+ }
665
+ static {
666
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
667
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
668
+ HumidityControlSetpointCCScaleSupportedGet2 = _classThis = _classDescriptor.value;
669
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
670
+ __runInitializers(_classThis, _classExtraInitializers);
671
+ }
672
+ constructor(options) {
673
+ super(options);
674
+ this.setpointType = options.setpointType;
675
+ }
676
+ static from(_raw, _ctx) {
677
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
678
+ }
679
+ setpointType;
680
+ serialize(ctx) {
681
+ this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
682
+ return super.serialize(ctx);
683
+ }
684
+ toLogEntry(ctx) {
685
+ return {
686
+ ...super.toLogEntry(ctx),
687
+ message: {
688
+ "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
689
+ }
690
+ };
691
+ }
692
+ };
693
+ return HumidityControlSetpointCCScaleSupportedGet2 = _classThis;
694
+ })();
695
+ let HumidityControlSetpointCCCapabilitiesReport = (() => {
696
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.CapabilitiesReport)];
697
+ let _classDescriptor;
698
+ let _classExtraInitializers = [];
699
+ let _classThis;
700
+ let _classSuper = HumidityControlSetpointCC;
701
+ var HumidityControlSetpointCCCapabilitiesReport2 = class extends _classSuper {
702
+ static {
703
+ _classThis = this;
704
+ }
705
+ static {
706
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
707
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
708
+ HumidityControlSetpointCCCapabilitiesReport2 = _classThis = _classDescriptor.value;
709
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
710
+ __runInitializers(_classThis, _classExtraInitializers);
711
+ }
712
+ constructor(options) {
713
+ super(options);
714
+ this.type = options.type;
715
+ this.minValue = options.minValue;
716
+ this.maxValue = options.maxValue;
717
+ this.minValueScale = options.minValueScale;
718
+ this.maxValueScale = options.maxValueScale;
719
+ }
720
+ static from(raw, ctx) {
721
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
722
+ const type = raw.payload[0] & 15;
723
+ const { value: minValue, scale: minValueScale, bytesRead } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1));
724
+ const { value: maxValue, scale: maxValueScale } = (0, import_safe.parseFloatWithScale)(raw.payload.subarray(1 + bytesRead));
725
+ return new this({
726
+ nodeId: ctx.sourceNodeId,
727
+ type,
728
+ minValue,
729
+ minValueScale,
730
+ maxValue,
731
+ maxValueScale
732
+ });
733
+ }
734
+ persistValues(ctx) {
735
+ if (!super.persistValues(ctx))
736
+ return false;
737
+ const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);
738
+ this.setMetadata(ctx, setpointValue, {
739
+ ...setpointValue.meta,
740
+ min: this.minValue,
741
+ max: this.maxValue,
742
+ unit: getSetpointUnit(this.minValueScale) || getSetpointUnit(this.maxValueScale)
743
+ });
744
+ return true;
745
+ }
746
+ type;
747
+ minValue;
748
+ maxValue;
749
+ minValueScale;
750
+ maxValueScale;
751
+ toLogEntry(ctx) {
752
+ const minValueScale = getScale(this.minValueScale);
753
+ const maxValueScale = getScale(this.maxValueScale);
754
+ return {
755
+ ...super.toLogEntry(ctx),
756
+ message: {
757
+ "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.type),
758
+ "min value": `${this.minValue} ${minValueScale.unit}`,
759
+ "max value": `${this.maxValue} ${maxValueScale.unit}`
760
+ }
761
+ };
762
+ }
763
+ };
764
+ return HumidityControlSetpointCCCapabilitiesReport2 = _classThis;
765
+ })();
766
+ let HumidityControlSetpointCCCapabilitiesGet = (() => {
767
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.HumidityControlSetpointCommand.CapabilitiesGet), (0, import_CommandClassDecorators.expectedCCResponse)(HumidityControlSetpointCCCapabilitiesReport)];
768
+ let _classDescriptor;
769
+ let _classExtraInitializers = [];
770
+ let _classThis;
771
+ let _classSuper = HumidityControlSetpointCC;
772
+ var HumidityControlSetpointCCCapabilitiesGet2 = class extends _classSuper {
773
+ static {
774
+ _classThis = this;
775
+ }
776
+ static {
777
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
778
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
779
+ HumidityControlSetpointCCCapabilitiesGet2 = _classThis = _classDescriptor.value;
780
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
781
+ __runInitializers(_classThis, _classExtraInitializers);
782
+ }
783
+ constructor(options) {
784
+ super(options);
785
+ this.setpointType = options.setpointType;
786
+ }
787
+ static from(_raw, _ctx) {
788
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
789
+ }
790
+ setpointType;
791
+ serialize(ctx) {
792
+ this.payload = import_safe2.Bytes.from([this.setpointType & 15]);
793
+ return super.serialize(ctx);
794
+ }
795
+ toLogEntry(ctx) {
796
+ return {
797
+ ...super.toLogEntry(ctx),
798
+ message: {
799
+ "setpoint type": (0, import_safe3.getEnumMemberName)(import_Types.HumidityControlSetpointType, this.setpointType)
800
+ }
801
+ };
802
+ }
803
+ };
804
+ return HumidityControlSetpointCCCapabilitiesGet2 = _classThis;
805
+ })();
619
806
  // Annotate the CommonJS export names for ESM import in node:
620
807
  0 && (module.exports = {
621
808
  HumidityControlSetpointCC,