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

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
@@ -49,13 +49,45 @@ var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
49
49
  var import_Values = require("../lib/Values.js");
50
50
  var import_Types = require("../lib/_Types.js");
51
51
  var ccUtils = __toESM(require("../lib/utils.js"), 1);
52
- var __decorate = function(decorators, target, key, desc) {
53
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
54
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55
- 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;
56
- return c > 3 && r && Object.defineProperty(target, key, r), r;
52
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
53
+ function accept(f) {
54
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
55
+ return f;
56
+ }
57
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
58
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
59
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
60
+ var _, done = false;
61
+ for (var i = decorators.length - 1; i >= 0; i--) {
62
+ var context = {};
63
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
64
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
65
+ context.addInitializer = function(f) {
66
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
67
+ extraInitializers.push(accept(f || null));
68
+ };
69
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
70
+ if (kind === "accessor") {
71
+ if (result === void 0) continue;
72
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
73
+ if (_ = accept(result.get)) descriptor.get = _;
74
+ if (_ = accept(result.set)) descriptor.set = _;
75
+ if (_ = accept(result.init)) initializers.unshift(_);
76
+ } else if (_ = accept(result)) {
77
+ if (kind === "field") initializers.unshift(_);
78
+ else descriptor[key] = _;
79
+ }
80
+ }
81
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
82
+ done = true;
83
+ };
84
+ var __runInitializers = function(thisArg, initializers, value) {
85
+ var useValue = arguments.length > 2;
86
+ for (var i = 0; i < initializers.length; i++) {
87
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
88
+ }
89
+ return useValue ? value : void 0;
57
90
  };
58
- var CentralSceneCCNotification_1, CentralSceneCCSupportedReport_1, CentralSceneCCConfigurationReport_1;
59
91
  function __assertType(argName, typeName, boundHasError) {
60
92
  const { ZWaveError: ZWaveError2, ZWaveErrorCodes: ZWaveErrorCodes2 } = require("@zwave-js/core");
61
93
  if (boundHasError()) {
@@ -92,348 +124,451 @@ const CentralSceneCCValues = Object.freeze({
92
124
  }), { stateful: false })
93
125
  })
94
126
  });
