@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
@@ -38,13 +38,45 @@ var import_CommandClass = require("../lib/CommandClass.js");
38
38
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
39
39
  var import_Values = require("../lib/Values.js");
40
40
  var import_Types = require("../lib/_Types.js");
41
- var __decorate = function(decorators, target, key, desc) {
42
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44
- 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;
45
- return c > 3 && r && Object.defineProperty(target, key, r), r;
41
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
42
+ function accept(f) {
43
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
44
+ return f;
45
+ }
46
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
47
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
48
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
49
+ var _, done = false;
50
+ for (var i = decorators.length - 1; i >= 0; i--) {
51
+ var context = {};
52
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
53
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
54
+ context.addInitializer = function(f) {
55
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
56
+ extraInitializers.push(accept(f || null));
57
+ };
58
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
59
+ if (kind === "accessor") {
60
+ if (result === void 0) continue;
61
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
62
+ if (_ = accept(result.get)) descriptor.get = _;
63
+ if (_ = accept(result.set)) descriptor.set = _;
64
+ if (_ = accept(result.init)) initializers.unshift(_);
65
+ } else if (_ = accept(result)) {
66
+ if (kind === "field") initializers.unshift(_);
67
+ else descriptor[key] = _;
68
+ }
69
+ }
70
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
71
+ done = true;
72
+ };
73
+ var __runInitializers = function(thisArg, initializers, value) {
74
+ var useValue = arguments.length > 2;
75
+ for (var i = 0; i < initializers.length; i++) {
76
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
77
+ }
78
+ return useValue ? value : void 0;
46
79
  };
47
- var WindowCoveringCCSupportedReport_1, WindowCoveringCCReport_1, WindowCoveringCCGet_1, WindowCoveringCCSet_1, WindowCoveringCCStartLevelChange_1, WindowCoveringCCStopLevelChange_1;
48
80
  function __assertType(argName, typeName, boundHasError) {
49
81
  const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
50
82
  if (boundHasError()) {
@@ -249,517 +281,633 @@ const WindowCoveringCCValues = Object.freeze({
249
281
  )
250
282
  })
251
283
  });
