@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
@@ -34,13 +34,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
34
34
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
35
35
  var import_Values = require("../lib/Values.js");
36
36
  var import_Types = require("../lib/_Types.js");
37
- var __decorate = function(decorators, target, key, desc) {
38
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
40
- 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;
41
- return c > 3 && r && Object.defineProperty(target, key, r), r;
37
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
38
+ function accept(f) {
39
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
40
+ return f;
41
+ }
42
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
43
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
44
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
45
+ var _, done = false;
46
+ for (var i = decorators.length - 1; i >= 0; i--) {
47
+ var context = {};
48
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
49
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
50
+ context.addInitializer = function(f) {
51
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
52
+ extraInitializers.push(accept(f || null));
53
+ };
54
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
55
+ if (kind === "accessor") {
56
+ if (result === void 0) continue;
57
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
58
+ if (_ = accept(result.get)) descriptor.get = _;
59
+ if (_ = accept(result.set)) descriptor.set = _;
60
+ if (_ = accept(result.init)) initializers.unshift(_);
61
+ } else if (_ = accept(result)) {
62
+ if (kind === "field") initializers.unshift(_);
63
+ else descriptor[key] = _;
64
+ }
65
+ }
66
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
67
+ done = true;
68
+ };
69
+ var __runInitializers = function(thisArg, initializers, value) {
70
+ var useValue = arguments.length > 2;
71
+ for (var i = 0; i < initializers.length; i++) {
72
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
73
+ }
74
+ return useValue ? value : void 0;
42
75
  };
43
- var BasicCCSet_1, BasicCCReport_1;
44
76
  function __assertType(argName, typeName, boundHasError) {
45
77
  const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
46
78
  if (boundHasError()) {
@@ -85,293 +117,355 @@ const BasicCCValues = Object.freeze({
85
117
  })
86
118
  })
87
119
  });