95
- let CentralSceneCCAPI = class CentralSceneCCAPI2 extends import_API.CCAPI {
96
- supportsCommand(cmd) {
97
- switch (cmd) {
98
- case import_Types.CentralSceneCommand.SupportedGet:
99
- return this.isSinglecast();
100
- // this is mandatory
101
- case import_Types.CentralSceneCommand.ConfigurationGet:
102
- return this.version >= 3 && this.isSinglecast();
103
- case import_Types.CentralSceneCommand.ConfigurationSet:
104
- return this.version >= 3;
105
- }
106
- return super.supportsCommand(cmd);
107
- }
108
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
109
- async getSupported() {
110
- this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.SupportedGet);
111
- const cc = new CentralSceneCCSupportedGet({
112
- nodeId: this.endpoint.nodeId,
113
- endpointIndex: this.endpoint.index
114
- });
115
- const response = await this.host.sendCommand(cc, this.commandOptions);
116
- if (response) {
117
- return (0, import_safe3.pick)(response, [
118
- "sceneCount",
119
- "supportsSlowRefresh",
120
- "supportedKeyAttributes"
121
- ]);
127
+ let CentralSceneCCAPI = (() => {
128
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Central Scene"])];
129
+ let _classDescriptor;
130
+ let _classExtraInitializers = [];
131
+ let _classThis;
132
+ let _classSuper = import_API.CCAPI;
133
+ var CentralSceneCCAPI2 = class extends _classSuper {
134
+ static {
135
+ _classThis = this;
122
136
  }
123
- }
124
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
125
- async getConfiguration() {
126
- this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.ConfigurationGet);
127
- const cc = new CentralSceneCCConfigurationGet({
128
- nodeId: this.endpoint.nodeId,
129
- endpointIndex: this.endpoint.index
130
- });
131
- const response = await this.host.sendCommand(cc, this.commandOptions);
132
- if (response) {
133
- return (0, import_safe3.pick)(response, ["slowRefresh"]);
137
+ static {
138
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
139
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
140
+ CentralSceneCCAPI2 = _classThis = _classDescriptor.value;
141
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
142
+ __runInitializers(_classThis, _classExtraInitializers);
134
143
  }
135
- }
136
- async setConfiguration(slowRefresh) {
137
- __assertType("slowRefresh", "boolean", __assertType__boolean.bind(void 0, slowRefresh));
138
- this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.ConfigurationSet);
139
- const cc = new CentralSceneCCConfigurationSet({
140
- nodeId: this.endpoint.nodeId,
141
- endpointIndex: this.endpoint.index,
142
- slowRefresh
143
- });
144
- return this.host.sendCommand(cc, this.commandOptions);
145
- }
146
- get [import_API.SET_VALUE]() {
147
- return async function({ property }, value) {
148
- if (property !== "slowRefresh") {
149
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
144
+ supportsCommand(cmd) {
145
+ switch (cmd) {
146
+ case import_Types.CentralSceneCommand.SupportedGet:
147
+ return this.isSinglecast();
148
+ // this is mandatory
149
+ case import_Types.CentralSceneCommand.ConfigurationGet:
150
+ return this.version >= 3 && this.isSinglecast();
151
+ case import_Types.CentralSceneCommand.ConfigurationSet:
152
+ return this.version >= 3;
150
153
  }
151
- if (typeof value !== "boolean") {
152
- (0, import_API.throwWrongValueType)(this.ccId, property, "boolean", typeof value);
154
+ return super.supportsCommand(cmd);
155
+ }
156
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
157
+ async getSupported() {
158
+ this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.SupportedGet);
159
+ const cc = new CentralSceneCCSupportedGet({
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
+ return (0, import_safe3.pick)(response, [
166
+ "sceneCount",
167
+ "supportsSlowRefresh",
168
+ "supportedKeyAttributes"
169
+ ]);
153
170
  }
154
- return this.setConfiguration(value);
155
- };
156
- }
157
- get [import_API.POLL_VALUE]() {
158
- return async function({ property }) {
159
- if (property === "slowRefresh") {
160
- return (await this.getConfiguration())?.[property];
171
+ }
172
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
173
+ async getConfiguration() {
174
+ this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.ConfigurationGet);
175
+ const cc = new CentralSceneCCConfigurationGet({
176
+ nodeId: this.endpoint.nodeId,
177
+ endpointIndex: this.endpoint.index
178
+ });
179
+ const response = await this.host.sendCommand(cc, this.commandOptions);
180
+ if (response) {
181
+ return (0, import_safe3.pick)(response, ["slowRefresh"]);
161
182
  }
162
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
163
- };
164
- }
165
- };
166
- CentralSceneCCAPI = __decorate([
167
- (0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Central Scene"])
168
- ], CentralSceneCCAPI);
169
- let CentralSceneCC = class CentralSceneCC2 extends import_CommandClass.CommandClass {
170
- determineRequiredCCInterviews() {
171
- return [
172
- ...super.determineRequiredCCInterviews(),
173
- import_safe.CommandClasses.Association,
174
- import_safe.CommandClasses["Multi Channel Association"],
175
- import_safe.CommandClasses["Association Group Information"]
176
- ];
177
- }
178
- skipEndpointInterview() {
179
- return true;
180
- }
181
- async interview(ctx) {
182
- const node = this.getNode(ctx);
183
- const endpoint = this.getEndpoint(ctx);
184
- const api = import_API.CCAPI.create(import_safe.CommandClasses["Central Scene"], ctx, endpoint).withOptions({
185
- priority: import_safe.MessagePriority.NodeQuery
186
- });
187
- ctx.logNode(node.id, {
188
- endpoint: this.endpointIndex,
189
- message: `Interviewing ${this.ccName}...`,
190
- direction: "none"
191
- });
192
- try {
193
- await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.CentralSceneCommand.Notification);
194
- } catch {
195
- ctx.logNode(node.id, {
196
- endpoint: endpoint.index,
197
- message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
198
- level: "warn"
183
+ }
184
+ async setConfiguration(slowRefresh) {
185
+ __assertType("slowRefresh", "boolean", __assertType__boolean.bind(void 0, slowRefresh));
186
+ this.assertSupportsCommand(import_Types.CentralSceneCommand, import_Types.CentralSceneCommand.ConfigurationSet);
187
+ const cc = new CentralSceneCCConfigurationSet({
188
+ nodeId: this.endpoint.nodeId,
189
+ endpointIndex: this.endpoint.index,
190
+ slowRefresh
199
191
  });
192
+ return this.host.sendCommand(cc, this.commandOptions);
200
193
  }
201
- ctx.logNode(node.id, {
202
- endpoint: this.endpointIndex,
203
- message: "Querying supported scenes...",
204
- direction: "outbound"
205
- });
206
- const ccSupported = await api.getSupported();
207
- if (ccSupported) {
208
- const logMessage = `received supported scenes:
209
- # of scenes: ${ccSupported.sceneCount}
210
- supports slow refresh: ${ccSupported.supportsSlowRefresh}`;
211
- ctx.logNode(node.id, {
212
- endpoint: this.endpointIndex,
213
- message: logMessage,
214
- direction: "inbound"
194
+ get [import_API.SET_VALUE]() {
195
+ return async function({ property }, value) {
196
+ if (property !== "slowRefresh") {
197
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
198
+ }
199
+ if (typeof value !== "boolean") {
200
+ (0, import_API.throwWrongValueType)(this.ccId, property, "boolean", typeof value);
201
+ }
202
+ return this.setConfiguration(value);
203
+ };
204
+ }
205
+ get [import_API.POLL_VALUE]() {
206
+ return async function({ property }) {
207
+ if (property === "slowRefresh") {
208
+ return (await this.getConfiguration())?.[property];
209
+ }
210
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
211
+ };
212
+ }
213
+ };
214
+ return CentralSceneCCAPI2 = _classThis;
215
+ })();
216
+ let CentralSceneCC = (() => {
217
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Central Scene"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(CentralSceneCCValues)];
218
+ let _classDescriptor;
219
+ let _classExtraInitializers = [];
220
+ let _classThis;
221
+ let _classSuper = import_CommandClass.CommandClass;
222
+ var CentralSceneCC2 = class extends _classSuper {
223
+ static {
224
+ _classThis = this;
225
+ }
226
+ static {
227
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
228
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
229
+ CentralSceneCC2 = _classThis = _classDescriptor.value;
230
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
231
+ __runInitializers(_classThis, _classExtraInitializers);
232
+ }
233
+ determineRequiredCCInterviews() {
234
+ return [
235
+ ...super.determineRequiredCCInterviews(),
236
+ import_safe.CommandClasses.Association,
237
+ import_safe.CommandClasses["Multi Channel Association"],
238
+ import_safe.CommandClasses["Association Group Information"]
239
+ ];
240
+ }
241
+ skipEndpointInterview() {
242
+ return true;
243
+ }
244
+ async interview(ctx) {
245
+ const node = this.getNode(ctx);
246
+ const endpoint = this.getEndpoint(ctx);
247
+ const api = import_API.CCAPI.create(import_safe.CommandClasses["Central Scene"], ctx, endpoint).withOptions({
248
+ priority: import_safe.MessagePriority.NodeQuery
215
249
  });
216
- } else {
217
250
  ctx.logNode(node.id, {
218
251
  endpoint: this.endpointIndex,
219
- message: "Querying supported scenes timed out, skipping interview...",
220
- level: "warn"
252
+ message: `Interviewing ${this.ccName}...`,
253
+ direction: "none"
221
254
  });
222
- return;
223
- }
224
- if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {
255
+ try {
256
+ await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, import_Types.CentralSceneCommand.Notification);
257
+ } catch {
258
+ ctx.logNode(node.id, {
259
+ endpoint: endpoint.index,
260
+ message: `Configuring associations to receive ${(0, import_safe.getCCName)(this.ccId)} commands failed!`,
261
+ level: "warn"
262
+ });
263
+ }
225
264
  ctx.logNode(node.id, {
226
265
  endpoint: this.endpointIndex,
227
- message: "Enabling slow refresh capability...",
266
+ message: "Querying supported scenes...",
228
267
  direction: "outbound"
229
268
  });
230
- await api.setConfiguration(true);
269
+ const ccSupported = await api.getSupported();
270
+ if (ccSupported) {
271
+ const logMessage = `received supported scenes:
272
+ # of scenes: ${ccSupported.sceneCount}
273
+ supports slow refresh: ${ccSupported.supportsSlowRefresh}`;
274
+ ctx.logNode(node.id, {
275
+ endpoint: this.endpointIndex,
276
+ message: logMessage,
277
+ direction: "inbound"
278
+ });
279
+ } else {
280
+ ctx.logNode(node.id, {
281
+ endpoint: this.endpointIndex,
282
+ message: "Querying supported scenes timed out, skipping interview...",
283
+ level: "warn"
284
+ });
285
+ return;
286
+ }
287
+ if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {
288
+ ctx.logNode(node.id, {
289
+ endpoint: this.endpointIndex,
290
+ message: "Enabling slow refresh capability...",
291
+ direction: "outbound"
292
+ });
293
+ await api.setConfiguration(true);
294
+ }
295
+ this.setInterviewComplete(ctx, true);
231
296
  }
232
- this.setInterviewComplete(ctx, true);
233
- }
234
- };
235
- CentralSceneCC = __decorate([
236
- (0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Central Scene"]),
237
- (0, import_CommandClassDecorators.implementedVersion)(3),
238
- (0, import_CommandClassDecorators.ccValues)(CentralSceneCCValues)
239
- ], CentralSceneCC);
240
- let CentralSceneCCNotification = CentralSceneCCNotification_1 = class CentralSceneCCNotification2 extends CentralSceneCC {
241
- constructor(options) {
242
- super(options);
243
- this.sequenceNumber = options.sequenceNumber;
244
- this.keyAttribute = options.keyAttribute;
245
- this.sceneNumber = options.sceneNumber;
246
- this.slowRefresh = options.slowRefresh;
247
- }
248
- static from(raw, ctx) {
249
- (0, import_safe.validatePayload)(raw.payload.length >= 3);
250
- const sequenceNumber = raw.payload[0];
251
- const keyAttribute = raw.payload[1] & 7;
252
- const sceneNumber = raw.payload[2];
253
- let slowRefresh;
254
- if (keyAttribute === import_Types.CentralSceneKeys.KeyHeldDown) {
255
- slowRefresh = !!(raw.payload[1] & 128);
256
- }
257
- return new CentralSceneCCNotification_1({
258
- nodeId: ctx.sourceNodeId,
259
- sequenceNumber,
260
- keyAttribute,
261
- sceneNumber,
262
- slowRefresh
263
- });
264
- }
265
- persistValues(ctx) {
266
- if (!super.persistValues(ctx))
267
- return false;
268
- const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);
269
- this.ensureMetadata(ctx, sceneValue);
270
- return true;
271
- }
272
- sequenceNumber;
273
- keyAttribute;
274
- sceneNumber;
275
- slowRefresh;
276
- toLogEntry(ctx) {
277
- const message = {
278
- "sequence number": this.sequenceNumber,
279
- "key attribute": (0, import_safe3.getEnumMemberName)(import_Types.CentralSceneKeys, this.keyAttribute),
280
- "scene number": this.sceneNumber
281
- };
282
- if (this.slowRefresh != void 0) {
283
- message["slow refresh"] = this.slowRefresh;
297
+ };
298
+ return CentralSceneCC2 = _classThis;
299
+ })();
300
+ let CentralSceneCCNotification = (() => {
301
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.Notification)];
302
+ let _classDescriptor;
303
+ let _classExtraInitializers = [];
304
+ let _classThis;
305
+ let _classSuper = CentralSceneCC;
306
+ var CentralSceneCCNotification2 = class extends _classSuper {
307
+ static {
308
+ _classThis = this;
284
309
  }
285
- return {
286
- ...super.toLogEntry(ctx),
287
- message
288
- };
289
- }
290
- };
291
- CentralSceneCCNotification = CentralSceneCCNotification_1 = __decorate([
292
- (0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.Notification)
293
- ], CentralSceneCCNotification);
294
- let CentralSceneCCSupportedReport = CentralSceneCCSupportedReport_1 = class CentralSceneCCSupportedReport2 extends CentralSceneCC {
295
- constructor(options) {
296
- super(options);
297
- this.sceneCount = options.sceneCount;
298
- this.supportsSlowRefresh = options.supportsSlowRefresh;
299
- for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {
300
- this._supportedKeyAttributes.set(parseInt(scene), keys);
310
+ static {
311
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
312
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
313
+ CentralSceneCCNotification2 = _classThis = _classDescriptor.value;
314
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
315
+ __runInitializers(_classThis, _classExtraInitializers);
301
316
  }
302
- }
303
- static from(raw, ctx) {
304
- (0, import_safe.validatePayload)(raw.payload.length >= 2);
305
- const sceneCount = raw.payload[0];
306
- const supportsSlowRefresh = !!(raw.payload[1] & 128);
307
- const bitMaskBytes = (raw.payload[1] & 6) >>> 1;
308
- const identicalKeyAttributes = !!(raw.payload[1] & 1);
309
- const numEntries = identicalKeyAttributes ? 1 : sceneCount;
310
- (0, import_safe.validatePayload)(raw.payload.length >= 2 + bitMaskBytes * numEntries);
311
- const supportedKeyAttributes = {};
312
- for (let i = 0; i < numEntries; i++) {
313
- const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);
314
- supportedKeyAttributes[i + 1] = (0, import_safe.parseBitMask)(mask, import_Types.CentralSceneKeys.KeyPressed);
315
- }
316
- if (identicalKeyAttributes) {
317
- for (let i = 2; i <= sceneCount; i++) {
318
- supportedKeyAttributes[i] = supportedKeyAttributes[1];
317
+ constructor(options) {
318
+ super(options);
319
+ this.sequenceNumber = options.sequenceNumber;
320
+ this.keyAttribute = options.keyAttribute;
321
+ this.sceneNumber = options.sceneNumber;
322
+ this.slowRefresh = options.slowRefresh;
323
+ }
324
+ static from(raw, ctx) {
325
+ (0, import_safe.validatePayload)(raw.payload.length >= 3);
326
+ const sequenceNumber = raw.payload[0];
327
+ const keyAttribute = raw.payload[1] & 7;
328
+ const sceneNumber = raw.payload[2];
329
+ let slowRefresh;
330
+ if (keyAttribute === import_Types.CentralSceneKeys.KeyHeldDown) {
331
+ slowRefresh = !!(raw.payload[1] & 128);
319
332
  }
333
+ return new this({
334
+ nodeId: ctx.sourceNodeId,
335
+ sequenceNumber,
336
+ keyAttribute,
337
+ sceneNumber,
338
+ slowRefresh
339
+ });
320
340
  }
321
- return new CentralSceneCCSupportedReport_1({
322
- nodeId: ctx.sourceNodeId,
323
- sceneCount,
324
- supportsSlowRefresh,
325
- supportedKeyAttributes
326
- });
327
- }
328
- persistValues(ctx) {
329
- if (!super.persistValues(ctx))
330
- return false;
331
- for (let i = 1; i <= this.sceneCount; i++) {
332
- const sceneValue = CentralSceneCCValues.scene(i);
333
- this.setMetadata(ctx, sceneValue, {
334
- ...sceneValue.meta,
335
- states: (0, import_safe.enumValuesToMetadataStates)(import_Types.CentralSceneKeys, this._supportedKeyAttributes.get(i))
341
+ persistValues(ctx) {
342
+ if (!super.persistValues(ctx))
343
+ return false;
344
+ const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);
345
+ this.ensureMetadata(ctx, sceneValue);
346
+ return true;
347
+ }
348
+ sequenceNumber;
349
+ keyAttribute;
350
+ sceneNumber;
351
+ slowRefresh;
352
+ toLogEntry(ctx) {
353
+ const message = {
354
+ "sequence number": this.sequenceNumber,
355
+ "key attribute": (0, import_safe3.getEnumMemberName)(import_Types.CentralSceneKeys, this.keyAttribute),
356
+ "scene number": this.sceneNumber
357
+ };
358
+ if (this.slowRefresh != void 0) {
359
+ message["slow refresh"] = this.slowRefresh;
360
+ }
361
+ return {
362
+ ...super.toLogEntry(ctx),
363
+ message
364
+ };
365
+ }
366
+ };
367
+ return CentralSceneCCNotification2 = _classThis;
368
+ })();
369
+ let CentralSceneCCSupportedReport = (() => {
370
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("sceneCount", CentralSceneCCValues.sceneCount), (0, import_CommandClassDecorators.ccValueProperty)("supportsSlowRefresh", CentralSceneCCValues.supportsSlowRefresh), (0, import_CommandClassDecorators.ccValueProperty)("supportedKeyAttributes", CentralSceneCCValues.supportedKeyAttributes)];
371
+ let _classDescriptor;
372
+ let _classExtraInitializers = [];
373
+ let _classThis;
374
+ let _classSuper = CentralSceneCC;
375
+ var CentralSceneCCSupportedReport2 = class extends _classSuper {
376
+ static {
377
+ _classThis = this;
378
+ }
379
+ static {
380
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
381
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
382
+ CentralSceneCCSupportedReport2 = _classThis = _classDescriptor.value;
383
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
384
+ __runInitializers(_classThis, _classExtraInitializers);
385
+ }
386
+ constructor(options) {
387
+ super(options);
388
+ this.sceneCount = options.sceneCount;
389
+ this.supportsSlowRefresh = options.supportsSlowRefresh;
390
+ for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {
391
+ this._supportedKeyAttributes.set(parseInt(scene), keys);
392
+ }
393
+ }
394
+ static from(raw, ctx) {
395
+ (0, import_safe.validatePayload)(raw.payload.length >= 2);
396
+ const sceneCount = raw.payload[0];
397
+ const supportsSlowRefresh = !!(raw.payload[1] & 128);
398
+ const bitMaskBytes = (raw.payload[1] & 6) >>> 1;
399
+ const identicalKeyAttributes = !!(raw.payload[1] & 1);
400
+ const numEntries = identicalKeyAttributes ? 1 : sceneCount;
401
+ (0, import_safe.validatePayload)(raw.payload.length >= 2 + bitMaskBytes * numEntries);
402
+ const supportedKeyAttributes = {};
403
+ for (let i = 0; i < numEntries; i++) {
404
+ const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);
405
+ supportedKeyAttributes[i + 1] = (0, import_safe.parseBitMask)(mask, import_Types.CentralSceneKeys.KeyPressed);
406
+ }
407
+ if (identicalKeyAttributes) {
408
+ for (let i = 2; i <= sceneCount; i++) {
409
+ supportedKeyAttributes[i] = supportedKeyAttributes[1];
410
+ }
411
+ }
412
+ return new this({
413
+ nodeId: ctx.sourceNodeId,
414
+ sceneCount,
415
+ supportsSlowRefresh,
416
+ supportedKeyAttributes
336
417
  });
337
418
  }
338
- return true;
339
- }
340
- sceneCount;
341
- // TODO: Only offer `slowRefresh` if this is true
342
- supportsSlowRefresh;
343
- _supportedKeyAttributes = /* @__PURE__ */ new Map();
344
- get supportedKeyAttributes() {
345
- return this._supportedKeyAttributes;
346
- }
347
- toLogEntry(ctx) {
348
- const message = {
349
- "scene count": this.sceneCount,
350
- "supports slow refresh": (0, import_safe.maybeUnknownToString)(this.supportsSlowRefresh)
351
- };
352
- for (const [scene, keys] of this.supportedKeyAttributes) {
353
- message[`supported attributes (scene #${scene})`] = keys.map((k) => `
419
+ persistValues(ctx) {
420
+ if (!super.persistValues(ctx))
421
+ return false;
422
+ for (let i = 1; i <= this.sceneCount; i++) {
423
+ const sceneValue = CentralSceneCCValues.scene(i);
424
+ this.setMetadata(ctx, sceneValue, {
425
+ ...sceneValue.meta,
426
+ states: (0, import_safe.enumValuesToMetadataStates)(import_Types.CentralSceneKeys, this._supportedKeyAttributes.get(i))
427
+ });
428
+ }
429
+ return true;
430
+ }
431
+ sceneCount;
432
+ // TODO: Only offer `slowRefresh` if this is true
433
+ supportsSlowRefresh;
434
+ _supportedKeyAttributes = /* @__PURE__ */ new Map();
435
+ get supportedKeyAttributes() {
436
+ return this._supportedKeyAttributes;
437
+ }
438
+ toLogEntry(ctx) {
439
+ const message = {
440
+ "scene count": this.sceneCount,
441
+ "supports slow refresh": (0, import_safe.maybeUnknownToString)(this.supportsSlowRefresh)
442
+ };
443
+ for (const [scene, keys] of this.supportedKeyAttributes) {
444
+ message[`supported attributes (scene #${scene})`] = keys.map((k) => `
354
445
  \xB7 ${(0, import_safe3.getEnumMemberName)(import_Types.CentralSceneKeys, k)}`).join("");
446
+ }
447
+ return {
448
+ ...super.toLogEntry(ctx),
449
+ message
450
+ };
355
451
  }
356
- return {
357
- ...super.toLogEntry(ctx),
358
- message
359
- };
360
- }
361
- };
362
- __decorate([
363
- (0, import_CommandClassDecorators.ccValue)(CentralSceneCCValues.sceneCount)
364
- ], CentralSceneCCSupportedReport.prototype, "sceneCount", void 0);
365
- __decorate([
366
- (0, import_CommandClassDecorators.ccValue)(CentralSceneCCValues.supportsSlowRefresh)
367
- ], CentralSceneCCSupportedReport.prototype, "supportsSlowRefresh", void 0);
368
- __decorate([
369
- (0, import_CommandClassDecorators.ccValue)(CentralSceneCCValues.supportedKeyAttributes)
370
- ], CentralSceneCCSupportedReport.prototype, "supportedKeyAttributes", null);
371
- CentralSceneCCSupportedReport = CentralSceneCCSupportedReport_1 = __decorate([
372
- (0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.SupportedReport)
373
- ], CentralSceneCCSupportedReport);
374
- let CentralSceneCCSupportedGet = class CentralSceneCCSupportedGet2 extends CentralSceneCC {
375
- };
376
- CentralSceneCCSupportedGet = __decorate([
377
- (0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.SupportedGet),
378
- (0, import_CommandClassDecorators.expectedCCResponse)(CentralSceneCCSupportedReport)
379
- ], CentralSceneCCSupportedGet);
380
- let CentralSceneCCConfigurationReport = CentralSceneCCConfigurationReport_1 = class CentralSceneCCConfigurationReport2 extends CentralSceneCC {
381
- constructor(options) {
382
- super(options);
383
- this.slowRefresh = options.slowRefresh;
384
- }
385
- static from(raw, ctx) {
386
- (0, import_safe.validatePayload)(raw.payload.length >= 1);
387
- const slowRefresh = !!(raw.payload[0] & 128);
388
- return new CentralSceneCCConfigurationReport_1({
389
- nodeId: ctx.sourceNodeId,
390
- slowRefresh
391
- });
392
- }
393
- slowRefresh;
394
- toLogEntry(ctx) {
395
- return {
396
- ...super.toLogEntry(ctx),
397
- message: { "slow refresh": this.slowRefresh }
398
- };
399
- }
400
- };
401
- __decorate([
402
- (0, import_CommandClassDecorators.ccValue)(CentralSceneCCValues.slowRefresh)
403
- ], CentralSceneCCConfigurationReport.prototype, "slowRefresh", void 0);
404
- CentralSceneCCConfigurationReport = CentralSceneCCConfigurationReport_1 = __decorate([
405
- (0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationReport)
406
- ], CentralSceneCCConfigurationReport);
407
- let CentralSceneCCConfigurationGet = class CentralSceneCCConfigurationGet2 extends CentralSceneCC {
408
- };
409
- CentralSceneCCConfigurationGet = __decorate([
410
- (0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationGet),
411
- (0, import_CommandClassDecorators.expectedCCResponse)(CentralSceneCCConfigurationReport)
412
- ], CentralSceneCCConfigurationGet);
413
- let CentralSceneCCConfigurationSet = class CentralSceneCCConfigurationSet2 extends CentralSceneCC {
414
- constructor(options) {
415
- super(options);
416
- this.slowRefresh = options.slowRefresh;
417
- }
418
- static from(_raw, _ctx) {
419
- throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
420
- }
421
- slowRefresh;
422
- serialize(ctx) {
423
- this.payload = import_safe2.Bytes.from([this.slowRefresh ? 128 : 0]);
424
- return super.serialize(ctx);
425
- }
426
- toLogEntry(ctx) {
427
- return {
428
- ...super.toLogEntry(ctx),
429
- message: { "slow refresh": this.slowRefresh }
430
- };
431
- }
432
- };
433
- CentralSceneCCConfigurationSet = __decorate([
434
- (0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationSet),
435
- (0, import_CommandClassDecorators.useSupervision)()
436
- ], CentralSceneCCConfigurationSet);
452
+ };
453
+ return CentralSceneCCSupportedReport2 = _classThis;
454
+ })();
455
+ let CentralSceneCCSupportedGet = (() => {
456
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(CentralSceneCCSupportedReport)];
457
+ let _classDescriptor;
458
+ let _classExtraInitializers = [];
459
+ let _classThis;
460
+ let _classSuper = CentralSceneCC;
461
+ var CentralSceneCCSupportedGet2 = class extends _classSuper {
462
+ static {
463
+ _classThis = this;
464
+ }
465
+ static {
466
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
467
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
468
+ CentralSceneCCSupportedGet2 = _classThis = _classDescriptor.value;
469
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
470
+ __runInitializers(_classThis, _classExtraInitializers);
471
+ }
472
+ };
473
+ return CentralSceneCCSupportedGet2 = _classThis;
474
+ })();
475
+ let CentralSceneCCConfigurationReport = (() => {
476
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationReport), (0, import_CommandClassDecorators.ccValueProperty)("slowRefresh", CentralSceneCCValues.slowRefresh)];
477
+ let _classDescriptor;
478
+ let _classExtraInitializers = [];
479
+ let _classThis;
480
+ let _classSuper = CentralSceneCC;
481
+ var CentralSceneCCConfigurationReport2 = class extends _classSuper {
482
+ static {
483
+ _classThis = this;
484
+ }
485
+ static {
486
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
487
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
488
+ CentralSceneCCConfigurationReport2 = _classThis = _classDescriptor.value;
489
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
490
+ __runInitializers(_classThis, _classExtraInitializers);
491
+ }
492
+ constructor(options) {
493
+ super(options);
494
+ this.slowRefresh = options.slowRefresh;
495
+ }
496
+ static from(raw, ctx) {
497
+ (0, import_safe.validatePayload)(raw.payload.length >= 1);
498
+ const slowRefresh = !!(raw.payload[0] & 128);
499
+ return new this({
500
+ nodeId: ctx.sourceNodeId,
501
+ slowRefresh
502
+ });
503
+ }
504
+ slowRefresh;
505
+ toLogEntry(ctx) {
506
+ return {
507
+ ...super.toLogEntry(ctx),
508
+ message: { "slow refresh": this.slowRefresh }
509
+ };
510
+ }
511
+ };
512
+ return CentralSceneCCConfigurationReport2 = _classThis;
513
+ })();
514
+ let CentralSceneCCConfigurationGet = (() => {
515
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationGet), (0, import_CommandClassDecorators.expectedCCResponse)(CentralSceneCCConfigurationReport)];
516
+ let _classDescriptor;
517
+ let _classExtraInitializers = [];
518
+ let _classThis;
519
+ let _classSuper = CentralSceneCC;
520
+ var CentralSceneCCConfigurationGet2 = class extends _classSuper {
521
+ static {
522
+ _classThis = this;
523
+ }
524
+ static {
525
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
526
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
527
+ CentralSceneCCConfigurationGet2 = _classThis = _classDescriptor.value;
528
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
529
+ __runInitializers(_classThis, _classExtraInitializers);
530
+ }
531
+ };
532
+ return CentralSceneCCConfigurationGet2 = _classThis;
533
+ })();
534
+ let CentralSceneCCConfigurationSet = (() => {
535
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.CentralSceneCommand.ConfigurationSet), (0, import_CommandClassDecorators.useSupervision)()];
536
+ let _classDescriptor;
537
+ let _classExtraInitializers = [];
538
+ let _classThis;
539
+ let _classSuper = CentralSceneCC;
540
+ var CentralSceneCCConfigurationSet2 = class extends _classSuper {
541
+ static {
542
+ _classThis = this;
543
+ }
544
+ static {
545
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
546
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
547
+ CentralSceneCCConfigurationSet2 = _classThis = _classDescriptor.value;
548
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
549
+ __runInitializers(_classThis, _classExtraInitializers);
550
+ }
551
+ constructor(options) {
552
+ super(options);
553
+ this.slowRefresh = options.slowRefresh;
554
+ }
555
+ static from(_raw, _ctx) {
556
+ throw new import_safe.ZWaveError(`${this.name}: deserialization not implemented`, import_safe.ZWaveErrorCodes.Deserialization_NotImplemented);
557
+ }
558
+ slowRefresh;
559
+ serialize(ctx) {
560
+ this.payload = import_safe2.Bytes.from([this.slowRefresh ? 128 : 0]);
561
+ return super.serialize(ctx);
562
+ }
563
+ toLogEntry(ctx) {
564
+ return {
565
+ ...super.toLogEntry(ctx),
566
+ message: { "slow refresh": this.slowRefresh }
567
+ };
568
+ }
569
+ };
570
+ return CentralSceneCCConfigurationSet2 = _classThis;
571
+ })();
437
572
  // Annotate the CommonJS export names for ESM import in node:
438
573
  0 && (module.exports = {
439
574
  CentralSceneCC,