252
- let WindowCoveringCCAPI = class WindowCoveringCCAPI2 extends import_API.CCAPI {
253
- supportsCommand(cmd) {
254
- switch (cmd) {
255
- case import_Types.WindowCoveringCommand.Get:
256
- case import_Types.WindowCoveringCommand.Set:
257
- case import_Types.WindowCoveringCommand.SupportedGet:
258
- case import_Types.WindowCoveringCommand.StartLevelChange:
259
- case import_Types.WindowCoveringCommand.StopLevelChange:
260
- return true;
261
- }
262
- return super.supportsCommand(cmd);
263
- }
264
- get [import_API.SET_VALUE]() {
265
- return async function({ property, propertyKey }, value, options) {
284
+ let WindowCoveringCCAPI = (() => {
285
+ let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses["Window Covering"])];
286
+ let _classDescriptor;
287
+ let _classExtraInitializers = [];
288
+ let _classThis;
289
+ let _classSuper = import_API.CCAPI;
290
+ var WindowCoveringCCAPI2 = class extends _classSuper {
291
+ static {
292
+ _classThis = this;
293
+ }
294
+ static {
295
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
296
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
297
+ WindowCoveringCCAPI2 = _classThis = _classDescriptor.value;
298
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
299
+ __runInitializers(_classThis, _classExtraInitializers);
300
+ }
301
+ supportsCommand(cmd) {
302
+ switch (cmd) {
303
+ case import_Types.WindowCoveringCommand.Get:
304
+ case import_Types.WindowCoveringCommand.Set:
305
+ case import_Types.WindowCoveringCommand.SupportedGet:
306
+ case import_Types.WindowCoveringCommand.StartLevelChange:
307
+ case import_Types.WindowCoveringCommand.StopLevelChange:
308
+ return true;
309
+ }
310
+ return super.supportsCommand(cmd);
311
+ }
312
+ get [import_API.SET_VALUE]() {
313
+ return async function({ property, propertyKey }, value, options) {
314
+ const valueId = {
315
+ commandClass: this.ccId,
316
+ property,
317
+ propertyKey
318
+ };
319
+ if (WindowCoveringCCValues.targetValue.is(valueId)) {
320
+ if (typeof propertyKey !== "number" || propertyKey % 2 === 0) {
321
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
322
+ }
323
+ if (typeof value !== "number") {
324
+ (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
325
+ }
326
+ const parameter = propertyKey;
327
+ const duration = import_core.Duration.from(options?.transitionDuration);
328
+ return this.set([{ parameter, value }], duration);
329
+ } else if (WindowCoveringCCValues.levelChangeUp.is(valueId) || WindowCoveringCCValues.levelChangeDown.is(valueId)) {
330
+ if (typeof value !== "boolean") {
331
+ (0, import_API.throwWrongValueType)(this.ccId, property, "boolean", typeof value);
332
+ }
333
+ const parameter = propertyKey;
334
+ const direction = WindowCoveringCCValues.levelChangeUp.is(valueId) ? "up" : "down";
335
+ if (value) {
336
+ const duration = import_core.Duration.from(options?.transitionDuration);
337
+ return this.startLevelChange(parameter, direction, duration);
338
+ } else {
339
+ return this.stopLevelChange(parameter);
340
+ }
341
+ } else {
342
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
343
+ }
344
+ };
345
+ }
346
+ [import_API.SET_VALUE_HOOKS] = ({ property, propertyKey }, value, options) => {
266
347
  const valueId = {
267
348
  commandClass: this.ccId,
268
349
  property,
269
350
  propertyKey
270
351
  };
271
352
  if (WindowCoveringCCValues.targetValue.is(valueId)) {
272
- if (typeof propertyKey !== "number" || propertyKey % 2 === 0) {
273
- (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
274
- }
275
- if (typeof value !== "number") {
276
- (0, import_API.throwWrongValueType)(this.ccId, property, "number", typeof value);
277
- }
353
+ if (typeof propertyKey !== "number")
354
+ return;
278
355
  const parameter = propertyKey;
279
356
  const duration = import_core.Duration.from(options?.transitionDuration);
280
- return this.set([{ parameter, value }], duration);
281
- } else if (WindowCoveringCCValues.levelChangeUp.is(valueId) || WindowCoveringCCValues.levelChangeDown.is(valueId)) {
282
- if (typeof value !== "boolean") {
283
- (0, import_API.throwWrongValueType)(this.ccId, property, "boolean", typeof value);
284
- }
285
- const parameter = propertyKey;
286
- const direction = WindowCoveringCCValues.levelChangeUp.is(valueId) ? "up" : "down";
287
- if (value) {
288
- const duration = import_core.Duration.from(options?.transitionDuration);
289
- return this.startLevelChange(parameter, direction, duration);
290
- } else {
291
- return this.stopLevelChange(parameter);
292
- }
293
- } else {
294
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
295
- }
296
- };
297
- }
298
- [import_API.SET_VALUE_HOOKS] = ({ property, propertyKey }, value, options) => {
299
- const valueId = {
300
- commandClass: this.ccId,
301
- property,
302
- propertyKey
303
- };
304
- if (WindowCoveringCCValues.targetValue.is(valueId)) {
305
- if (typeof propertyKey !== "number")
306
- return;
307
- const parameter = propertyKey;
308
- const duration = import_core.Duration.from(options?.transitionDuration);
309
- const currentValueValueId = WindowCoveringCCValues.currentValue(parameter).endpoint(this.endpoint.index);
310
- return {
311
- // Window Covering commands may take some time to be executed.
312
- // Therefore we try to supervise the command execution and delay the
313
- // optimistic update until the final result is received.
314
- supervisionDelayedUpdates: true,
315
- supervisionOnSuccess: async () => {
316
- if (typeof value === "number" && value >= 0 && value <= 99) {
317
- this.tryGetValueDB()?.setValue(currentValueValueId, value);
318
- } else if (value === 255) {
357
+ const currentValueValueId = WindowCoveringCCValues.currentValue(parameter).endpoint(this.endpoint.index);
358
+ return {
359
+ // Window Covering commands may take some time to be executed.
360
+ // Therefore we try to supervise the command execution and delay the
361
+ // optimistic update until the final result is received.
362
+ supervisionDelayedUpdates: true,
363
+ supervisionOnSuccess: async () => {
364
+ if (typeof value === "number" && value >= 0 && value <= 99) {
365
+ this.tryGetValueDB()?.setValue(currentValueValueId, value);
366
+ } else if (value === 255) {
367
+ try {
368
+ await this.get(parameter);
369
+ } catch {
370
+ }
371
+ }
372
+ },
373
+ supervisionOnFailure: async () => {
319
374
  try {
320
375
  await this.get(parameter);
321
376
  } catch {
322
377
  }
323
- }
324
- },
325
- supervisionOnFailure: async () => {
326
- try {
327
- await this.get(parameter);
328
- } catch {
329
- }
330
- },
331
- optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {
332
- if (typeof value === "number" && value >= 0 && value <= 99) {
333
- if (this.isSinglecast()) {
334
- this.tryGetValueDB()?.setValue(currentValueValueId, value);
335
- } else if (this.isMulticast()) {
336
- const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
337
- for (const node of affectedNodes) {
338
- this.host.tryGetValueDB(node.id)?.setValue(currentValueValueId, value);
378
+ },
379
+ optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {
380
+ if (typeof value === "number" && value >= 0 && value <= 99) {
381
+ if (this.isSinglecast()) {
382
+ this.tryGetValueDB()?.setValue(currentValueValueId, value);
383
+ } else if (this.isMulticast()) {
384
+ const affectedNodes = this.endpoint.node.physicalNodes.filter((node) => node.getEndpoint(this.endpoint.index)?.supportsCC(this.ccId));
385
+ for (const node of affectedNodes) {
386
+ this.host.tryGetValueDB(node.id)?.setValue(currentValueValueId, value);
387
+ }
339
388
  }
340
389
  }
390
+ },
391
+ verifyChanges: () => {
392
+ if (this.isSinglecast()) {
393
+ this.schedulePoll(currentValueValueId, value, {
394
+ duration
395
+ });
396
+ } else {
397
+ }
341
398
  }
342
- },
343
- verifyChanges: () => {
344
- if (this.isSinglecast()) {
345
- this.schedulePoll(currentValueValueId, value, {
346
- duration
347
- });
348
- } else {
349
- }
399
+ };
400
+ }
401
+ };
402
+ get [import_API.POLL_VALUE]() {
403
+ return async function({ property, propertyKey }) {
404
+ switch (property) {
405
+ case "currentValue":
406
+ case "targetValue":
407
+ case "duration":
408
+ if (propertyKey == void 0) {
409
+ (0, import_API.throwMissingPropertyKey)(this.ccId, property);
410
+ } else if (typeof propertyKey !== "number") {
411
+ (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
412
+ }
413
+ return (await this.get(propertyKey))?.[property];
414
+ default:
415
+ (0, import_API.throwUnsupportedProperty)(this.ccId, property);
350
416
  }
351
417
  };
352
418
  }
353
- };
354
- get [import_API.POLL_VALUE]() {
355
- return async function({ property, propertyKey }) {
356
- switch (property) {
357
- case "currentValue":
358
- case "targetValue":
359
- case "duration":
360
- if (propertyKey == void 0) {
361
- (0, import_API.throwMissingPropertyKey)(this.ccId, property);
362
- } else if (typeof propertyKey !== "number") {
363
- (0, import_API.throwUnsupportedPropertyKey)(this.ccId, property, propertyKey);
364
- }
365
- return (await this.get(propertyKey))?.[property];
366
- default:
367
- (0, import_API.throwUnsupportedProperty)(this.ccId, property);
419
+ async getSupported() {
420
+ this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.SupportedGet);
421
+ const cc = new WindowCoveringCCSupportedGet({
422
+ nodeId: this.endpoint.nodeId,
423
+ endpointIndex: this.endpoint.index
424
+ });
425
+ const response = await this.host.sendCommand(cc, this.commandOptions);
426
+ return response?.supportedParameters;
427
+ }
428
+ async get(parameter) {
429
+ __assertType("parameter", "WindowCoveringParameter", __assertType__WindowCoveringParameter.bind(void 0, parameter));
430
+ this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.Get);
431
+ const cc = new WindowCoveringCCGet({
432
+ nodeId: this.endpoint.nodeId,
433
+ endpointIndex: this.endpoint.index,
434
+ parameter
435
+ });
436
+ const response = await this.host.sendCommand(cc, this.commandOptions);
437
+ if (response) {
438
+ return (0, import_safe2.pick)(response, ["currentValue", "targetValue", "duration"]);
368
439
  }
369
- };
370
- }
371
- async getSupported() {
372
- this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.SupportedGet);
373
- const cc = new WindowCoveringCCSupportedGet({
374
- nodeId: this.endpoint.nodeId,
375
- endpointIndex: this.endpoint.index
376
- });
377
- const response = await this.host.sendCommand(cc, this.commandOptions);
378
- return response?.supportedParameters;
379
- }
380
- async get(parameter) {
381
- __assertType("parameter", "WindowCoveringParameter", __assertType__WindowCoveringParameter.bind(void 0, parameter));
382
- this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.Get);
383
- const cc = new WindowCoveringCCGet({
384
- nodeId: this.endpoint.nodeId,
385
- endpointIndex: this.endpoint.index,
386
- parameter
387
- });
388
- const response = await this.host.sendCommand(cc, this.commandOptions);
389
- if (response) {
390
- return (0, import_safe2.pick)(response, ["currentValue", "targetValue", "duration"]);
391
440
  }
392
- }
393
- async set(targetValues, duration) {
394
- __assertType("targetValues", void 0, __assertType__sa__2_ea_2.bind(void 0, targetValues));
395
- __assertType("duration", void 0, __assertType__optional_su__string__2_eu.bind(void 0, duration));
396
- this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.StartLevelChange);
397
- const cc = new WindowCoveringCCSet({
398
- nodeId: this.endpoint.nodeId,
399
- endpointIndex: this.endpoint.index,
400
- targetValues,
401
- duration
402
- });
403
- return this.host.sendCommand(cc, this.commandOptions);
404
- }
405
- async startLevelChange(parameter, direction, duration) {
406
- __assertType("parameter", "WindowCoveringParameter", __assertType__WindowCoveringParameter.bind(void 0, parameter));
407
- __assertType("direction", void 0, __assertType__su__1__2_eu.bind(void 0, direction));
408
- __assertType("duration", void 0, __assertType__optional_su__string__2_eu.bind(void 0, duration));
409
- this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.StartLevelChange);
410
- const cc = new WindowCoveringCCStartLevelChange({
411
- nodeId: this.endpoint.nodeId,
412
- endpointIndex: this.endpoint.index,
413
- parameter,
414
- direction,
415
- duration
416
- });
417
- return this.host.sendCommand(cc, this.commandOptions);
418
- }
419
- async stopLevelChange(parameter) {
420
- __assertType("parameter", "WindowCoveringParameter", __assertType__WindowCoveringParameter.bind(void 0, parameter));
421
- this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.StopLevelChange);
422
- const cc = new WindowCoveringCCStopLevelChange({
423
- nodeId: this.endpoint.nodeId,
424
- endpointIndex: this.endpoint.index,
425
- parameter
426
- });
427
- return this.host.sendCommand(cc, this.commandOptions);
428
- }
429
- };
430
- WindowCoveringCCAPI = __decorate([
431
- (0, import_CommandClassDecorators.API)(import_core.CommandClasses["Window Covering"])
432
- ], WindowCoveringCCAPI);
433
- let WindowCoveringCC = class WindowCoveringCC2 extends import_CommandClass.CommandClass {
434
- async interview(ctx) {
435
- const node = this.getNode(ctx);
436
- const endpoint = this.getEndpoint(ctx);
437
- const api = import_API.CCAPI.create(import_core.CommandClasses["Window Covering"], ctx, endpoint).withOptions({
438
- priority: import_core.MessagePriority.NodeQuery
439
- });
440
- ctx.logNode(node.id, {
441
- endpoint: this.endpointIndex,
442
- message: `Interviewing ${this.ccName}...`,
443
- direction: "none"
444
- });
445
- ctx.logNode(node.id, {
446
- endpoint: this.endpointIndex,
447
- message: "querying supported window covering parameters...",
448
- direction: "outbound"
449
- });
450
- const supported = await api.getSupported();
451
- if (supported?.length) {
452
- const logMessage = `supported window covering parameters:
453
- ${supported.map((p) => `\xB7 ${(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, p)}`).join("\n")}`;
441
+ async set(targetValues, duration) {
442
+ __assertType("targetValues", void 0, __assertType__sa__2_ea_2.bind(void 0, targetValues));
443
+ __assertType("duration", void 0, __assertType__optional_su__string__2_eu.bind(void 0, duration));
444
+ this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.StartLevelChange);
445
+ const cc = new WindowCoveringCCSet({
446
+ nodeId: this.endpoint.nodeId,
447
+ endpointIndex: this.endpoint.index,
448
+ targetValues,
449
+ duration
450
+ });
451
+ return this.host.sendCommand(cc, this.commandOptions);
452
+ }
453
+ async startLevelChange(parameter, direction, duration) {
454
+ __assertType("parameter", "WindowCoveringParameter", __assertType__WindowCoveringParameter.bind(void 0, parameter));
455
+ __assertType("direction", void 0, __assertType__su__1__2_eu.bind(void 0, direction));
456
+ __assertType("duration", void 0, __assertType__optional_su__string__2_eu.bind(void 0, duration));
457
+ this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.StartLevelChange);
458
+ const cc = new WindowCoveringCCStartLevelChange({
459
+ nodeId: this.endpoint.nodeId,
460
+ endpointIndex: this.endpoint.index,
461
+ parameter,
462
+ direction,
463
+ duration
464
+ });
465
+ return this.host.sendCommand(cc, this.commandOptions);
466
+ }
467
+ async stopLevelChange(parameter) {
468
+ __assertType("parameter", "WindowCoveringParameter", __assertType__WindowCoveringParameter.bind(void 0, parameter));
469
+ this.assertSupportsCommand(import_Types.WindowCoveringCommand, import_Types.WindowCoveringCommand.StopLevelChange);
470
+ const cc = new WindowCoveringCCStopLevelChange({
471
+ nodeId: this.endpoint.nodeId,
472
+ endpointIndex: this.endpoint.index,
473
+ parameter
474
+ });
475
+ return this.host.sendCommand(cc, this.commandOptions);
476
+ }
477
+ };
478
+ return WindowCoveringCCAPI2 = _classThis;
479
+ })();
480
+ let WindowCoveringCC = (() => {
481
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Window Covering"]), (0, import_CommandClassDecorators.implementedVersion)(1), (0, import_CommandClassDecorators.ccValues)(WindowCoveringCCValues)];
482
+ let _classDescriptor;
483
+ let _classExtraInitializers = [];
484
+ let _classThis;
485
+ let _classSuper = import_CommandClass.CommandClass;
486
+ var WindowCoveringCC2 = class extends _classSuper {
487
+ static {
488
+ _classThis = this;
489
+ }
490
+ static {
491
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
492
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
493
+ WindowCoveringCC2 = _classThis = _classDescriptor.value;
494
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
495
+ __runInitializers(_classThis, _classExtraInitializers);
496
+ }
497
+ async interview(ctx) {
498
+ const node = this.getNode(ctx);
499
+ const endpoint = this.getEndpoint(ctx);
500
+ const api = import_API.CCAPI.create(import_core.CommandClasses["Window Covering"], ctx, endpoint).withOptions({
501
+ priority: import_core.MessagePriority.NodeQuery
502
+ });
454
503
  ctx.logNode(node.id, {
455
504
  endpoint: this.endpointIndex,
456
- message: logMessage,
457
- direction: "inbound"
505
+ message: `Interviewing ${this.ccName}...`,
506
+ direction: "none"
458
507
  });
459
- for (const param of supported) {
460
- this.setMetadata(ctx, WindowCoveringCCValues.currentValue(param));
461
- this.setMetadata(ctx, WindowCoveringCCValues.targetValue(param));
462
- this.setMetadata(ctx, WindowCoveringCCValues.duration(param));
463
- this.setMetadata(ctx, WindowCoveringCCValues.levelChangeUp(param));
464
- this.setMetadata(ctx, WindowCoveringCCValues.levelChangeDown(param));
465
- if (param % 2 === 1) {
466
- ctx.logNode(node.id, {
467
- endpoint: this.endpointIndex,
468
- message: `querying position for parameter ${(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, param)}...`,
469
- direction: "outbound"
470
- });
471
- await api.get(param);
508
+ ctx.logNode(node.id, {
509
+ endpoint: this.endpointIndex,
510
+ message: "querying supported window covering parameters...",
511
+ direction: "outbound"
512
+ });
513
+ const supported = await api.getSupported();
514
+ if (supported?.length) {
515
+ const logMessage = `supported window covering parameters:
516
+ ${supported.map((p) => `\xB7 ${(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, p)}`).join("\n")}`;
517
+ ctx.logNode(node.id, {
518
+ endpoint: this.endpointIndex,
519
+ message: logMessage,
520
+ direction: "inbound"
521
+ });
522
+ for (const param of supported) {
523
+ this.setMetadata(ctx, WindowCoveringCCValues.currentValue(param));
524
+ this.setMetadata(ctx, WindowCoveringCCValues.targetValue(param));
525
+ this.setMetadata(ctx, WindowCoveringCCValues.duration(param));
526
+ this.setMetadata(ctx, WindowCoveringCCValues.levelChangeUp(param));
527
+ this.setMetadata(ctx, WindowCoveringCCValues.levelChangeDown(param));
528
+ if (param % 2 === 1) {
529
+ ctx.logNode(node.id, {
530
+ endpoint: this.endpointIndex,
531
+ message: `querying position for parameter ${(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, param)}...`,
532
+ direction: "outbound"
533
+ });
534
+ await api.get(param);
535
+ }
472
536
  }
473
537
  }
538
+ this.setInterviewComplete(ctx, true);
474
539
  }
475
- this.setInterviewComplete(ctx, true);
476
- }
477
- translatePropertyKey(ctx, property, propertyKey) {
478
- if (typeof propertyKey === "number") {
479
- return (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, propertyKey);
540
+ translatePropertyKey(ctx, property, propertyKey) {
541
+ if (typeof propertyKey === "number") {
542
+ return (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, propertyKey);
543
+ }
544
+ return super.translatePropertyKey(ctx, property, propertyKey);
480
545
  }
481
- return super.translatePropertyKey(ctx, property, propertyKey);
482
- }
483
- };
484
- WindowCoveringCC = __decorate([
485
- (0, import_CommandClassDecorators.commandClass)(import_core.CommandClasses["Window Covering"]),
486
- (0, import_CommandClassDecorators.implementedVersion)(1),
487
- (0, import_CommandClassDecorators.ccValues)(WindowCoveringCCValues)
488
- ], WindowCoveringCC);
489
- let WindowCoveringCCSupportedReport = WindowCoveringCCSupportedReport_1 = class WindowCoveringCCSupportedReport2 extends WindowCoveringCC {
490
- constructor(options) {
491
- super(options);
492
- this.supportedParameters = options.supportedParameters;
493
- }
494
- static from(raw, ctx) {
495
- (0, import_core.validatePayload)(raw.payload.length >= 1);
496
- const numBitmaskBytes = raw.payload[0] & 15;
497
- (0, import_core.validatePayload)(raw.payload.length >= 1 + numBitmaskBytes);
498
- const bitmask = raw.payload.subarray(1, 1 + numBitmaskBytes);
499
- const supportedParameters = (0, import_core.parseBitMask)(bitmask, import_Types.WindowCoveringParameter["Outbound Left (no position)"]);
500
- return new WindowCoveringCCSupportedReport_1({
501
- nodeId: ctx.sourceNodeId,
502
- supportedParameters
503
- });
504
- }
505
- supportedParameters;
506
- serialize(ctx) {
507
- const bitmask = (0, import_core.encodeBitMask)(this.supportedParameters, void 0, import_Types.WindowCoveringParameter["Outbound Left (no position)"]).subarray(0, 15);
508
- const numBitmaskBytes = bitmask.length & 15;
509
- this.payload = import_safe.Bytes.concat([
510
- import_safe.Bytes.from([numBitmaskBytes]),
511
- bitmask.subarray(0, numBitmaskBytes)
512
- ]);
513
- return super.serialize(ctx);
514
- }
515
- toLogEntry(ctx) {
516
- return {
517
- ...super.toLogEntry(ctx),
518
- message: {
519
- "supported parameters": this.supportedParameters.map((p) => `
546
+ };
547
+ return WindowCoveringCC2 = _classThis;
548
+ })();
549
+ let WindowCoveringCCSupportedReport = (() => {
550
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedParameters", WindowCoveringCCValues.supportedParameters)];
551
+ let _classDescriptor;
552
+ let _classExtraInitializers = [];
553
+ let _classThis;
554
+ let _classSuper = WindowCoveringCC;
555
+ var WindowCoveringCCSupportedReport2 = class extends _classSuper {
556
+ static {
557
+ _classThis = this;
558
+ }
559
+ static {
560
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
561
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
562
+ WindowCoveringCCSupportedReport2 = _classThis = _classDescriptor.value;
563
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
564
+ __runInitializers(_classThis, _classExtraInitializers);
565
+ }
566
+ constructor(options) {
567
+ super(options);
568
+ this.supportedParameters = options.supportedParameters;
569
+ }
570
+ static from(raw, ctx) {
571
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
572
+ const numBitmaskBytes = raw.payload[0] & 15;
573
+ (0, import_core.validatePayload)(raw.payload.length >= 1 + numBitmaskBytes);
574
+ const bitmask = raw.payload.subarray(1, 1 + numBitmaskBytes);
575
+ const supportedParameters = (0, import_core.parseBitMask)(bitmask, import_Types.WindowCoveringParameter["Outbound Left (no position)"]);
576
+ return new this({
577
+ nodeId: ctx.sourceNodeId,
578
+ supportedParameters
579
+ });
580
+ }
581
+ supportedParameters;
582
+ serialize(ctx) {
583
+ const bitmask = (0, import_core.encodeBitMask)(this.supportedParameters, void 0, import_Types.WindowCoveringParameter["Outbound Left (no position)"]).subarray(0, 15);
584
+ const numBitmaskBytes = bitmask.length & 15;
585
+ this.payload = import_safe.Bytes.concat([
586
+ import_safe.Bytes.from([numBitmaskBytes]),
587
+ bitmask.subarray(0, numBitmaskBytes)
588
+ ]);
589
+ return super.serialize(ctx);
590
+ }
591
+ toLogEntry(ctx) {
592
+ return {
593
+ ...super.toLogEntry(ctx),
594
+ message: {
595
+ "supported parameters": this.supportedParameters.map((p) => `
520
596
  \xB7 ${(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, p)}`).join("")
521
- }
522
- };
523
- }
524
- };
525
- __decorate([
526
- (0, import_CommandClassDecorators.ccValue)(WindowCoveringCCValues.supportedParameters)
527
- ], WindowCoveringCCSupportedReport.prototype, "supportedParameters", void 0);
528
- WindowCoveringCCSupportedReport = WindowCoveringCCSupportedReport_1 = __decorate([
529
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.SupportedReport)
530
- ], WindowCoveringCCSupportedReport);
531
- let WindowCoveringCCSupportedGet = class WindowCoveringCCSupportedGet2 extends WindowCoveringCC {
532
- };
533
- WindowCoveringCCSupportedGet = __decorate([
534
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.SupportedGet),
535
- (0, import_CommandClassDecorators.expectedCCResponse)(WindowCoveringCCSupportedReport)
536
- ], WindowCoveringCCSupportedGet);
537
- let WindowCoveringCCReport = WindowCoveringCCReport_1 = class WindowCoveringCCReport2 extends WindowCoveringCC {
538
- constructor(options) {
539
- super(options);
540
- this.parameter = options.parameter;
541
- this.currentValue = options.currentValue;
542
- this.targetValue = options.targetValue;
543
- this.duration = options.duration;
544
- }
545
- static from(raw, ctx) {
546
- (0, import_core.validatePayload)(raw.payload.length >= 4);
547
- const parameter = raw.payload[0];
548
- const currentValue = raw.payload[1];
549
- const targetValue = raw.payload[2];
550
- const duration = import_core.Duration.parseReport(raw.payload[3]) ?? import_core.Duration.unknown();
551
- return new WindowCoveringCCReport_1({
552
- nodeId: ctx.sourceNodeId,
553
- parameter,
554
- currentValue,
555
- targetValue,
556
- duration
557
- });
558
- }
559
- parameter;
560
- currentValue;
561
- targetValue;
562
- duration;
563
- toLogEntry(ctx) {
564
- return {
565
- ...super.toLogEntry(ctx),
566
- message: {
567
- parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter),
568
- "current value": this.currentValue,
569
- "target value": this.targetValue,
570
- duration: this.duration.toString()
571
- }
572
- };
573
- }
574
- };
575
- __decorate([
576
- (0, import_CommandClassDecorators.ccValue)(WindowCoveringCCValues.currentValue, (self) => [self.parameter])
577
- ], WindowCoveringCCReport.prototype, "currentValue", void 0);
578
- __decorate([
579
- (0, import_CommandClassDecorators.ccValue)(WindowCoveringCCValues.targetValue, (self) => [self.parameter])
580
- ], WindowCoveringCCReport.prototype, "targetValue", void 0);
581
- __decorate([
582
- (0, import_CommandClassDecorators.ccValue)(WindowCoveringCCValues.duration, (self) => [self.parameter])
583
- ], WindowCoveringCCReport.prototype, "duration", void 0);
584
- WindowCoveringCCReport = WindowCoveringCCReport_1 = __decorate([
585
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.Report)
586
- ], WindowCoveringCCReport);
597
+ }
598
+ };
599
+ }
600
+ };
601
+ return WindowCoveringCCSupportedReport2 = _classThis;
602
+ })();
603
+ let WindowCoveringCCSupportedGet = (() => {
604
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.SupportedGet), (0, import_CommandClassDecorators.expectedCCResponse)(WindowCoveringCCSupportedReport)];
605
+ let _classDescriptor;
606
+ let _classExtraInitializers = [];
607
+ let _classThis;
608
+ let _classSuper = WindowCoveringCC;
609
+ var WindowCoveringCCSupportedGet2 = class extends _classSuper {
610
+ static {
611
+ _classThis = this;
612
+ }
613
+ static {
614
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
615
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
616
+ WindowCoveringCCSupportedGet2 = _classThis = _classDescriptor.value;
617
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
618
+ __runInitializers(_classThis, _classExtraInitializers);
619
+ }
620
+ };
621
+ return WindowCoveringCCSupportedGet2 = _classThis;
622
+ })();
623
+ let WindowCoveringCCReport = (() => {
624
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("currentValue", WindowCoveringCCValues.currentValue, (self) => [self.parameter]), (0, import_CommandClassDecorators.ccValueProperty)("targetValue", WindowCoveringCCValues.targetValue, (self) => [self.parameter]), (0, import_CommandClassDecorators.ccValueProperty)("duration", WindowCoveringCCValues.duration, (self) => [self.parameter])];
625
+ let _classDescriptor;
626
+ let _classExtraInitializers = [];
627
+ let _classThis;
628
+ let _classSuper = WindowCoveringCC;
629
+ var WindowCoveringCCReport2 = class extends _classSuper {
630
+ static {
631
+ _classThis = this;
632
+ }
633
+ static {
634
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
635
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
636
+ WindowCoveringCCReport2 = _classThis = _classDescriptor.value;
637
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
638
+ __runInitializers(_classThis, _classExtraInitializers);
639
+ }
640
+ constructor(options) {
641
+ super(options);
642
+ this.parameter = options.parameter;
643
+ this.currentValue = options.currentValue;
644
+ this.targetValue = options.targetValue;
645
+ this.duration = options.duration;
646
+ }
647
+ static from(raw, ctx) {
648
+ (0, import_core.validatePayload)(raw.payload.length >= 4);
649
+ const parameter = raw.payload[0];
650
+ const currentValue = raw.payload[1];
651
+ const targetValue = raw.payload[2];
652
+ const duration = import_core.Duration.parseReport(raw.payload[3]) ?? import_core.Duration.unknown();
653
+ return new this({
654
+ nodeId: ctx.sourceNodeId,
655
+ parameter,
656
+ currentValue,
657
+ targetValue,
658
+ duration
659
+ });
660
+ }
661
+ parameter;
662
+ currentValue;
663
+ targetValue;
664
+ duration;
665
+ toLogEntry(ctx) {
666
+ return {
667
+ ...super.toLogEntry(ctx),
668
+ message: {
669
+ parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter),
670
+ "current value": this.currentValue,
671
+ "target value": this.targetValue,
672
+ duration: this.duration.toString()
673
+ }
674
+ };
675
+ }
676
+ };
677
+ return WindowCoveringCCReport2 = _classThis;
678
+ })();
587
679
  function testResponseForWindowCoveringGet(sent, received) {
588
680
  return received.parameter === sent.parameter;
589
681
  }
590
- let WindowCoveringCCGet = WindowCoveringCCGet_1 = class WindowCoveringCCGet2 extends WindowCoveringCC {
591
- constructor(options) {
592
- super(options);
593
- this.parameter = options.parameter;
594
- }
595
- static from(raw, ctx) {
596
- (0, import_core.validatePayload)(raw.payload.length >= 1);
597
- const parameter = raw.payload[0];
598
- return new WindowCoveringCCGet_1({
599
- nodeId: ctx.sourceNodeId,
600
- parameter
601
- });
602
- }
603
- parameter;
604
- serialize(ctx) {
605
- this.payload = import_safe.Bytes.from([this.parameter]);
606
- return super.serialize(ctx);
607
- }
608
- toLogEntry(ctx) {
609
- return {
610
- ...super.toLogEntry(ctx),
611
- message: {
612
- parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter)
682
+ let WindowCoveringCCGet = (() => {
683
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.Get), (0, import_CommandClassDecorators.expectedCCResponse)(WindowCoveringCCReport, testResponseForWindowCoveringGet)];
684
+ let _classDescriptor;
685
+ let _classExtraInitializers = [];
686
+ let _classThis;
687
+ let _classSuper = WindowCoveringCC;
688
+ var WindowCoveringCCGet2 = class extends _classSuper {
689
+ static {
690
+ _classThis = this;
691
+ }
692
+ static {
693
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
694
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
695
+ WindowCoveringCCGet2 = _classThis = _classDescriptor.value;
696
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
697
+ __runInitializers(_classThis, _classExtraInitializers);
698
+ }
699
+ constructor(options) {
700
+ super(options);
701
+ this.parameter = options.parameter;
702
+ }
703
+ static from(raw, ctx) {
704
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
705
+ const parameter = raw.payload[0];
706
+ return new this({
707
+ nodeId: ctx.sourceNodeId,
708
+ parameter
709
+ });
710
+ }
711
+ parameter;
712
+ serialize(ctx) {
713
+ this.payload = import_safe.Bytes.from([this.parameter]);
714
+ return super.serialize(ctx);
715
+ }
716
+ toLogEntry(ctx) {
717
+ return {
718
+ ...super.toLogEntry(ctx),
719
+ message: {
720
+ parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter)
721
+ }
722
+ };
723
+ }
724
+ };
725
+ return WindowCoveringCCGet2 = _classThis;
726
+ })();
727
+ let WindowCoveringCCSet = (() => {
728
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.Set), (0, import_CommandClassDecorators.useSupervision)()];
729
+ let _classDescriptor;
730
+ let _classExtraInitializers = [];
731
+ let _classThis;
732
+ let _classSuper = WindowCoveringCC;
733
+ var WindowCoveringCCSet2 = class extends _classSuper {
734
+ static {
735
+ _classThis = this;
736
+ }
737
+ static {
738
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
739
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
740
+ WindowCoveringCCSet2 = _classThis = _classDescriptor.value;
741
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
742
+ __runInitializers(_classThis, _classExtraInitializers);
743
+ }
744
+ constructor(options) {
745
+ super(options);
746
+ this.targetValues = options.targetValues;
747
+ this.duration = import_core.Duration.from(options.duration);
748
+ }
749
+ static from(raw, ctx) {
750
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
751
+ const numEntries = raw.payload[0] & 31;
752
+ (0, import_core.validatePayload)(raw.payload.length >= 1 + numEntries * 2);
753
+ const targetValues = [];
754
+ for (let i = 0; i < numEntries; i++) {
755
+ const offset = 1 + i * 2;
756
+ targetValues.push({
757
+ parameter: raw.payload[offset],
758
+ value: raw.payload[offset + 1]
759
+ });
613
760
  }
614
- };
615
- }
616
- };
617
- WindowCoveringCCGet = WindowCoveringCCGet_1 = __decorate([
618
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.Get),
619
- (0, import_CommandClassDecorators.expectedCCResponse)(WindowCoveringCCReport, testResponseForWindowCoveringGet)
620
- ], WindowCoveringCCGet);
621
- let WindowCoveringCCSet = WindowCoveringCCSet_1 = class WindowCoveringCCSet2 extends WindowCoveringCC {
622
- constructor(options) {
623
- super(options);
624
- this.targetValues = options.targetValues;
625
- this.duration = import_core.Duration.from(options.duration);
626
- }
627
- static from(raw, ctx) {
628
- (0, import_core.validatePayload)(raw.payload.length >= 1);
629
- const numEntries = raw.payload[0] & 31;
630
- (0, import_core.validatePayload)(raw.payload.length >= 1 + numEntries * 2);
631
- const targetValues = [];
632
- for (let i = 0; i < numEntries; i++) {
633
- const offset = 1 + i * 2;
634
- targetValues.push({
635
- parameter: raw.payload[offset],
636
- value: raw.payload[offset + 1]
761
+ let duration;
762
+ if (raw.payload.length >= 2 + numEntries * 2) {
763
+ duration = import_core.Duration.parseSet(raw.payload[1 + numEntries * 2]);
764
+ }
765
+ return new this({
766
+ nodeId: ctx.sourceNodeId,
767
+ targetValues,
768
+ duration
637
769
  });
638
770
  }
639
- let duration;
640
- if (raw.payload.length >= 2 + numEntries * 2) {
641
- duration = import_core.Duration.parseSet(raw.payload[1 + numEntries * 2]);
771
+ targetValues;
772
+ duration;
773
+ serialize(ctx) {
774
+ const numEntries = this.targetValues.length & 31;
775
+ this.payload = new import_safe.Bytes(2 + numEntries * 2);
776
+ this.payload[0] = numEntries;
777
+ for (let i = 0; i < numEntries; i++) {
778
+ const offset = 1 + i * 2;
779
+ this.payload[offset] = this.targetValues[i].parameter;
780
+ this.payload[offset + 1] = this.targetValues[i].value;
781
+ }
782
+ this.payload[this.payload.length - 1] = (this.duration ?? import_core.Duration.default()).serializeSet();
783
+ return super.serialize(ctx);
642
784
  }
643
- return new WindowCoveringCCSet_1({
644
- nodeId: ctx.sourceNodeId,
645
- targetValues,
646
- duration
647
- });
648
- }
649
- targetValues;
650
- duration;
651
- serialize(ctx) {
652
- const numEntries = this.targetValues.length & 31;
653
- this.payload = new import_safe.Bytes(2 + numEntries * 2);
654
- this.payload[0] = numEntries;
655
- for (let i = 0; i < numEntries; i++) {
656
- const offset = 1 + i * 2;
657
- this.payload[offset] = this.targetValues[i].parameter;
658
- this.payload[offset + 1] = this.targetValues[i].value;
659
- }
660
- this.payload[this.payload.length - 1] = (this.duration ?? import_core.Duration.default()).serializeSet();
661
- return super.serialize(ctx);
662
- }
663
- toLogEntry(ctx) {
664
- const message = {};
665
- for (const { parameter, value } of this.targetValues) {
666
- message[(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, parameter)] = value;
785
+ toLogEntry(ctx) {
786
+ const message = {};
787
+ for (const { parameter, value } of this.targetValues) {
788
+ message[(0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, parameter)] = value;
789
+ }
790
+ if (this.duration) {
791
+ message.duration = this.duration.toString();
792
+ }
793
+ return {
794
+ ...super.toLogEntry(ctx),
795
+ message
796
+ };
667
797
  }
668
- if (this.duration) {
669
- message.duration = this.duration.toString();
798
+ };
799
+ return WindowCoveringCCSet2 = _classThis;
800
+ })();
801
+ let WindowCoveringCCStartLevelChange = (() => {
802
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.StartLevelChange), (0, import_CommandClassDecorators.useSupervision)()];
803
+ let _classDescriptor;
804
+ let _classExtraInitializers = [];
805
+ let _classThis;
806
+ let _classSuper = WindowCoveringCC;
807
+ var WindowCoveringCCStartLevelChange2 = class extends _classSuper {
808
+ static {
809
+ _classThis = this;
670
810
  }
671
- return {
672
- ...super.toLogEntry(ctx),
673
- message
674
- };
675
- }
676
- };
677
- WindowCoveringCCSet = WindowCoveringCCSet_1 = __decorate([
678
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.Set),
679
- (0, import_CommandClassDecorators.useSupervision)()
680
- ], WindowCoveringCCSet);
681
- let WindowCoveringCCStartLevelChange = WindowCoveringCCStartLevelChange_1 = class WindowCoveringCCStartLevelChange2 extends WindowCoveringCC {
682
- constructor(options) {
683
- super(options);
684
- this.parameter = options.parameter;
685
- this.direction = options.direction;
686
- this.duration = import_core.Duration.from(options.duration);
687
- }
688
- static from(raw, ctx) {
689
- (0, import_core.validatePayload)(raw.payload.length >= 2);
690
- const direction = !!(raw.payload[0] & 64) ? "down" : "up";
691
- const parameter = raw.payload[1];
692
- let duration;
693
- if (raw.payload.length >= 3) {
694
- duration = import_core.Duration.parseSet(raw.payload[2]);
695
- }
696
- return new WindowCoveringCCStartLevelChange_1({
697
- nodeId: ctx.sourceNodeId,
698
- direction,
699
- parameter,
700
- duration
701
- });
702
- }
703
- parameter;
704
- direction;
705
- duration;
706
- serialize(ctx) {
707
- this.payload = import_safe.Bytes.from([
708
- this.direction === "down" ? 64 : 0,
709
- this.parameter,
710
- (this.duration ?? import_core.Duration.default()).serializeSet()
711
- ]);
712
- return super.serialize(ctx);
713
- }
714
- toLogEntry(ctx) {
715
- const message = {
716
- parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter),
717
- direction: this.direction
718
- };
719
- if (this.duration) {
720
- message.duration = this.duration.toString();
811
+ static {
812
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
813
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
814
+ WindowCoveringCCStartLevelChange2 = _classThis = _classDescriptor.value;
815
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
816
+ __runInitializers(_classThis, _classExtraInitializers);
721
817
  }
722
- return {
723
- ...super.toLogEntry(ctx),
724
- message
725
- };
726
- }
727
- };
728
- WindowCoveringCCStartLevelChange = WindowCoveringCCStartLevelChange_1 = __decorate([
729
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.StartLevelChange),
730
- (0, import_CommandClassDecorators.useSupervision)()
731
- ], WindowCoveringCCStartLevelChange);
732
- let WindowCoveringCCStopLevelChange = WindowCoveringCCStopLevelChange_1 = class WindowCoveringCCStopLevelChange2 extends WindowCoveringCC {
733
- constructor(options) {
734
- super(options);
735
- this.parameter = options.parameter;
736
- }
737
- static from(raw, ctx) {
738
- (0, import_core.validatePayload)(raw.payload.length >= 1);
739
- const parameter = raw.payload[0];
740
- return new WindowCoveringCCStopLevelChange_1({
741
- nodeId: ctx.sourceNodeId,
742
- parameter
743
- });
744
- }
745
- parameter;
746
- serialize(ctx) {
747
- this.payload = import_safe.Bytes.from([this.parameter]);
748
- return super.serialize(ctx);
749
- }
750
- toLogEntry(ctx) {
751
- return {
752
- ...super.toLogEntry(ctx),
753
- message: {
754
- parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter)
818
+ constructor(options) {
819
+ super(options);
820
+ this.parameter = options.parameter;
821
+ this.direction = options.direction;
822
+ this.duration = import_core.Duration.from(options.duration);
823
+ }
824
+ static from(raw, ctx) {
825
+ (0, import_core.validatePayload)(raw.payload.length >= 2);
826
+ const direction = !!(raw.payload[0] & 64) ? "down" : "up";
827
+ const parameter = raw.payload[1];
828
+ let duration;
829
+ if (raw.payload.length >= 3) {
830
+ duration = import_core.Duration.parseSet(raw.payload[2]);
755
831
  }
756
- };
757
- }
758
- };
759
- WindowCoveringCCStopLevelChange = WindowCoveringCCStopLevelChange_1 = __decorate([
760
- (0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.StopLevelChange),
761
- (0, import_CommandClassDecorators.useSupervision)()
762
- ], WindowCoveringCCStopLevelChange);
832
+ return new this({
833
+ nodeId: ctx.sourceNodeId,
834
+ direction,
835
+ parameter,
836
+ duration
837
+ });
838
+ }
839
+ parameter;
840
+ direction;
841
+ duration;
842
+ serialize(ctx) {
843
+ this.payload = import_safe.Bytes.from([
844
+ this.direction === "down" ? 64 : 0,
845
+ this.parameter,
846
+ (this.duration ?? import_core.Duration.default()).serializeSet()
847
+ ]);
848
+ return super.serialize(ctx);
849
+ }
850
+ toLogEntry(ctx) {
851
+ const message = {
852
+ parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter),
853
+ direction: this.direction
854
+ };
855
+ if (this.duration) {
856
+ message.duration = this.duration.toString();
857
+ }
858
+ return {
859
+ ...super.toLogEntry(ctx),
860
+ message
861
+ };
862
+ }
863
+ };
864
+ return WindowCoveringCCStartLevelChange2 = _classThis;
865
+ })();
866
+ let WindowCoveringCCStopLevelChange = (() => {
867
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.WindowCoveringCommand.StopLevelChange), (0, import_CommandClassDecorators.useSupervision)()];
868
+ let _classDescriptor;
869
+ let _classExtraInitializers = [];
870
+ let _classThis;
871
+ let _classSuper = WindowCoveringCC;
872
+ var WindowCoveringCCStopLevelChange2 = class extends _classSuper {
873
+ static {
874
+ _classThis = this;
875
+ }
876
+ static {
877
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
878
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
879
+ WindowCoveringCCStopLevelChange2 = _classThis = _classDescriptor.value;
880
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
881
+ __runInitializers(_classThis, _classExtraInitializers);
882
+ }
883
+ constructor(options) {
884
+ super(options);
885
+ this.parameter = options.parameter;
886
+ }
887
+ static from(raw, ctx) {
888
+ (0, import_core.validatePayload)(raw.payload.length >= 1);
889
+ const parameter = raw.payload[0];
890
+ return new this({
891
+ nodeId: ctx.sourceNodeId,
892
+ parameter
893
+ });
894
+ }
895
+ parameter;
896
+ serialize(ctx) {
897
+ this.payload = import_safe.Bytes.from([this.parameter]);
898
+ return super.serialize(ctx);
899
+ }
900
+ toLogEntry(ctx) {
901
+ return {
902
+ ...super.toLogEntry(ctx),
903
+ message: {
904
+ parameter: (0, import_safe2.getEnumMemberName)(import_Types.WindowCoveringParameter, this.parameter)
905
+ }
906
+ };
907
+ }
908
+ };
909
+ return WindowCoveringCCStopLevelChange2 = _classThis;
910
+ })();
763
911
  // Annotate the CommonJS export names for ESM import in node:
764
912
  0 && (module.exports = {
765
913
  WindowCoveringCC,