88
- let BasicCCAPI = class BasicCCAPI2 extends import_API.CCAPI {
89
- supportsCommand(cmd) {
90
- switch (cmd) {
91
- case import_Types.BasicCommand.Get:
92
- return this.isSinglecast();
93
- case import_Types.BasicCommand.Set:
94
- return true;
120
+ let BasicCCAPI = (() => {
121
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Basic)];
122
+ let _classDescriptor;
123
+ let _classExtraInitializers = [];
124
+ let _classThis;
125
+ let _classSuper = import_API.CCAPI;
126
+ var BasicCCAPI2 = class extends _classSuper {
127
+ static {
128
+ _classThis = this;
95
129
  }
96
- return super.supportsCommand(cmd);
97
- }
98
- get [import_API.SET_VALUE]() {
99
- return async function({ property }, value) {
130
+ static {
131
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
132
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
133
+ BasicCCAPI2 = _classThis = _classDescriptor.value;
134
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
135
+ __runInitializers(_classThis, _classExtraInitializers);
136
+ }
137
+ supportsCommand(cmd) {
138
+ switch (cmd) {
139
+ case import_Types.BasicCommand.Get:
140
+ return this.isSinglecast();
141
+ case import_Types.BasicCommand.Set:
142
+ return true;
143
+ }
144
+ return super.supportsCommand(cmd);
145
+ }
146
+ get [import_API.SET_VALUE]() {
147
+ return async function({ property }, value) {
148
+ if (property === "restorePrevious") {
149
+ property = "targetValue";
150
+ value = 255;
151
+ }
152
+ if (property !== "targetValue") {
153
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
154
+ }
155
+ if (typeof value !== "number") {
156
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
157
+ }
158
+ return this.set(value);
159
+ };
160
+ }
161
+ [import_API.SET_VALUE_HOOKS] = ({ property }, value, _options) => {
100
162
  if (property === "restorePrevious") {
101
163
  property = "targetValue";
102
164
  value = 255;
103
165
  }
104
- if (property !== "targetValue") {
105
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
106
- }
107
- if (typeof value !== "number") {
108
- (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
109
- }
110
- return this.set(value);
111
- };
112
- }
113
- [import_API.SET_VALUE_HOOKS] = ({ property }, value, _options) => {
114
- if (property === "restorePrevious") {
115
- property = "targetValue";
116
- value = 255;
117
- }
118
- if (property === "targetValue") {
119
- const currentValueValueId = BasicCCValues.currentValue.endpoint(this.endpoint.index);
120
- return {
121
- optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {
122
- if (typeof value === "number" && value >= 0 && value <= 99) {
123
- if (this.isSinglecast()) {
124
- this.tryGetValueDB()?.setValue(currentValueValueId, value);
125
- } else if (this.isMulticast()) {
126
- const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
127
- for (const node of affectedNodes) {
128
- this.host.tryGetValueDB(node.id)?.setValue(currentValueValueId, value);
166
+ if (property === "targetValue") {
167
+ const currentValueValueId = BasicCCValues.currentValue.endpoint(this.endpoint.index);
168
+ return {
169
+ optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {
170
+ if (typeof value === "number" && value >= 0 && value <= 99) {
171
+ if (this.isSinglecast()) {
172
+ this.tryGetValueDB()?.setValue(currentValueValueId, value);
173
+ } else if (this.isMulticast()) {
174
+ const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
175
+ for (const node of affectedNodes) {
176
+ this.host.tryGetValueDB(node.id)?.setValue(currentValueValueId, value);
177
+ }
129
178
  }
130
179
  }
180
+ },
181
+ forceVerifyChanges: () => {
182
+ return value === 255;
183
+ },
184
+ verifyChanges: () => {
185
+ if (this.isSinglecast() || this.isMulticast() && value === 255) {
186
+ this.schedulePoll(currentValueValueId, value === 255 ? void 0 : value);
187
+ }
131
188
  }
132
- },
133
- forceVerifyChanges: () => {
134
- return value === 255;
135
- },
136
- verifyChanges: () => {
137
- if (this.isSinglecast() || this.isMulticast() && value === 255) {
138
- this.schedulePoll(currentValueValueId, value === 255 ? void 0 : value);
139
- }
189
+ };
190
+ }
191
+ };
192
+ get [import_API.POLL_VALUE]() {
193
+ return async function({ property }) {
194
+ switch (property) {
195
+ case "currentValue":
196
+ case "targetValue":
197
+ case "duration":
198
+ return (await this.get())?.[property];
199
+ default:
200
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
140
201
  }
141
202
  };
142
203
  }
143
- };
144
- get [import_API.POLL_VALUE]() {
145
- return async function({ property }) {
146
- switch (property) {
147
- case "currentValue":
148
- case "targetValue":
149
- case "duration":
150
- return (await this.get())?.[property];
151
- default:
152
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
204
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
205
+ async get() {
206
+ this.assertSupportsCommand(import_Types.BasicCommand, import_Types.BasicCommand.Get);
207
+ const cc = new BasicCCGet({
208
+ nodeId: this.endpoint.nodeId,
209
+ endpointIndex: this.endpoint.index
210
+ });
211
+ const response = await this.host.sendCommand(cc, this.commandOptions);
212
+ if (response) {
213
+ this.tryGetValueDB()?.setValue(BasicCCValues.currentValue.endpoint(this.endpoint.index), response.currentValue);
214
+ return (0, import_safe3.pick)(response, ["currentValue", "targetValue", "duration"]);
153
215
  }
154
- };
155
- }
156
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
157
- async get() {
158
- this.assertSupportsCommand(import_Types.BasicCommand, import_Types.BasicCommand.Get);
159
- const cc = new BasicCCGet({
160
- nodeId: this.endpoint.nodeId,
161
- endpointIndex: this.endpoint.index
162
- });
163
- const response = await this.host.sendCommand(cc, this.commandOptions);
164
- if (response) {
165
- this.tryGetValueDB()?.setValue(BasicCCValues.currentValue.endpoint(this.endpoint.index), response.currentValue);
166
- return (0, import_safe3.pick)(response, ["currentValue", "targetValue", "duration"]);
167
216
  }
168
- }
169
- async set(targetValue) {
170
- __assertType("targetValue", "number", __assertType__number.bind(void 0, targetValue));
171
- this.assertSupportsCommand(import_Types.BasicCommand, import_Types.BasicCommand.Set);
172
- const cc = new BasicCCSet({
173
- nodeId: this.endpoint.nodeId,
174
- endpointIndex: this.endpoint.index,
175
- targetValue
176
- });
177
- return this.host.sendCommand(cc, this.commandOptions);
178
- }
179
- };
180
- BasicCCAPI = __decorate([
181
- (0, import_CommandClassDecorators.API)(import_safe.CommandClasses.Basic)
182
- ], BasicCCAPI);
183
- let BasicCC = class BasicCC2 extends import_CommandClass.CommandClass {
184
- async interview(ctx) {
185
- const node = this.getNode(ctx);
186
- const endpoint = this.getEndpoint(ctx);
187
- ctx.logNode(node.id, {
188
- endpoint: this.endpointIndex,
189
- message: `Interviewing ${this.ccName}...`,
190
- direction: "none"
191
- });
192
- endpoint.addCC(import_safe.CommandClasses.Basic, { isSupported: true });
193
- await this.refreshValues(ctx);
194
- if (this.getValue(ctx, BasicCCValues.currentValue) == void 0) {
217
+ async set(targetValue) {
218
+ __assertType("targetValue", "number", __assertType__number.bind(void 0, targetValue));
219
+ this.assertSupportsCommand(import_Types.BasicCommand, import_Types.BasicCommand.Set);
220
+ const cc = new BasicCCSet({
221
+ nodeId: this.endpoint.nodeId,
222
+ endpointIndex: this.endpoint.index,
223
+ targetValue
224
+ });
225
+ return this.host.sendCommand(cc, this.commandOptions);
226
+ }
227
+ };
228
+ return BasicCCAPI2 = _classThis;
229
+ })();
230
+ let BasicCC = (() => {
231
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Basic), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(BasicCCValues)];
232
+ let _classDescriptor;
233
+ let _classExtraInitializers = [];
234
+ let _classThis;
235
+ let _classSuper = import_CommandClass.CommandClass;
236
+ var BasicCC2 = class extends _classSuper {
237
+ static {
238
+ _classThis = this;
239
+ }
240
+ static {
241
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
242
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
243
+ BasicCC2 = _classThis = _classDescriptor.value;
244
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
245
+ __runInitializers(_classThis, _classExtraInitializers);
246
+ }
247
+ async interview(ctx) {
248
+ const node = this.getNode(ctx);
249
+ const endpoint = this.getEndpoint(ctx);
195
250
  ctx.logNode(node.id, {
196
251
  endpoint: this.endpointIndex,
197
- message: "No response to Basic Get command, assuming Basic CC is unsupported..."
252
+ message: `Interviewing ${this.ccName}...`,
253
+ direction: "none"
198
254
  });
199
- endpoint.addCC(import_safe.CommandClasses.Basic, { isSupported: false });
200
- if (!endpoint.controlsCC(import_safe.CommandClasses.Basic)) {
201
- endpoint.removeCC(import_safe.CommandClasses.Basic);
255
+ endpoint.addCC(import_safe.CommandClasses.Basic, { isSupported: true });
256
+ await this.refreshValues(ctx);
257
+ if (this.getValue(ctx, BasicCCValues.currentValue) == void 0) {
258
+ ctx.logNode(node.id, {
259
+ endpoint: this.endpointIndex,
260
+ message: "No response to Basic Get command, assuming Basic CC is unsupported..."
261
+ });
262
+ endpoint.addCC(import_safe.CommandClasses.Basic, { isSupported: false });
263
+ if (!endpoint.controlsCC(import_safe.CommandClasses.Basic)) {
264
+ endpoint.removeCC(import_safe.CommandClasses.Basic);
265
+ }
202
266
  }
267
+ this.setInterviewComplete(ctx, true);
203
268
  }
204
- this.setInterviewComplete(ctx, true);
205
- }
206
- async refreshValues(ctx) {
207
- const node = this.getNode(ctx);
208
- const endpoint = this.getEndpoint(ctx);
209
- const api = import_API.CCAPI.create(import_safe.CommandClasses.Basic, ctx, endpoint).withOptions({
210
- priority: import_safe.MessagePriority.NodeQuery
211
- });
212
- ctx.logNode(node.id, {
213
- endpoint: this.endpointIndex,
214
- message: "querying Basic CC state...",
215
- direction: "outbound"
216
- });
217
- const basicResponse = await api.get();
218
- if (basicResponse) {
219
- let logMessage = `received Basic CC state:
269
+ async refreshValues(ctx) {
270
+ const node = this.getNode(ctx);
271
+ const endpoint = this.getEndpoint(ctx);
272
+ const api = import_API.CCAPI.create(import_safe.CommandClasses.Basic, ctx, endpoint).withOptions({
273
+ priority: import_safe.MessagePriority.NodeQuery
274
+ });
275
+ ctx.logNode(node.id, {
276
+ endpoint: this.endpointIndex,
277
+ message: "querying Basic CC state...",
278
+ direction: "outbound"
279
+ });
280
+ const basicResponse = await api.get();
281
+ if (basicResponse) {
282
+ let logMessage = `received Basic CC state:
220
283
  current value: ${basicResponse.currentValue}`;
221
- if (basicResponse.targetValue != void 0) {
222
- logMessage += `
284
+ if (basicResponse.targetValue != void 0) {
285
+ logMessage += `
223
286
  target value: ${basicResponse.targetValue}
224
287
  remaining duration: ${basicResponse.duration?.toString() ?? "undefined"}`;
288
+ }
289
+ ctx.logNode(node.id, {
290
+ endpoint: this.endpointIndex,
291
+ message: logMessage,
292
+ direction: "inbound"
293
+ });
225
294
  }
226
- ctx.logNode(node.id, {
227
- endpoint: this.endpointIndex,
228
- message: logMessage,
229
- direction: "inbound"
295
+ }
296
+ getDefinedValueIDs(ctx) {
297
+ const ret = [];
298
+ const endpoint = this.getEndpoint(ctx);
299
+ const compat = ctx.getDeviceConfig?.(endpoint.nodeId)?.compat;
300
+ if (compat?.mapBasicSet === "event") {
301
+ ret.push(BasicCCValues.compatEvent.endpoint(endpoint.index));
302
+ }
303
+ if (endpoint.supportsCC(this.ccId)) {
304
+ ret.push(...super.getDefinedValueIDs(ctx));
305
+ } else if (endpoint.controlsCC(import_safe.CommandClasses.Basic)) {
306
+ ret.push(BasicCCValues.currentValue.endpoint(endpoint.index));
307
+ }
308
+ return ret;
309
+ }
310
+ };
311
+ return BasicCC2 = _classThis;
312
+ })();
313
+ let BasicCCSet = (() => {
314
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BasicCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
315
+ let _classDescriptor;
316
+ let _classExtraInitializers = [];
317
+ let _classThis;
318
+ let _classSuper = BasicCC;
319
+ var BasicCCSet2 = class extends _classSuper {
320
+ static {
321
+ _classThis = this;
322
+ }
323
+ static {
324
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
325
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
326
+ BasicCCSet2 = _classThis = _classDescriptor.value;
327
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
328
+ __runInitializers(_classThis, _classExtraInitializers);
329
+ }
330
+ constructor(options) {
331
+ super(options);
332
+ this.targetValue = options.targetValue;
333
+ }
334
+ static from(raw, ctx) {
335
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
336
+ const targetValue = raw.payload[0];
337
+ return new this({
338
+ nodeId: ctx.sourceNodeId,
339
+ targetValue
230
340
  });
231
341
  }
232
- }
233
- getDefinedValueIDs(ctx) {
234
- const ret = [];
235
- const endpoint = this.getEndpoint(ctx);
236
- const compat = ctx.getDeviceConfig?.(endpoint.nodeId)?.compat;
237
- if (compat?.mapBasicSet === "event") {
238
- ret.push(BasicCCValues.compatEvent.endpoint(endpoint.index));
342
+ targetValue;
343
+ serialize(ctx) {
344
+ this.payload = import_safe2.Bytes.from([this.targetValue]);
345
+ return super.serialize(ctx);
239
346
  }
240
- if (endpoint.supportsCC(this.ccId)) {
241
- ret.push(...super.getDefinedValueIDs(ctx));
242
- } else if (endpoint.controlsCC(import_safe.CommandClasses.Basic)) {
243
- ret.push(BasicCCValues.currentValue.endpoint(endpoint.index));
347
+ toLogEntry(ctx) {
348
+ return {
349
+ ...super.toLogEntry(ctx),
350
+ message: { "target value": this.targetValue }
351
+ };
244
352
  }
245
- return ret;
246
- }
247
- };
248
- BasicCC = __decorate([
249
- (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses.Basic),
250
- (0, import_CommandClassDecorators.implementedVersion)(2),
251
- (0, import_CommandClassDecorators.ccValues)(BasicCCValues)
252
- ], BasicCC);
253
- let BasicCCSet = BasicCCSet_1 = class BasicCCSet2 extends BasicCC {
254
- constructor(options) {
255
- super(options);
256
- this.targetValue = options.targetValue;
257
- }
258
- static from(raw, ctx) {
259
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
260
- const targetValue = raw.payload[0];
261
- return new BasicCCSet_1({
262
- nodeId: ctx.sourceNodeId,
263
- targetValue
264
- });
265
- }
266
- targetValue;
267
- serialize(ctx) {
268
- this.payload = import_safe2.Bytes.from([this.targetValue]);
269
- return super.serialize(ctx);
270
- }
271
- toLogEntry(ctx) {
272
- return {
273
- ...super.toLogEntry(ctx),
274
- message: { "target value": this.targetValue }
275
- };
276
- }
277
- };
278
- BasicCCSet = BasicCCSet_1 = __decorate([
279
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BasicCommand.Set),
280
- (0, import_CommandClassDecorators.useSupervision)()
281
- ], BasicCCSet);
282
- let BasicCCReport = BasicCCReport_1 = class BasicCCReport2 extends BasicCC {
283
- // @noCCValues See comment in the constructor
284
- constructor(options) {
285
- super(options);
286
- this.currentValue = options.currentValue;
287
- this.targetValue = options.targetValue;
288
- this.duration = options.duration;
289
- }
290
- static from(raw, ctx) {
291
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
292
- const currentValue = (
293
- // 0xff is a legacy value for 100% (99)
294
- raw.payload[0] === 255 ? 99 : (0, import_safe.parseMaybeNumber)(raw.payload[0])
295
- );
296
- (0, import_safe.validatePayload)(currentValue !== void 0);
297
- let targetValue;
298
- let duration;
299
- if (raw.payload.length >= 3) {
300
- targetValue = (0, import_safe.parseMaybeNumber)(raw.payload[1]);
301
- duration = import_safe.Duration.parseReport(raw.payload[2]);
353
+ };
354
+ return BasicCCSet2 = _classThis;
355
+ })();
356
+ let BasicCCReport = (() => {
357
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BasicCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("currentValue", BasicCCValues.currentValue), (0, import_CommandClassDecorators.ccValueProperty)("targetValue", BasicCCValues.targetValue), (0, import_CommandClassDecorators.ccValueProperty)("duration", BasicCCValues.duration)];
358
+ let _classDescriptor;
359
+ let _classExtraInitializers = [];
360
+ let _classThis;
361
+ let _classSuper = BasicCC;
362
+ var BasicCCReport2 = class extends _classSuper {
363
+ static {
364
+ _classThis = this;
302
365
  }
303
- return new BasicCCReport_1({
304
- nodeId: ctx.sourceNodeId,
305
- currentValue,
306
- targetValue,
307
- duration
308
- });
309
- }
310
- currentValue;
311
- targetValue;
312
- duration;
313
- persistValues(ctx) {
314
- const definedValueIDs = this.getDefinedValueIDs(ctx);
315
- const shouldPersistCurrentValue = definedValueIDs.some((vid) => BasicCCValues.currentValue.is(vid));
316
- const shouldPersistTargetValue = definedValueIDs.some((vid) => BasicCCValues.targetValue.is(vid));
317
- const shouldPersistDuration = definedValueIDs.some((vid) => BasicCCValues.duration.is(vid));
318
- if (this.currentValue !== void 0 && shouldPersistCurrentValue) {
319
- this.setValue(ctx, BasicCCValues.currentValue, this.currentValue);
366
+ static {
367
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
368
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
369
+ BasicCCReport2 = _classThis = _classDescriptor.value;
370
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
371
+ __runInitializers(_classThis, _classExtraInitializers);
320
372
  }
321
- if (this.targetValue !== void 0 && shouldPersistTargetValue) {
322
- this.setValue(ctx, BasicCCValues.targetValue, this.targetValue);
373
+ // @noCCValues See comment in the constructor
374
+ constructor(options) {
375
+ super(options);
376
+ this.currentValue = options.currentValue;
377
+ this.targetValue = options.targetValue;
378
+ this.duration = options.duration;
323
379
  }
324
- if (this.duration !== void 0 && shouldPersistDuration) {
325
- this.setValue(ctx, BasicCCValues.duration, this.duration);
380
+ static from(raw, ctx) {
381
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
382
+ const currentValue = (
383
+ // 0xff is a legacy value for 100% (99)
384
+ raw.payload[0] === 255 ? 99 : (0, import_safe.parseMaybeNumber)(raw.payload[0])
385
+ );
386
+ (0, import_safe.validatePayload)(currentValue !== void 0);
387
+ let targetValue;
388
+ let duration;
389
+ if (raw.payload.length >= 3) {
390
+ targetValue = (0, import_safe.parseMaybeNumber)(raw.payload[1]);
391
+ duration = import_safe.Duration.parseReport(raw.payload[2]);
392
+ }
393
+ return new this({
394
+ nodeId: ctx.sourceNodeId,
395
+ currentValue,
396
+ targetValue,
397
+ duration
398
+ });
326
399
  }
327
- return true;
328
- }
329
- serialize(ctx) {
330
- this.payload = import_safe2.Bytes.from([
331
- this.currentValue ?? 254,
332
- this.targetValue ?? 254,
333
- (this.duration ?? import_safe.Duration.unknown()).serializeReport()
334
- ]);
335
- const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
336
- if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
337
- this.payload = this.payload.subarray(0, 1);
400
+ currentValue;
401
+ targetValue;
402
+ duration;
403
+ persistValues(ctx) {
404
+ const definedValueIDs = this.getDefinedValueIDs(ctx);
405
+ const shouldPersistCurrentValue = definedValueIDs.some((vid) => BasicCCValues.currentValue.is(vid));
406
+ const shouldPersistTargetValue = definedValueIDs.some((vid) => BasicCCValues.targetValue.is(vid));
407
+ const shouldPersistDuration = definedValueIDs.some((vid) => BasicCCValues.duration.is(vid));
408
+ if (this.currentValue !== void 0 && shouldPersistCurrentValue) {
409
+ this.setValue(ctx, BasicCCValues.currentValue, this.currentValue);
410
+ }
411
+ if (this.targetValue !== void 0 && shouldPersistTargetValue) {
412
+ this.setValue(ctx, BasicCCValues.targetValue, this.targetValue);
413
+ }
414
+ if (this.duration !== void 0 && shouldPersistDuration) {
415
+ this.setValue(ctx, BasicCCValues.duration, this.duration);
416
+ }
417
+ return true;
338
418
  }
339
- return super.serialize(ctx);
340
- }
341
- toLogEntry(ctx) {
342
- const message = {
343
- "current value": (0, import_safe.maybeUnknownToString)(this.currentValue)
344
- };
345
- if (this.targetValue !== void 0) {
346
- message["target value"] = (0, import_safe.maybeUnknownToString)(this.targetValue);
419
+ serialize(ctx) {
420
+ this.payload = import_safe2.Bytes.from([
421
+ this.currentValue ?? 254,
422
+ this.targetValue ?? 254,
423
+ (this.duration ?? import_safe.Duration.unknown()).serializeReport()
424
+ ]);
425
+ const ccVersion = (0, import_CommandClass.getEffectiveCCVersion)(ctx, this);
426
+ if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId)?.compat?.encodeCCsUsingTargetVersion) {
427
+ this.payload = this.payload.subarray(0, 1);
428
+ }
429
+ return super.serialize(ctx);
347
430
  }
348
- if (this.duration != void 0) {
349
- message.duration = this.duration.toString();
431
+ toLogEntry(ctx) {
432
+ const message = {
433
+ "current value": (0, import_safe.maybeUnknownToString)(this.currentValue)
434
+ };
435
+ if (this.targetValue !== void 0) {
436
+ message["target value"] = (0, import_safe.maybeUnknownToString)(this.targetValue);
437
+ }
438
+ if (this.duration != void 0) {
439
+ message.duration = this.duration.toString();
440
+ }
441
+ return {
442
+ ...super.toLogEntry(ctx),
443
+ message
444
+ };
350
445
  }
351
- return {
352
- ...super.toLogEntry(ctx),
353
- message
354
- };
355
- }
356
- };
357
- __decorate([
358
- (0, import_CommandClassDecorators.ccValue)(BasicCCValues.currentValue)
359
- ], BasicCCReport.prototype, "currentValue", void 0);
360
- __decorate([
361
- (0, import_CommandClassDecorators.ccValue)(BasicCCValues.targetValue)
362
- ], BasicCCReport.prototype, "targetValue", void 0);
363
- __decorate([
364
- (0, import_CommandClassDecorators.ccValue)(BasicCCValues.duration)
365
- ], BasicCCReport.prototype, "duration", void 0);
366
- BasicCCReport = BasicCCReport_1 = __decorate([
367
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BasicCommand.Report)
368
- ], BasicCCReport);
369
- let BasicCCGet = class BasicCCGet2 extends BasicCC {
370
- };
371
- BasicCCGet = __decorate([
372
- (0, import_CommandClassDecorators.CCCommand)(import_Types.BasicCommand.Get),
373
- (0, import_CommandClassDecorators.expectedCCResponse)(BasicCCReport)
374
- ], BasicCCGet);
446
+ };
447
+ return BasicCCReport2 = _classThis;
448
+ })();
449
+ let BasicCCGet = (() => {
450
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.BasicCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(BasicCCReport)];
451
+ let _classDescriptor;
452
+ let _classExtraInitializers = [];
453
+ let _classThis;
454
+ let _classSuper = BasicCC;
455
+ var BasicCCGet2 = class extends _classSuper {
456
+ static {
457
+ _classThis = this;
458
+ }
459
+ static {
460
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
461
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
462
+ BasicCCGet2 = _classThis = _classDescriptor.value;
463
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
464
+ __runInitializers(_classThis, _classExtraInitializers);
465
+ }
466
+ };
467
+ return BasicCCGet2 = _classThis;
468
+ })();
375
469
  // Annotate the CommonJS export names for ESM import in node:
376
470
  0 && (module.exports = {
377
471
  BasicCC,