@zwave-js/cc 15.20.0 → 15.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (679) hide show
  1. package/build/cjs/cc/AlarmSensorCC._validateArgs.js.map +2 -2
  2. package/build/cjs/cc/AlarmSensorCC.d.ts +4 -131
  3. package/build/cjs/cc/AlarmSensorCC.js +1 -2
  4. package/build/cjs/cc/AlarmSensorCC.js.map +3 -3
  5. package/build/cjs/cc/ApplicationStatusCC.d.ts +1 -1
  6. package/build/cjs/cc/ApplicationStatusCC.js.map +3 -3
  7. package/build/cjs/cc/AssociationCC._validateArgs.js.map +2 -2
  8. package/build/cjs/cc/AssociationCC.d.ts +3 -109
  9. package/build/cjs/cc/AssociationCC.js +0 -1
  10. package/build/cjs/cc/AssociationCC.js.map +3 -3
  11. package/build/cjs/cc/AssociationGroupInfoCC._validateArgs.js.map +2 -2
  12. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +3 -112
  13. package/build/cjs/cc/AssociationGroupInfoCC.js +0 -1
  14. package/build/cjs/cc/AssociationGroupInfoCC.js.map +3 -3
  15. package/build/cjs/cc/BarrierOperatorCC._validateArgs.js.map +2 -2
  16. package/build/cjs/cc/BarrierOperatorCC.d.ts +4 -148
  17. package/build/cjs/cc/BarrierOperatorCC.js +1 -2
  18. package/build/cjs/cc/BarrierOperatorCC.js.map +3 -3
  19. package/build/cjs/cc/BasicCC._validateArgs.js.map +2 -2
  20. package/build/cjs/cc/BasicCC.d.ts +4 -143
  21. package/build/cjs/cc/BasicCC.js +0 -1
  22. package/build/cjs/cc/BasicCC.js.map +3 -3
  23. package/build/cjs/cc/BasicWindowCoveringCC._validateArgs.js.map +2 -2
  24. package/build/cjs/cc/BasicWindowCoveringCC.d.ts +3 -63
  25. package/build/cjs/cc/BasicWindowCoveringCC.js +2 -3
  26. package/build/cjs/cc/BasicWindowCoveringCC.js.map +3 -3
  27. package/build/cjs/cc/BatteryCC.d.ts +4 -305
  28. package/build/cjs/cc/BatteryCC.js +39 -15
  29. package/build/cjs/cc/BatteryCC.js.map +3 -3
  30. package/build/cjs/cc/BinarySensorCC._validateArgs.js.map +2 -2
  31. package/build/cjs/cc/BinarySensorCC.d.ts +4 -59
  32. package/build/cjs/cc/BinarySensorCC.js +12 -3
  33. package/build/cjs/cc/BinarySensorCC.js.map +3 -3
  34. package/build/cjs/cc/BinarySwitchCC._validateArgs.js.map +2 -2
  35. package/build/cjs/cc/BinarySwitchCC.d.ts +4 -83
  36. package/build/cjs/cc/BinarySwitchCC.js +0 -1
  37. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  38. package/build/cjs/cc/CRC16CC.d.ts +1 -1
  39. package/build/cjs/cc/CRC16CC.js.map +3 -3
  40. package/build/cjs/cc/CentralSceneCC._validateArgs.js.map +2 -2
  41. package/build/cjs/cc/CentralSceneCC.d.ts +3 -136
  42. package/build/cjs/cc/CentralSceneCC.js +0 -1
  43. package/build/cjs/cc/CentralSceneCC.js.map +3 -3
  44. package/build/cjs/cc/ClimateControlScheduleCC._validateArgs.js.map +2 -2
  45. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +4 -87
  46. package/build/cjs/cc/ClimateControlScheduleCC.js +3 -4
  47. package/build/cjs/cc/ClimateControlScheduleCC.js.map +3 -3
  48. package/build/cjs/cc/ClockCC._validateArgs.js.map +2 -2
  49. package/build/cjs/cc/ClockCC.d.ts +1 -1
  50. package/build/cjs/cc/ClockCC.js +1 -1
  51. package/build/cjs/cc/ClockCC.js.map +3 -3
  52. package/build/cjs/cc/ColorSwitchCC._validateArgs.js.map +2 -2
  53. package/build/cjs/cc/ColorSwitchCC.d.ts +4 -227
  54. package/build/cjs/cc/ColorSwitchCC.js +3 -3
  55. package/build/cjs/cc/ColorSwitchCC.js.map +3 -3
  56. package/build/cjs/cc/ConfigurationCC._validateArgs.js.map +2 -2
  57. package/build/cjs/cc/ConfigurationCC.d.ts +9 -60
  58. package/build/cjs/cc/ConfigurationCC.js +71 -59
  59. package/build/cjs/cc/ConfigurationCC.js.map +3 -3
  60. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +1 -1
  61. package/build/cjs/cc/DeviceResetLocallyCC.js.map +3 -3
  62. package/build/cjs/cc/DoorLockCC._validateArgs.js.map +2 -2
  63. package/build/cjs/cc/DoorLockCC.d.ts +4 -688
  64. package/build/cjs/cc/DoorLockCC.js +1 -2
  65. package/build/cjs/cc/DoorLockCC.js.map +3 -3
  66. package/build/cjs/cc/DoorLockLoggingCC._validateArgs.js.map +2 -2
  67. package/build/cjs/cc/DoorLockLoggingCC.d.ts +4 -29
  68. package/build/cjs/cc/DoorLockLoggingCC.js +0 -1
  69. package/build/cjs/cc/DoorLockLoggingCC.js.map +3 -3
  70. package/build/cjs/cc/EnergyProductionCC._validateArgs.js.map +2 -2
  71. package/build/cjs/cc/EnergyProductionCC.d.ts +4 -33
  72. package/build/cjs/cc/EnergyProductionCC.js +1 -2
  73. package/build/cjs/cc/EnergyProductionCC.js.map +3 -3
  74. package/build/cjs/cc/EntryControlCC._validateArgs.js.map +2 -2
  75. package/build/cjs/cc/EntryControlCC.d.ts +3 -137
  76. package/build/cjs/cc/EntryControlCC.js +0 -1
  77. package/build/cjs/cc/EntryControlCC.js.map +3 -3
  78. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +2 -2
  79. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +4 -154
  80. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +0 -1
  81. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +3 -3
  82. package/build/cjs/cc/HailCC.js.map +3 -3
  83. package/build/cjs/cc/HumidityControlModeCC._validateArgs.js.map +2 -2
  84. package/build/cjs/cc/HumidityControlModeCC.d.ts +4 -58
  85. package/build/cjs/cc/HumidityControlModeCC.js +1 -2
  86. package/build/cjs/cc/HumidityControlModeCC.js.map +3 -3
  87. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +4 -33
  88. package/build/cjs/cc/HumidityControlOperatingStateCC.js +0 -1
  89. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +3 -3
  90. package/build/cjs/cc/HumidityControlSetpointCC._validateArgs.js.map +2 -2
  91. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +4 -92
  92. package/build/cjs/cc/HumidityControlSetpointCC.js +0 -1
  93. package/build/cjs/cc/HumidityControlSetpointCC.js.map +3 -3
  94. package/build/cjs/cc/InclusionControllerCC.d.ts +1 -1
  95. package/build/cjs/cc/InclusionControllerCC.js.map +3 -3
  96. package/build/cjs/cc/IndicatorCC._validateArgs.js.map +2 -2
  97. package/build/cjs/cc/IndicatorCC.d.ts +4 -207
  98. package/build/cjs/cc/IndicatorCC.js +0 -1
  99. package/build/cjs/cc/IndicatorCC.js.map +3 -3
  100. package/build/cjs/cc/IrrigationCC._validateArgs.js.map +2 -2
  101. package/build/cjs/cc/IrrigationCC.d.ts +4 -1186
  102. package/build/cjs/cc/IrrigationCC.js +1 -3
  103. package/build/cjs/cc/IrrigationCC.js.map +3 -3
  104. package/build/cjs/cc/LanguageCC._validateArgs.js.map +2 -2
  105. package/build/cjs/cc/LanguageCC.d.ts +4 -56
  106. package/build/cjs/cc/LanguageCC.js +0 -1
  107. package/build/cjs/cc/LanguageCC.js.map +3 -3
  108. package/build/cjs/cc/LockCC._validateArgs.js.map +2 -2
  109. package/build/cjs/cc/LockCC.d.ts +4 -31
  110. package/build/cjs/cc/LockCC.js +0 -1
  111. package/build/cjs/cc/LockCC.js.map +3 -3
  112. package/build/cjs/cc/ManufacturerProprietaryCC._validateArgs.js.map +2 -2
  113. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +1 -1
  114. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +3 -3
  115. package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.js.map +2 -2
  116. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +3 -116
  117. package/build/cjs/cc/ManufacturerSpecificCC.js +0 -1
  118. package/build/cjs/cc/ManufacturerSpecificCC.js.map +3 -3
  119. package/build/cjs/cc/MeterCC._validateArgs.js.map +2 -2
  120. package/build/cjs/cc/MeterCC.d.ts +4 -203
  121. package/build/cjs/cc/MeterCC.js +0 -2
  122. package/build/cjs/cc/MeterCC.js.map +3 -3
  123. package/build/cjs/cc/MultiChannelAssociationCC._validateArgs.js.map +2 -2
  124. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +3 -112
  125. package/build/cjs/cc/MultiChannelAssociationCC.js +0 -1
  126. package/build/cjs/cc/MultiChannelAssociationCC.js.map +3 -3
  127. package/build/cjs/cc/MultiChannelCC._validateArgs.js.map +2 -2
  128. package/build/cjs/cc/MultiChannelCC.d.ts +3 -207
  129. package/build/cjs/cc/MultiChannelCC.js +0 -1
  130. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  131. package/build/cjs/cc/MultiCommandCC._validateArgs.js.map +2 -2
  132. package/build/cjs/cc/MultiCommandCC.d.ts +1 -1
  133. package/build/cjs/cc/MultiCommandCC.js.map +3 -3
  134. package/build/cjs/cc/MultilevelSensorCC._validateArgs.js.map +2 -2
  135. package/build/cjs/cc/MultilevelSensorCC.d.ts +4 -84
  136. package/build/cjs/cc/MultilevelSensorCC.js +0 -1
  137. package/build/cjs/cc/MultilevelSensorCC.js.map +3 -3
  138. package/build/cjs/cc/MultilevelSwitchCC._validateArgs.js.map +2 -2
  139. package/build/cjs/cc/MultilevelSwitchCC.d.ts +5 -264
  140. package/build/cjs/cc/MultilevelSwitchCC.js +34 -1
  141. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  142. package/build/cjs/cc/NoOperationCC.js.map +3 -3
  143. package/build/cjs/cc/NodeNamingCC._validateArgs.js.map +2 -2
  144. package/build/cjs/cc/NodeNamingCC.d.ts +4 -56
  145. package/build/cjs/cc/NodeNamingCC.js +0 -1
  146. package/build/cjs/cc/NodeNamingCC.js.map +3 -3
  147. package/build/cjs/cc/NotificationCC._validateArgs.js.map +2 -2
  148. package/build/cjs/cc/NotificationCC.d.ts +5 -357
  149. package/build/cjs/cc/NotificationCC.js +2 -2
  150. package/build/cjs/cc/NotificationCC.js.map +3 -3
  151. package/build/cjs/cc/PowerlevelCC._validateArgs.js.map +2 -2
  152. package/build/cjs/cc/PowerlevelCC.d.ts +1 -1
  153. package/build/cjs/cc/PowerlevelCC.js +2 -2
  154. package/build/cjs/cc/PowerlevelCC.js.map +3 -3
  155. package/build/cjs/cc/ProtectionCC._validateArgs.js.map +2 -2
  156. package/build/cjs/cc/ProtectionCC.d.ts +4 -212
  157. package/build/cjs/cc/ProtectionCC.js +1 -2
  158. package/build/cjs/cc/ProtectionCC.js.map +3 -3
  159. package/build/cjs/cc/SceneActivationCC._validateArgs.js.map +2 -2
  160. package/build/cjs/cc/SceneActivationCC.d.ts +4 -59
  161. package/build/cjs/cc/SceneActivationCC.js +0 -1
  162. package/build/cjs/cc/SceneActivationCC.js.map +3 -3
  163. package/build/cjs/cc/SceneActuatorConfigurationCC._validateArgs.js.map +2 -2
  164. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +4 -65
  165. package/build/cjs/cc/SceneActuatorConfigurationCC.js +0 -1
  166. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +3 -3
  167. package/build/cjs/cc/SceneControllerConfigurationCC._validateArgs.js.map +2 -2
  168. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +3 -64
  169. package/build/cjs/cc/SceneControllerConfigurationCC.js +0 -1
  170. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +3 -3
  171. package/build/cjs/cc/ScheduleEntryLockCC._validateArgs.js.map +2 -2
  172. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +4 -163
  173. package/build/cjs/cc/ScheduleEntryLockCC.js +0 -1
  174. package/build/cjs/cc/ScheduleEntryLockCC.js.map +3 -3
  175. package/build/cjs/cc/Security2CC.d.ts +1 -1
  176. package/build/cjs/cc/Security2CC.js.map +3 -3
  177. package/build/cjs/cc/SecurityCC.d.ts +4 -2
  178. package/build/cjs/cc/SecurityCC.js.map +3 -3
  179. package/build/cjs/cc/SoundSwitchCC._validateArgs.js.map +2 -2
  180. package/build/cjs/cc/SoundSwitchCC.d.ts +4 -123
  181. package/build/cjs/cc/SoundSwitchCC.js +6 -2
  182. package/build/cjs/cc/SoundSwitchCC.js.map +3 -3
  183. package/build/cjs/cc/SupervisionCC.d.ts +3 -31
  184. package/build/cjs/cc/SupervisionCC.js +4 -2
  185. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  186. package/build/cjs/cc/ThermostatFanModeCC._validateArgs.js.map +2 -2
  187. package/build/cjs/cc/ThermostatFanModeCC.d.ts +4 -84
  188. package/build/cjs/cc/ThermostatFanModeCC.js +1 -2
  189. package/build/cjs/cc/ThermostatFanModeCC.js.map +3 -3
  190. package/build/cjs/cc/ThermostatFanStateCC.d.ts +4 -33
  191. package/build/cjs/cc/ThermostatFanStateCC.js +0 -1
  192. package/build/cjs/cc/ThermostatFanStateCC.js.map +3 -3
  193. package/build/cjs/cc/ThermostatModeCC._validateArgs.js.map +2 -2
  194. package/build/cjs/cc/ThermostatModeCC.d.ts +4 -84
  195. package/build/cjs/cc/ThermostatModeCC.js +1 -2
  196. package/build/cjs/cc/ThermostatModeCC.js.map +3 -3
  197. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +4 -33
  198. package/build/cjs/cc/ThermostatOperatingStateCC.js +0 -1
  199. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +3 -3
  200. package/build/cjs/cc/ThermostatSetbackCC._validateArgs.js.map +2 -2
  201. package/build/cjs/cc/ThermostatSetbackCC.d.ts +1 -1
  202. package/build/cjs/cc/ThermostatSetbackCC.js.map +3 -3
  203. package/build/cjs/cc/ThermostatSetpointCC._validateArgs.js.map +2 -2
  204. package/build/cjs/cc/ThermostatSetpointCC.d.ts +5 -90
  205. package/build/cjs/cc/ThermostatSetpointCC.js +0 -1
  206. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  207. package/build/cjs/cc/TimeCC._validateArgs.js.map +2 -2
  208. package/build/cjs/cc/TimeCC.d.ts +2 -2
  209. package/build/cjs/cc/TimeCC.js.map +3 -3
  210. package/build/cjs/cc/TimeParametersCC._validateArgs.js.map +2 -2
  211. package/build/cjs/cc/TimeParametersCC.d.ts +4 -30
  212. package/build/cjs/cc/TimeParametersCC.js +0 -1
  213. package/build/cjs/cc/TimeParametersCC.js.map +3 -3
  214. package/build/cjs/cc/TransportServiceCC.d.ts +1 -1
  215. package/build/cjs/cc/TransportServiceCC.js.map +3 -3
  216. package/build/cjs/cc/UserCodeCC._validateArgs.js.map +2 -2
  217. package/build/cjs/cc/UserCodeCC.d.ts +4 -415
  218. package/build/cjs/cc/UserCodeCC.js +1 -2
  219. package/build/cjs/cc/UserCodeCC.js.map +3 -3
  220. package/build/cjs/cc/VersionCC._validateArgs.js.map +2 -2
  221. package/build/cjs/cc/VersionCC.d.ts +3 -367
  222. package/build/cjs/cc/VersionCC.js +0 -1
  223. package/build/cjs/cc/VersionCC.js.map +3 -3
  224. package/build/cjs/cc/WakeUpCC._validateArgs.js.map +2 -2
  225. package/build/cjs/cc/WakeUpCC.d.ts +4 -83
  226. package/build/cjs/cc/WakeUpCC.js +11 -4
  227. package/build/cjs/cc/WakeUpCC.js.map +3 -3
  228. package/build/cjs/cc/WindowCoveringCC._validateArgs.js.map +2 -2
  229. package/build/cjs/cc/WindowCoveringCC.d.ts +4 -207
  230. package/build/cjs/cc/WindowCoveringCC.js +3 -5
  231. package/build/cjs/cc/WindowCoveringCC.js.map +3 -3
  232. package/build/cjs/cc/ZWaveLongRangeCC.js.map +3 -3
  233. package/build/cjs/cc/ZWavePlusCC._validateArgs.js.map +2 -2
  234. package/build/cjs/cc/ZWavePlusCC.d.ts +4 -129
  235. package/build/cjs/cc/ZWavePlusCC.js +0 -1
  236. package/build/cjs/cc/ZWavePlusCC.js.map +3 -3
  237. package/build/cjs/cc/ZWaveProtocolCC.d.ts +1 -1
  238. package/build/cjs/cc/ZWaveProtocolCC.js.map +3 -3
  239. package/build/cjs/cc/_CCValues.generated.js.map +1 -1
  240. package/build/cjs/cc/index.js.map +1 -1
  241. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +1 -1
  242. package/build/cjs/cc/manufacturerProprietary/FibaroCC._validateArgs.js.map +2 -2
  243. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +1 -1
  244. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +3 -3
  245. package/build/cjs/index.js.map +1 -1
  246. package/build/cjs/index_browser.js.map +1 -1
  247. package/build/cjs/index_safe.js.map +1 -1
  248. package/build/cjs/lib/API.d.ts +3 -135
  249. package/build/cjs/lib/API.js.map +3 -3
  250. package/build/cjs/lib/CCValueUtils.js.map +1 -1
  251. package/build/cjs/lib/CommandClass.d.ts +1 -1
  252. package/build/cjs/lib/CommandClass.js.map +3 -3
  253. package/build/cjs/lib/CommandClassDecorators.js.map +1 -1
  254. package/build/cjs/lib/EncapsulatingCommandClass.js.map +1 -1
  255. package/build/cjs/lib/NotificationEventPayload.js.map +1 -1
  256. package/build/cjs/lib/Security2/Extension.js.map +1 -1
  257. package/build/cjs/lib/Security2/shared.js.map +1 -1
  258. package/build/cjs/lib/SetValueResult.js.map +1 -1
  259. package/build/cjs/lib/Values.js.map +1 -1
  260. package/build/cjs/lib/_CCAPI.generated.d.ts +136 -0
  261. package/build/cjs/lib/_CCAPI.generated.js +17 -0
  262. package/build/cjs/lib/_CCAPI.generated.js.map +7 -0
  263. package/build/cjs/lib/_Types.js.map +1 -1
  264. package/build/cjs/lib/serializers.js.map +1 -1
  265. package/build/cjs/lib/utils.js.map +1 -1
  266. package/build/esm/cc/AlarmSensorCC._validateArgs.d.ts.map +1 -1
  267. package/build/esm/cc/AlarmSensorCC._validateArgs.js.map +1 -1
  268. package/build/esm/cc/AlarmSensorCC.d.ts +4 -131
  269. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  270. package/build/esm/cc/AlarmSensorCC.js +2 -3
  271. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  272. package/build/esm/cc/ApplicationStatusCC.d.ts +1 -1
  273. package/build/esm/cc/ApplicationStatusCC.d.ts.map +1 -1
  274. package/build/esm/cc/ApplicationStatusCC.js.map +1 -1
  275. package/build/esm/cc/AssociationCC._validateArgs.d.ts.map +1 -1
  276. package/build/esm/cc/AssociationCC._validateArgs.js.map +1 -1
  277. package/build/esm/cc/AssociationCC.d.ts +3 -109
  278. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  279. package/build/esm/cc/AssociationCC.js +0 -1
  280. package/build/esm/cc/AssociationCC.js.map +1 -1
  281. package/build/esm/cc/AssociationGroupInfoCC._validateArgs.d.ts.map +1 -1
  282. package/build/esm/cc/AssociationGroupInfoCC._validateArgs.js.map +1 -1
  283. package/build/esm/cc/AssociationGroupInfoCC.d.ts +3 -112
  284. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  285. package/build/esm/cc/AssociationGroupInfoCC.js +12 -13
  286. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  287. package/build/esm/cc/BarrierOperatorCC._validateArgs.d.ts.map +1 -1
  288. package/build/esm/cc/BarrierOperatorCC._validateArgs.js.map +1 -1
  289. package/build/esm/cc/BarrierOperatorCC.d.ts +4 -148
  290. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  291. package/build/esm/cc/BarrierOperatorCC.js +2 -3
  292. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  293. package/build/esm/cc/BasicCC._validateArgs.d.ts.map +1 -1
  294. package/build/esm/cc/BasicCC._validateArgs.js.map +1 -1
  295. package/build/esm/cc/BasicCC.d.ts +4 -143
  296. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  297. package/build/esm/cc/BasicCC.js +1 -2
  298. package/build/esm/cc/BasicCC.js.map +1 -1
  299. package/build/esm/cc/BasicWindowCoveringCC._validateArgs.d.ts.map +1 -1
  300. package/build/esm/cc/BasicWindowCoveringCC._validateArgs.js.map +1 -1
  301. package/build/esm/cc/BasicWindowCoveringCC.d.ts +3 -63
  302. package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -1
  303. package/build/esm/cc/BasicWindowCoveringCC.js +5 -6
  304. package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
  305. package/build/esm/cc/BatteryCC.d.ts +4 -305
  306. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  307. package/build/esm/cc/BatteryCC.js +67 -26
  308. package/build/esm/cc/BatteryCC.js.map +1 -1
  309. package/build/esm/cc/BinarySensorCC._validateArgs.d.ts.map +1 -1
  310. package/build/esm/cc/BinarySensorCC._validateArgs.js.map +1 -1
  311. package/build/esm/cc/BinarySensorCC.d.ts +4 -59
  312. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  313. package/build/esm/cc/BinarySensorCC.js +24 -4
  314. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  315. package/build/esm/cc/BinarySwitchCC._validateArgs.d.ts.map +1 -1
  316. package/build/esm/cc/BinarySwitchCC._validateArgs.js.map +1 -1
  317. package/build/esm/cc/BinarySwitchCC.d.ts +4 -83
  318. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  319. package/build/esm/cc/BinarySwitchCC.js +1 -2
  320. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  321. package/build/esm/cc/CRC16CC.d.ts +1 -1
  322. package/build/esm/cc/CRC16CC.d.ts.map +1 -1
  323. package/build/esm/cc/CRC16CC.js.map +1 -1
  324. package/build/esm/cc/CentralSceneCC._validateArgs.d.ts.map +1 -1
  325. package/build/esm/cc/CentralSceneCC._validateArgs.js.map +1 -1
  326. package/build/esm/cc/CentralSceneCC.d.ts +3 -136
  327. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  328. package/build/esm/cc/CentralSceneCC.js +5 -6
  329. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  330. package/build/esm/cc/ClimateControlScheduleCC._validateArgs.d.ts.map +1 -1
  331. package/build/esm/cc/ClimateControlScheduleCC._validateArgs.js.map +1 -1
  332. package/build/esm/cc/ClimateControlScheduleCC.d.ts +4 -87
  333. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  334. package/build/esm/cc/ClimateControlScheduleCC.js +4 -5
  335. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  336. package/build/esm/cc/ClockCC._validateArgs.d.ts.map +1 -1
  337. package/build/esm/cc/ClockCC._validateArgs.js.map +1 -1
  338. package/build/esm/cc/ClockCC.d.ts +1 -1
  339. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  340. package/build/esm/cc/ClockCC.js +1 -1
  341. package/build/esm/cc/ClockCC.js.map +1 -1
  342. package/build/esm/cc/ColorSwitchCC._validateArgs.d.ts.map +1 -1
  343. package/build/esm/cc/ColorSwitchCC._validateArgs.js.map +1 -1
  344. package/build/esm/cc/ColorSwitchCC.d.ts +4 -227
  345. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  346. package/build/esm/cc/ColorSwitchCC.js +8 -8
  347. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  348. package/build/esm/cc/ConfigurationCC._validateArgs.d.ts.map +1 -1
  349. package/build/esm/cc/ConfigurationCC._validateArgs.js.map +1 -1
  350. package/build/esm/cc/ConfigurationCC.d.ts +9 -60
  351. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  352. package/build/esm/cc/ConfigurationCC.js +94 -76
  353. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  354. package/build/esm/cc/DeviceResetLocallyCC.d.ts +1 -1
  355. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  356. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  357. package/build/esm/cc/DoorLockCC._validateArgs.d.ts.map +1 -1
  358. package/build/esm/cc/DoorLockCC._validateArgs.js.map +1 -1
  359. package/build/esm/cc/DoorLockCC.d.ts +4 -688
  360. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  361. package/build/esm/cc/DoorLockCC.js +14 -15
  362. package/build/esm/cc/DoorLockCC.js.map +1 -1
  363. package/build/esm/cc/DoorLockLoggingCC._validateArgs.d.ts.map +1 -1
  364. package/build/esm/cc/DoorLockLoggingCC._validateArgs.js.map +1 -1
  365. package/build/esm/cc/DoorLockLoggingCC.d.ts +4 -29
  366. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  367. package/build/esm/cc/DoorLockLoggingCC.js +0 -1
  368. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  369. package/build/esm/cc/EnergyProductionCC._validateArgs.d.ts.map +1 -1
  370. package/build/esm/cc/EnergyProductionCC._validateArgs.js.map +1 -1
  371. package/build/esm/cc/EnergyProductionCC.d.ts +4 -33
  372. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
  373. package/build/esm/cc/EnergyProductionCC.js +2 -3
  374. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  375. package/build/esm/cc/EntryControlCC._validateArgs.d.ts.map +1 -1
  376. package/build/esm/cc/EntryControlCC._validateArgs.js.map +1 -1
  377. package/build/esm/cc/EntryControlCC.d.ts +3 -137
  378. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  379. package/build/esm/cc/EntryControlCC.js +1 -2
  380. package/build/esm/cc/EntryControlCC.js.map +1 -1
  381. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
  382. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
  383. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +4 -154
  384. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  385. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +0 -1
  386. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  387. package/build/esm/cc/HailCC.d.ts.map +1 -1
  388. package/build/esm/cc/HailCC.js.map +1 -1
  389. package/build/esm/cc/HumidityControlModeCC._validateArgs.d.ts.map +1 -1
  390. package/build/esm/cc/HumidityControlModeCC._validateArgs.js.map +1 -1
  391. package/build/esm/cc/HumidityControlModeCC.d.ts +4 -58
  392. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  393. package/build/esm/cc/HumidityControlModeCC.js +2 -3
  394. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  395. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +4 -33
  396. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  397. package/build/esm/cc/HumidityControlOperatingStateCC.js +1 -2
  398. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  399. package/build/esm/cc/HumidityControlSetpointCC._validateArgs.d.ts.map +1 -1
  400. package/build/esm/cc/HumidityControlSetpointCC._validateArgs.js.map +1 -1
  401. package/build/esm/cc/HumidityControlSetpointCC.d.ts +4 -92
  402. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  403. package/build/esm/cc/HumidityControlSetpointCC.js +1 -2
  404. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  405. package/build/esm/cc/InclusionControllerCC.d.ts +1 -1
  406. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
  407. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  408. package/build/esm/cc/IndicatorCC._validateArgs.d.ts.map +1 -1
  409. package/build/esm/cc/IndicatorCC._validateArgs.js.map +1 -1
  410. package/build/esm/cc/IndicatorCC.d.ts +4 -207
  411. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  412. package/build/esm/cc/IndicatorCC.js +0 -1
  413. package/build/esm/cc/IndicatorCC.js.map +1 -1
  414. package/build/esm/cc/IrrigationCC._validateArgs.d.ts.map +1 -1
  415. package/build/esm/cc/IrrigationCC._validateArgs.js.map +1 -1
  416. package/build/esm/cc/IrrigationCC.d.ts +4 -1186
  417. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  418. package/build/esm/cc/IrrigationCC.js +6 -8
  419. package/build/esm/cc/IrrigationCC.js.map +1 -1
  420. package/build/esm/cc/LanguageCC._validateArgs.d.ts.map +1 -1
  421. package/build/esm/cc/LanguageCC._validateArgs.js.map +1 -1
  422. package/build/esm/cc/LanguageCC.d.ts +4 -56
  423. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  424. package/build/esm/cc/LanguageCC.js +1 -2
  425. package/build/esm/cc/LanguageCC.js.map +1 -1
  426. package/build/esm/cc/LockCC._validateArgs.d.ts.map +1 -1
  427. package/build/esm/cc/LockCC._validateArgs.js.map +1 -1
  428. package/build/esm/cc/LockCC.d.ts +4 -31
  429. package/build/esm/cc/LockCC.d.ts.map +1 -1
  430. package/build/esm/cc/LockCC.js +1 -2
  431. package/build/esm/cc/LockCC.js.map +1 -1
  432. package/build/esm/cc/ManufacturerProprietaryCC._validateArgs.d.ts.map +1 -1
  433. package/build/esm/cc/ManufacturerProprietaryCC._validateArgs.js.map +1 -1
  434. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +1 -1
  435. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  436. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  437. package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts.map +1 -1
  438. package/build/esm/cc/ManufacturerSpecificCC._validateArgs.js.map +1 -1
  439. package/build/esm/cc/ManufacturerSpecificCC.d.ts +3 -116
  440. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  441. package/build/esm/cc/ManufacturerSpecificCC.js +1 -2
  442. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  443. package/build/esm/cc/MeterCC._validateArgs.d.ts.map +1 -1
  444. package/build/esm/cc/MeterCC._validateArgs.js.map +1 -1
  445. package/build/esm/cc/MeterCC.d.ts +4 -203
  446. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  447. package/build/esm/cc/MeterCC.js +17 -19
  448. package/build/esm/cc/MeterCC.js.map +1 -1
  449. package/build/esm/cc/MultiChannelAssociationCC._validateArgs.d.ts.map +1 -1
  450. package/build/esm/cc/MultiChannelAssociationCC._validateArgs.js.map +1 -1
  451. package/build/esm/cc/MultiChannelAssociationCC.d.ts +3 -112
  452. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  453. package/build/esm/cc/MultiChannelAssociationCC.js +4 -5
  454. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  455. package/build/esm/cc/MultiChannelCC._validateArgs.d.ts.map +1 -1
  456. package/build/esm/cc/MultiChannelCC._validateArgs.js.map +1 -1
  457. package/build/esm/cc/MultiChannelCC.d.ts +3 -207
  458. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  459. package/build/esm/cc/MultiChannelCC.js +9 -10
  460. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  461. package/build/esm/cc/MultiCommandCC._validateArgs.d.ts.map +1 -1
  462. package/build/esm/cc/MultiCommandCC._validateArgs.js.map +1 -1
  463. package/build/esm/cc/MultiCommandCC.d.ts +1 -1
  464. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
  465. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  466. package/build/esm/cc/MultilevelSensorCC._validateArgs.d.ts.map +1 -1
  467. package/build/esm/cc/MultilevelSensorCC._validateArgs.js.map +1 -1
  468. package/build/esm/cc/MultilevelSensorCC.d.ts +4 -84
  469. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  470. package/build/esm/cc/MultilevelSensorCC.js +1 -2
  471. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  472. package/build/esm/cc/MultilevelSwitchCC._validateArgs.d.ts.map +1 -1
  473. package/build/esm/cc/MultilevelSwitchCC._validateArgs.js.map +1 -1
  474. package/build/esm/cc/MultilevelSwitchCC.d.ts +5 -264
  475. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  476. package/build/esm/cc/MultilevelSwitchCC.js +44 -6
  477. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  478. package/build/esm/cc/NoOperationCC.d.ts.map +1 -1
  479. package/build/esm/cc/NoOperationCC.js.map +1 -1
  480. package/build/esm/cc/NodeNamingCC._validateArgs.d.ts.map +1 -1
  481. package/build/esm/cc/NodeNamingCC._validateArgs.js.map +1 -1
  482. package/build/esm/cc/NodeNamingCC.d.ts +4 -56
  483. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  484. package/build/esm/cc/NodeNamingCC.js +1 -2
  485. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  486. package/build/esm/cc/NotificationCC._validateArgs.d.ts.map +1 -1
  487. package/build/esm/cc/NotificationCC._validateArgs.js.map +1 -1
  488. package/build/esm/cc/NotificationCC.d.ts +5 -357
  489. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  490. package/build/esm/cc/NotificationCC.js +9 -9
  491. package/build/esm/cc/NotificationCC.js.map +1 -1
  492. package/build/esm/cc/PowerlevelCC._validateArgs.d.ts.map +1 -1
  493. package/build/esm/cc/PowerlevelCC._validateArgs.js.map +1 -1
  494. package/build/esm/cc/PowerlevelCC.d.ts +1 -1
  495. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
  496. package/build/esm/cc/PowerlevelCC.js +2 -2
  497. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  498. package/build/esm/cc/ProtectionCC._validateArgs.d.ts.map +1 -1
  499. package/build/esm/cc/ProtectionCC._validateArgs.js.map +1 -1
  500. package/build/esm/cc/ProtectionCC.d.ts +4 -212
  501. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  502. package/build/esm/cc/ProtectionCC.js +2 -3
  503. package/build/esm/cc/ProtectionCC.js.map +1 -1
  504. package/build/esm/cc/SceneActivationCC._validateArgs.d.ts.map +1 -1
  505. package/build/esm/cc/SceneActivationCC._validateArgs.js.map +1 -1
  506. package/build/esm/cc/SceneActivationCC.d.ts +4 -59
  507. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  508. package/build/esm/cc/SceneActivationCC.js +1 -2
  509. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  510. package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.d.ts.map +1 -1
  511. package/build/esm/cc/SceneActuatorConfigurationCC._validateArgs.js.map +1 -1
  512. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +4 -65
  513. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  514. package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -3
  515. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  516. package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.d.ts.map +1 -1
  517. package/build/esm/cc/SceneControllerConfigurationCC._validateArgs.js.map +1 -1
  518. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +3 -64
  519. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  520. package/build/esm/cc/SceneControllerConfigurationCC.js +1 -2
  521. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  522. package/build/esm/cc/ScheduleEntryLockCC._validateArgs.d.ts.map +1 -1
  523. package/build/esm/cc/ScheduleEntryLockCC._validateArgs.js.map +1 -1
  524. package/build/esm/cc/ScheduleEntryLockCC.d.ts +4 -163
  525. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  526. package/build/esm/cc/ScheduleEntryLockCC.js +0 -1
  527. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  528. package/build/esm/cc/Security2CC.d.ts +1 -1
  529. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  530. package/build/esm/cc/Security2CC.js +2 -2
  531. package/build/esm/cc/Security2CC.js.map +1 -1
  532. package/build/esm/cc/SecurityCC.d.ts +4 -2
  533. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  534. package/build/esm/cc/SecurityCC.js +2 -2
  535. package/build/esm/cc/SecurityCC.js.map +1 -1
  536. package/build/esm/cc/SoundSwitchCC._validateArgs.d.ts.map +1 -1
  537. package/build/esm/cc/SoundSwitchCC._validateArgs.js.map +1 -1
  538. package/build/esm/cc/SoundSwitchCC.d.ts +4 -123
  539. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  540. package/build/esm/cc/SoundSwitchCC.js +7 -3
  541. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  542. package/build/esm/cc/SupervisionCC.d.ts +3 -31
  543. package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
  544. package/build/esm/cc/SupervisionCC.js +9 -7
  545. package/build/esm/cc/SupervisionCC.js.map +1 -1
  546. package/build/esm/cc/ThermostatFanModeCC._validateArgs.d.ts.map +1 -1
  547. package/build/esm/cc/ThermostatFanModeCC._validateArgs.js.map +1 -1
  548. package/build/esm/cc/ThermostatFanModeCC.d.ts +4 -84
  549. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  550. package/build/esm/cc/ThermostatFanModeCC.js +4 -5
  551. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  552. package/build/esm/cc/ThermostatFanStateCC.d.ts +4 -33
  553. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  554. package/build/esm/cc/ThermostatFanStateCC.js +1 -2
  555. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  556. package/build/esm/cc/ThermostatModeCC._validateArgs.d.ts.map +1 -1
  557. package/build/esm/cc/ThermostatModeCC._validateArgs.js.map +1 -1
  558. package/build/esm/cc/ThermostatModeCC.d.ts +4 -84
  559. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  560. package/build/esm/cc/ThermostatModeCC.js +2 -3
  561. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  562. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +4 -33
  563. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  564. package/build/esm/cc/ThermostatOperatingStateCC.js +1 -2
  565. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  566. package/build/esm/cc/ThermostatSetbackCC._validateArgs.d.ts.map +1 -1
  567. package/build/esm/cc/ThermostatSetbackCC._validateArgs.js.map +1 -1
  568. package/build/esm/cc/ThermostatSetbackCC.d.ts +1 -1
  569. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
  570. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  571. package/build/esm/cc/ThermostatSetpointCC._validateArgs.d.ts.map +1 -1
  572. package/build/esm/cc/ThermostatSetpointCC._validateArgs.js.map +1 -1
  573. package/build/esm/cc/ThermostatSetpointCC.d.ts +5 -90
  574. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  575. package/build/esm/cc/ThermostatSetpointCC.js +1 -2
  576. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  577. package/build/esm/cc/TimeCC._validateArgs.d.ts.map +1 -1
  578. package/build/esm/cc/TimeCC._validateArgs.js.map +1 -1
  579. package/build/esm/cc/TimeCC.d.ts +2 -2
  580. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  581. package/build/esm/cc/TimeCC.js.map +1 -1
  582. package/build/esm/cc/TimeParametersCC._validateArgs.d.ts.map +1 -1
  583. package/build/esm/cc/TimeParametersCC._validateArgs.js.map +1 -1
  584. package/build/esm/cc/TimeParametersCC.d.ts +4 -30
  585. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  586. package/build/esm/cc/TimeParametersCC.js +1 -2
  587. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  588. package/build/esm/cc/TransportServiceCC.d.ts +1 -1
  589. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  590. package/build/esm/cc/TransportServiceCC.js +2 -2
  591. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  592. package/build/esm/cc/UserCodeCC._validateArgs.d.ts.map +1 -1
  593. package/build/esm/cc/UserCodeCC._validateArgs.js.map +1 -1
  594. package/build/esm/cc/UserCodeCC.d.ts +4 -415
  595. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  596. package/build/esm/cc/UserCodeCC.js +17 -18
  597. package/build/esm/cc/UserCodeCC.js.map +1 -1
  598. package/build/esm/cc/VersionCC._validateArgs.d.ts.map +1 -1
  599. package/build/esm/cc/VersionCC._validateArgs.js.map +1 -1
  600. package/build/esm/cc/VersionCC.d.ts +3 -367
  601. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  602. package/build/esm/cc/VersionCC.js +1 -2
  603. package/build/esm/cc/VersionCC.js.map +1 -1
  604. package/build/esm/cc/WakeUpCC._validateArgs.d.ts.map +1 -1
  605. package/build/esm/cc/WakeUpCC._validateArgs.js.map +1 -1
  606. package/build/esm/cc/WakeUpCC.d.ts +4 -83
  607. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  608. package/build/esm/cc/WakeUpCC.js +10 -3
  609. package/build/esm/cc/WakeUpCC.js.map +1 -1
  610. package/build/esm/cc/WindowCoveringCC._validateArgs.d.ts.map +1 -1
  611. package/build/esm/cc/WindowCoveringCC._validateArgs.js.map +1 -1
  612. package/build/esm/cc/WindowCoveringCC.d.ts +4 -207
  613. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  614. package/build/esm/cc/WindowCoveringCC.js +6 -8
  615. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  616. package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -1
  617. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  618. package/build/esm/cc/ZWavePlusCC._validateArgs.d.ts.map +1 -1
  619. package/build/esm/cc/ZWavePlusCC._validateArgs.js.map +1 -1
  620. package/build/esm/cc/ZWavePlusCC.d.ts +4 -129
  621. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  622. package/build/esm/cc/ZWavePlusCC.js +0 -1
  623. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  624. package/build/esm/cc/ZWaveProtocolCC.d.ts +1 -1
  625. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  626. package/build/esm/cc/ZWaveProtocolCC.js +4 -4
  627. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  628. package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
  629. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  630. package/build/esm/cc/index.d.ts.map +1 -1
  631. package/build/esm/cc/index.js.map +1 -1
  632. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  633. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -1
  634. package/build/esm/cc/manufacturerProprietary/FibaroCC._validateArgs.d.ts.map +1 -1
  635. package/build/esm/cc/manufacturerProprietary/FibaroCC._validateArgs.js.map +1 -1
  636. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +1 -1
  637. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  638. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  639. package/build/esm/index.d.ts.map +1 -1
  640. package/build/esm/index.js.map +1 -1
  641. package/build/esm/index_browser.d.ts.map +1 -1
  642. package/build/esm/index_browser.js.map +1 -1
  643. package/build/esm/index_safe.d.ts.map +1 -1
  644. package/build/esm/index_safe.js.map +1 -1
  645. package/build/esm/lib/API.d.ts +3 -135
  646. package/build/esm/lib/API.d.ts.map +1 -1
  647. package/build/esm/lib/API.js.map +1 -1
  648. package/build/esm/lib/CCValueUtils.d.ts.map +1 -1
  649. package/build/esm/lib/CCValueUtils.js.map +1 -1
  650. package/build/esm/lib/CommandClass.d.ts +1 -1
  651. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  652. package/build/esm/lib/CommandClass.js.map +1 -1
  653. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  654. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  655. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -1
  656. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -1
  657. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -1
  658. package/build/esm/lib/NotificationEventPayload.js.map +1 -1
  659. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  660. package/build/esm/lib/Security2/Extension.js.map +1 -1
  661. package/build/esm/lib/Security2/shared.d.ts.map +1 -1
  662. package/build/esm/lib/Security2/shared.js.map +1 -1
  663. package/build/esm/lib/SetValueResult.d.ts.map +1 -1
  664. package/build/esm/lib/SetValueResult.js.map +1 -1
  665. package/build/esm/lib/Values.d.ts.map +1 -1
  666. package/build/esm/lib/Values.js.map +1 -1
  667. package/build/esm/lib/_CCAPI.generated.d.ts +136 -0
  668. package/build/esm/lib/_CCAPI.generated.d.ts.map +1 -0
  669. package/build/esm/lib/_CCAPI.generated.js +4 -0
  670. package/build/esm/lib/_CCAPI.generated.js.map +1 -0
  671. package/build/esm/lib/_Types.d.ts.map +1 -1
  672. package/build/esm/lib/_Types.js.map +1 -1
  673. package/build/esm/lib/serializers.d.ts.map +1 -1
  674. package/build/esm/lib/serializers.js.map +1 -1
  675. package/build/esm/lib/traits.d.ts.map +1 -1
  676. package/build/esm/lib/traits.js.map +1 -1
  677. package/build/esm/lib/utils.d.ts.map +1 -1
  678. package/build/esm/lib/utils.js.map +1 -1
  679. package/package.json +11 -11
@@ -1,90 +1,11 @@
1
- import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
2
- import { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
1
+ import { Duration, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
3
2
  import { Bytes } from "@zwave-js/shared";
4
3
  import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, SET_VALUE_HOOKS, type SetValueImplementation, type SetValueImplementationHooksFactory } from "../lib/API.js";
5
4
  import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
6
5
  import { BinarySwitchCommand } from "../lib/_Types.js";
7
- export declare const BinarySwitchCCValues: Readonly<{
8
- currentValue: {
9
- id: {
10
- readonly commandClass: (typeof CommandClasses)["Binary Switch"];
11
- readonly property: "currentValue";
12
- };
13
- endpoint: (endpoint?: number) => {
14
- readonly commandClass: (typeof CommandClasses)["Binary Switch"];
15
- readonly endpoint: number;
16
- readonly property: "currentValue";
17
- };
18
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
19
- readonly meta: {
20
- readonly label: "Current value";
21
- readonly writeable: false;
22
- readonly type: "boolean";
23
- readonly readable: true;
24
- };
25
- options: {
26
- readonly internal: false;
27
- readonly minVersion: 1;
28
- readonly secret: false;
29
- readonly stateful: true;
30
- readonly supportsEndpoints: true;
31
- readonly autoCreate: true;
32
- };
33
- };
34
- targetValue: {
35
- id: {
36
- readonly commandClass: (typeof CommandClasses)["Binary Switch"];
37
- readonly property: "targetValue";
38
- };
39
- endpoint: (endpoint?: number) => {
40
- readonly commandClass: (typeof CommandClasses)["Binary Switch"];
41
- readonly endpoint: number;
42
- readonly property: "targetValue";
43
- };
44
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
45
- readonly meta: {
46
- readonly label: "Target value";
47
- readonly valueChangeOptions: readonly ["transitionDuration"];
48
- readonly type: "boolean";
49
- readonly readable: true;
50
- readonly writeable: true;
51
- };
52
- options: {
53
- readonly internal: false;
54
- readonly minVersion: 1;
55
- readonly secret: false;
56
- readonly stateful: true;
57
- readonly supportsEndpoints: true;
58
- readonly autoCreate: true;
59
- };
60
- };
61
- duration: {
62
- id: {
63
- readonly commandClass: (typeof CommandClasses)["Binary Switch"];
64
- readonly property: "duration";
65
- };
66
- endpoint: (endpoint?: number) => {
67
- readonly commandClass: (typeof CommandClasses)["Binary Switch"];
68
- readonly endpoint: number;
69
- readonly property: "duration";
70
- };
71
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
72
- readonly meta: {
73
- readonly label: "Remaining duration";
74
- readonly writeable: false;
75
- readonly type: "duration";
76
- readonly readable: true;
77
- };
78
- options: {
79
- readonly internal: false;
80
- readonly minVersion: 2;
81
- readonly secret: false;
82
- readonly stateful: true;
83
- readonly supportsEndpoints: true;
84
- readonly autoCreate: true;
85
- };
86
- };
87
- }>;
6
+ import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
7
+ import { BinarySwitchCCValues } from "./_CCValues.generated.js";
8
+ export { BinarySwitchCCValues };
88
9
  export declare class BinarySwitchCCAPI extends CCAPI {
89
10
  supportsCommand(cmd: BinarySwitchCommand): MaybeNotKnown<boolean>;
90
11
  get(): Promise<{
@@ -43,7 +43,6 @@ var import_shared = require("@zwave-js/shared");
43
43
  var import_API = require("../lib/API.js");
44
44
  var import_CommandClass = require("../lib/CommandClass.js");
45
45
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
46
- var import_Values = require("../lib/Values.js");
47
46
  var import_Types = require("../lib/_Types.js");
48
47
  var import_CCValues_generated = require("./_CCValues.generated.js");
49
48
  var __runInitializers = function(thisArg, initializers, value) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/cc/BinarySwitchCC.ts"],
4
- "sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MaybeUnknown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tUNKNOWN_STATE,\n\tValueMetadata,\n\ttype WithAddress,\n\tencodeMaybeBoolean,\n\tmaybeUnknownToString,\n\tparseMaybeBoolean,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\tSET_VALUE_HOOKS,\n\ttype SetValueImplementation,\n\ttype SetValueImplementationHooksFactory,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n\tgetEffectiveCCVersion,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BinarySwitchCommand } from \"../lib/_Types.js\";\n\nexport const BinarySwitchCCValues = V.defineCCValues(\n\tCommandClasses[\"Binary Switch\"],\n\t{\n\t\t...V.staticProperty(\n\t\t\t\"currentValue\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyBoolean,\n\t\t\t\tlabel: \"Current value\",\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"targetValue\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Target value\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"duration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyDuration,\n\t\t\t\tlabel: \"Remaining duration\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\t},\n);\n\n@API(CommandClasses[\"Binary Switch\"])\nexport class BinarySwitchCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: BinarySwitchCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase BinarySwitchCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase BinarySwitchCommand.Set:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tBinarySwitchCommand,\n\t\t\tBinarySwitchCommand.Get,\n\t\t);\n\n\t\tconst cc = new BinarySwitchCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<BinarySwitchCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn {\n\t\t\t\t// interpret unknown values as false\n\t\t\t\tcurrentValue: response.currentValue || false,\n\t\t\t\ttargetValue: response.targetValue,\n\t\t\t\tduration: response.duration,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Sets the switch to the given value\n\t * @param targetValue The target value to set\n\t * @param duration The duration after which the target value should be reached. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`. Only supported in V2 and above.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\ttargetValue: boolean,\n\t\tduration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tBinarySwitchCommand,\n\t\t\tBinarySwitchCommand.Set,\n\t\t);\n\n\t\tconst cc = new BinarySwitchCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: BinarySwitchCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"targetValue\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst duration = Duration.from(options?.transitionDuration);\n\t\t\treturn this.set(value, duration);\n\t\t};\n\t}\n\n\tprotected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = (\n\t\t{ property },\n\t\tvalue,\n\t\toptions,\n\t) => {\n\t\tif (property === \"targetValue\") {\n\t\t\tconst currentValueValueId = BinarySwitchCCValues.currentValue\n\t\t\t\t.endpoint(this.endpoint.index);\n\n\t\t\treturn {\n\t\t\t\toptimisticallyUpdateRelatedValues: (\n\t\t\t\t\t_supervisedAndSuccessful,\n\t\t\t\t) => {\n\t\t\t\t\t// After setting targetValue, optimistically update currentValue\n\t\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t\tthis.tryGetValueDB()?.setValue(\n\t\t\t\t\t\t\tcurrentValueValueId,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (this.isMulticast()) {\n\t\t\t\t\t\t// Figure out which nodes were affected by this command\n\t\t\t\t\t\tconst affectedNodes = this.endpoint.node.physicalNodes\n\t\t\t\t\t\t\t.filter((node) =>\n\t\t\t\t\t\t\t\tnode\n\t\t\t\t\t\t\t\t\t.getEndpoint(this.endpoint.index)\n\t\t\t\t\t\t\t\t\t?.supportsCC(this.ccId)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t// and optimistically update the currentValue\n\t\t\t\t\t\tfor (const node of affectedNodes) {\n\t\t\t\t\t\t\tthis.host\n\t\t\t\t\t\t\t\t.tryGetValueDB(node.id)\n\t\t\t\t\t\t\t\t?.setValue(currentValueValueId, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tverifyChanges: () => {\n\t\t\t\t\tif (this.isSinglecast()) {\n\t\t\t\t\t\t// We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll\n\t\t\t\t\t\tthis.schedulePoll(currentValueValueId, value, {\n\t\t\t\t\t\t\tduration: Duration.from(\n\t\t\t\t\t\t\t\toptions?.transitionDuration,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t// on/off \"transitions\" are usually fast\n\t\t\t\t\t\t\ttransition: \"fast\",\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// For multicasts, do not schedule a refresh - this could cause a LOT of traffic\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t};\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: BinarySwitchCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"currentValue\":\n\t\t\t\tcase \"targetValue\":\n\t\t\t\tcase \"duration\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n}\n\n@commandClass(CommandClasses[\"Binary Switch\"])\n@implementedVersion(2)\n@ccValues(BinarySwitchCCValues)\nexport class BinarySwitchCC extends CommandClass {\n\tdeclare ccCommand: BinarySwitchCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Binary Switch\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying Binary Switch state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst resp = await api.get();\n\t\tif (resp) {\n\t\t\tlet logMessage = `received Binary Switch state:\ncurrent value: ${resp.currentValue}`;\n\t\t\tif (resp.targetValue != undefined) {\n\t\t\t\tlogMessage += `\ntarget value: ${resp.targetValue}\nremaining duration: ${resp.duration?.toString() ?? \"undefined\"}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic setMappedBasicValue(\n\t\tctx: GetValueDB,\n\t\tvalue: number,\n\t): boolean {\n\t\tthis.setValue(ctx, BinarySwitchCCValues.currentValue, value > 0);\n\t\treturn true;\n\t}\n}\n\n// @publicAPI\nexport interface BinarySwitchCCSetOptions {\n\ttargetValue: boolean;\n\tduration?: Duration | string;\n}\n\n@CCCommand(BinarySwitchCommand.Set)\n@useSupervision()\nexport class BinarySwitchCCSet extends BinarySwitchCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BinarySwitchCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = Duration.from(options.duration);\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): BinarySwitchCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst targetValue = !!raw.payload[0];\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 2) {\n\t\t\tduration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic targetValue: boolean;\n\tpublic duration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.targetValue ? 0xff : 0x00,\n\t\t\t(this.duration ?? Duration.default()).serializeSet(),\n\t\t]);\n\n\t\tconst ccVersion = getEffectiveCCVersion(ctx, this);\n\t\tif (\n\t\t\tccVersion < 2 && ctx.getDeviceConfig?.(\n\t\t\t\tthis.nodeId as number,\n\t\t\t)?.compat?.encodeCCsUsingTargetVersion\n\t\t) {\n\t\t\t// When forcing CC version 1, only send the target value\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"target value\": this.targetValue,\n\t\t};\n\t\tif (this.duration != undefined) {\n\t\t\tmessage.duration = this.duration.toString();\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface BinarySwitchCCReportOptions {\n\tcurrentValue?: MaybeUnknown<boolean>;\n\ttargetValue?: MaybeUnknown<boolean>;\n\tduration?: Duration | string;\n}\n\n@CCCommand(BinarySwitchCommand.Report)\n@ccValueProperty(\"currentValue\", BinarySwitchCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BinarySwitchCCValues.targetValue)\n@ccValueProperty(\"duration\", BinarySwitchCCValues.duration)\nexport class BinarySwitchCCReport extends BinarySwitchCC {\n\tpublic constructor(\n\t\toptions: WithAddress<BinarySwitchCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.currentValue = options.currentValue;\n\t\tthis.targetValue = options.targetValue;\n\t\tthis.duration = Duration.from(options.duration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): BinarySwitchCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst currentValue: MaybeUnknown<boolean> | undefined =\n\t\t\tparseMaybeBoolean(\n\t\t\t\traw.payload[0],\n\t\t\t);\n\t\tlet targetValue: MaybeUnknown<boolean> | undefined;\n\t\tlet duration: Duration | undefined;\n\n\t\tif (raw.payload.length >= 3) {\n\t\t\ttargetValue = parseMaybeBoolean(raw.payload[1]);\n\t\t\tduration = Duration.parseReport(raw.payload[2]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tcurrentValue,\n\t\t\ttargetValue,\n\t\t\tduration,\n\t\t});\n\t}\n\n\tpublic readonly currentValue: MaybeUnknown<boolean> | undefined;\n\n\tpublic readonly targetValue: MaybeUnknown<boolean> | undefined;\n\n\tpublic readonly duration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tencodeMaybeBoolean(this.currentValue ?? UNKNOWN_STATE),\n\t\t]);\n\t\tif (this.targetValue !== undefined) {\n\t\t\tthis.payload = Bytes.concat([\n\t\t\t\tthis.payload,\n\t\t\t\t[\n\t\t\t\t\tencodeMaybeBoolean(this.targetValue),\n\t\t\t\t\t(this.duration ?? Duration.default()).serializeReport(),\n\t\t\t\t],\n\t\t\t]);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"current value\": maybeUnknownToString(this.currentValue),\n\t\t};\n\t\tif (this.targetValue !== undefined) {\n\t\t\tmessage[\"target value\"] = maybeUnknownToString(this.targetValue);\n\t\t}\n\t\tif (this.duration != undefined) {\n\t\t\tmessage.duration = this.duration.toString();\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(BinarySwitchCommand.Get)\n@expectedCCResponse(BinarySwitchCCReport)\nexport class BinarySwitchCCGet extends BinarySwitchCC {}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,YAAM,UAAyB;QAC9B,qBAAiB,kCAAqB,KAAK,YAAY;;AAExD,UAAI,KAAK,gBAAgB,QAAW;AACnC,gBAAQ,cAAc,QAAI,kCAAqB,KAAK,WAAW;MAChE;AACA,UAAI,KAAK,YAAY,QAAW;AAC/B,gBAAQ,WAAW,KAAK,SAAS,SAAQ;MAC1C;AACA,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;IAKY,qBAAiB,MAAA;8BAF7B,yCAAU,iCAAoB,GAAG,OACjC,kDAAmB,oBAAoB,CAAC;;;;oBACF;yCAAA,YAAc;WAAA;;;;;;;;AAArD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
3
+ "sources": ["../../../src_gen/cc/BinarySwitchCC.ts"],
4
+ "sourcesContent": ["import * as __validateArgs from \"./BinarySwitchCC._validateArgs.js\";\nconst { validateArgs_BinarySwitchCCAPI_set } = __validateArgs;\nimport { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MaybeUnknown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, UNKNOWN_STATE, ValueMetadata, type WithAddress, encodeMaybeBoolean, maybeUnknownToString, parseMaybeBoolean, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, SET_VALUE_HOOKS, type SetValueImplementation, type SetValueImplementationHooksFactory, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext, getEffectiveCCVersion, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { BinarySwitchCommand } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { BinarySwitchCCValues } from \"./_CCValues.generated.js\";\nexport { BinarySwitchCCValues };\n@API(CommandClasses[\"Binary Switch\"])\nexport class BinarySwitchCCAPI extends CCAPI {\n public supportsCommand(cmd: BinarySwitchCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case BinarySwitchCommand.Get:\n return this.isSinglecast();\n case BinarySwitchCommand.Set:\n return true;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async get() {\n this.assertSupportsCommand(BinarySwitchCommand, BinarySwitchCommand.Get);\n const cc = new BinarySwitchCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<BinarySwitchCCReport>(cc, this.commandOptions);\n if (response) {\n return {\n // interpret unknown values as false\n currentValue: response.currentValue || false,\n targetValue: response.targetValue,\n duration: response.duration,\n };\n }\n }\n /**\n * Sets the switch to the given value\n * @param targetValue The target value to set\n * @param duration The duration after which the target value should be reached. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`. Only supported in V2 and above.\n */\n @validateArgs_BinarySwitchCCAPI_set()\n public async set(targetValue: boolean, duration?: Duration | string): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(BinarySwitchCommand, BinarySwitchCommand.Set);\n const cc = new BinarySwitchCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n targetValue,\n duration,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: BinarySwitchCCAPI, { property }, value, options) {\n if (property !== \"targetValue\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n const duration = Duration.from(options?.transitionDuration);\n return this.set(value, duration);\n };\n }\n protected [SET_VALUE_HOOKS]: SetValueImplementationHooksFactory = ({ property }, value, options) => {\n if (property === \"targetValue\") {\n const currentValueValueId = BinarySwitchCCValues.currentValue\n .endpoint(this.endpoint.index);\n return {\n optimisticallyUpdateRelatedValues: (_supervisedAndSuccessful) => {\n // After setting targetValue, optimistically update currentValue\n if (this.isSinglecast()) {\n this.tryGetValueDB()?.setValue(currentValueValueId, value);\n }\n else if (this.isMulticast()) {\n // Figure out which nodes were affected by this command\n const affectedNodes = this.endpoint.node.physicalNodes\n .filter((node) => node\n .getEndpoint(this.endpoint.index)\n ?.supportsCC(this.ccId));\n // and optimistically update the currentValue\n for (const node of affectedNodes) {\n this.host\n .tryGetValueDB(node.id)\n ?.setValue(currentValueValueId, value);\n }\n }\n },\n verifyChanges: () => {\n if (this.isSinglecast()) {\n // We query currentValue instead of targetValue to make sure that unsolicited updates cancel the scheduled poll\n this.schedulePoll(currentValueValueId, value, {\n duration: Duration.from(options?.transitionDuration),\n // on/off \"transitions\" are usually fast\n transition: \"fast\",\n });\n }\n else {\n // For multicasts, do not schedule a refresh - this could cause a LOT of traffic\n }\n },\n };\n }\n };\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: BinarySwitchCCAPI, { property }) {\n switch (property) {\n case \"currentValue\":\n case \"targetValue\":\n case \"duration\":\n return (await this.get())?.[property];\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n}\n@commandClass(CommandClasses[\"Binary Switch\"])\n@implementedVersion(2)\n@ccValues(BinarySwitchCCValues)\nexport class BinarySwitchCC extends CommandClass {\n declare ccCommand: BinarySwitchCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n await this.refreshValues(ctx);\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Binary Switch\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n // Query the current state\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying Binary Switch state...\",\n direction: \"outbound\",\n });\n const resp = await api.get();\n if (resp) {\n let logMessage = `received Binary Switch state:\ncurrent value: ${resp.currentValue}`;\n if (resp.targetValue != undefined) {\n logMessage += `\ntarget value: ${resp.targetValue}\nremaining duration: ${resp.duration?.toString() ?? \"undefined\"}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n public setMappedBasicValue(ctx: GetValueDB, value: number): boolean {\n this.setValue(ctx, BinarySwitchCCValues.currentValue, value > 0);\n return true;\n }\n}\n// @publicAPI\nexport interface BinarySwitchCCSetOptions {\n targetValue: boolean;\n duration?: Duration | string;\n}\n@CCCommand(BinarySwitchCommand.Set)\n@useSupervision()\nexport class BinarySwitchCCSet extends BinarySwitchCC {\n public constructor(options: WithAddress<BinarySwitchCCSetOptions>) {\n super(options);\n this.targetValue = options.targetValue;\n this.duration = Duration.from(options.duration);\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BinarySwitchCCSet {\n validatePayload(raw.payload.length >= 1);\n const targetValue = !!raw.payload[0];\n let duration: Duration | undefined;\n if (raw.payload.length >= 2) {\n duration = Duration.parseSet(raw.payload[1]);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n targetValue,\n duration,\n });\n }\n public targetValue: boolean;\n public duration: Duration | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.targetValue ? 0xff : 0x00,\n (this.duration ?? Duration.default()).serializeSet(),\n ]);\n const ccVersion = getEffectiveCCVersion(ctx, this);\n if (ccVersion < 2 && ctx.getDeviceConfig?.(this.nodeId as number)?.compat?.encodeCCsUsingTargetVersion) {\n // When forcing CC version 1, only send the target value\n this.payload = this.payload.subarray(0, 1);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"target value\": this.targetValue,\n };\n if (this.duration != undefined) {\n message.duration = this.duration.toString();\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface BinarySwitchCCReportOptions {\n currentValue?: MaybeUnknown<boolean>;\n targetValue?: MaybeUnknown<boolean>;\n duration?: Duration | string;\n}\n@CCCommand(BinarySwitchCommand.Report)\n@ccValueProperty(\"currentValue\", BinarySwitchCCValues.currentValue)\n@ccValueProperty(\"targetValue\", BinarySwitchCCValues.targetValue)\n@ccValueProperty(\"duration\", BinarySwitchCCValues.duration)\nexport class BinarySwitchCCReport extends BinarySwitchCC {\n public constructor(options: WithAddress<BinarySwitchCCReportOptions>) {\n super(options);\n this.currentValue = options.currentValue;\n this.targetValue = options.targetValue;\n this.duration = Duration.from(options.duration);\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): BinarySwitchCCReport {\n validatePayload(raw.payload.length >= 1);\n const currentValue: MaybeUnknown<boolean> | undefined = parseMaybeBoolean(raw.payload[0]);\n let targetValue: MaybeUnknown<boolean> | undefined;\n let duration: Duration | undefined;\n if (raw.payload.length >= 3) {\n targetValue = parseMaybeBoolean(raw.payload[1]);\n duration = Duration.parseReport(raw.payload[2]);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n currentValue,\n targetValue,\n duration,\n });\n }\n public readonly currentValue: MaybeUnknown<boolean> | undefined;\n public readonly targetValue: MaybeUnknown<boolean> | undefined;\n public readonly duration: Duration | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n encodeMaybeBoolean(this.currentValue ?? UNKNOWN_STATE),\n ]);\n if (this.targetValue !== undefined) {\n this.payload = Bytes.concat([\n this.payload,\n [\n encodeMaybeBoolean(this.targetValue),\n (this.duration ?? Duration.default()).serializeReport(),\n ],\n ]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"current value\": maybeUnknownToString(this.currentValue),\n };\n if (this.targetValue !== undefined) {\n message[\"target value\"] = maybeUnknownToString(this.targetValue);\n }\n if (this.duration != undefined) {\n message.duration = this.duration.toString();\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(BinarySwitchCommand.Get)\n@expectedCCResponse(BinarySwitchCCReport)\nexport class BinarySwitchCCGet extends BinarySwitchCC {\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAuT;AACvT,oBAAsB;AACtB,iBAAkN;AAClN,0BAAmH;AACnH,oCAAiI;AAEjI,mBAAoC;AAEpC,gCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AATrC,MAAM,EAAE,mCAAkC,IAAK;IAYlC,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AAiCxC,mBAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAjCpB,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACF,gBAAgB,KAAwB;AAC3C,cAAQ,KAAK;QACT,KAAK,iCAAoB;AACrB,iBAAO,KAAK,aAAY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DB, type MaybeNotKnown, type MessageOrCCLogEntry, type WithAddress } from "@zwave-js/core";
2
2
  import { CCAPI } from "../lib/API.js";
3
3
  import { type CCRaw, CommandClass } from "../lib/CommandClass.js";
4
- import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
5
4
  import { Bytes } from "@zwave-js/shared";
6
5
  import { CRC16Command } from "../lib/_Types.js";
6
+ import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
7
7
  export declare class CRC16CCAPI extends CCAPI {
8
8
  supportsCommand(_cmd: CRC16Command): MaybeNotKnown<boolean>;
9
9
  sendEncapsulated(encapsulatedCC: CommandClass): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/cc/CRC16CC.ts"],
4
- "sourcesContent": ["import {\n\tCRC16_CCITT,\n\tCommandClasses,\n\tEncapsulationFlags,\n\ttype GetNode,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\ttype NodeId,\n\ttype SupportsCC,\n\ttype WithAddress,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\n\nimport type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { CRC16Command } from \"../lib/_Types.js\";\n\nconst headerBuffer = Bytes.from([\n\tCommandClasses[\"CRC-16 Encapsulation\"],\n\tCRC16Command.CommandEncapsulation,\n]);\n\n// @noSetValueAPI\n// @noInterview This CC only has a single encapsulation command\n\n// Encapsulation CCs are used internally and too frequently that we\n// want to pay the cost of validating each call\n/* eslint-disable @zwave-js/ccapi-validate-args */\n\n@API(CommandClasses[\"CRC-16 Encapsulation\"])\nexport class CRC16CCAPI extends CCAPI {\n\tpublic supportsCommand(_cmd: CRC16Command): MaybeNotKnown<boolean> {\n\t\t// switch (cmd) {\n\t\t// \tcase CRC16Command.CommandEncapsulation:\n\t\treturn true; // This is mandatory\n\t\t// }\n\t\t// return super.supportsCommand(cmd);\n\t}\n\n\tpublic async sendEncapsulated(encapsulatedCC: CommandClass): Promise<void> {\n\t\tthis.assertSupportsCommand(\n\t\t\tCRC16Command,\n\t\t\tCRC16Command.CommandEncapsulation,\n\t\t);\n\n\t\tconst cc = new CRC16CCCommandEncapsulation({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tencapsulated: encapsulatedCC,\n\t\t});\n\t\tawait this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"CRC-16 Encapsulation\"])\n@implementedVersion(1)\nexport class CRC16CC extends CommandClass {\n\tdeclare ccCommand: CRC16Command;\n\n\t/** Tests if a command should be supervised and thus requires encapsulation */\n\tpublic static requiresEncapsulation(cc: CommandClass): boolean {\n\t\treturn (\n\t\t\t!!(cc.encapsulationFlags & EncapsulationFlags.CRC16)\n\t\t\t&& !(cc instanceof CRC16CCCommandEncapsulation)\n\t\t);\n\t}\n\n\t/** Encapsulates a command in a CRC-16 CC */\n\tpublic static encapsulate(\n\t\tcc: CommandClass,\n\t): CRC16CCCommandEncapsulation {\n\t\tconst ret = new CRC16CCCommandEncapsulation({\n\t\t\tnodeId: cc.nodeId,\n\t\t\tencapsulated: cc,\n\t\t});\n\n\t\t// Copy the encapsulation flags from the encapsulated command\n\t\t// but omit CRC-16, since we're doing that right now\n\t\tret.encapsulationFlags = cc.encapsulationFlags\n\t\t\t& ~EncapsulationFlags.CRC16;\n\n\t\treturn ret;\n\t}\n}\n\n// @publicAPI\nexport interface CRC16CCCommandEncapsulationOptions {\n\tencapsulated: CommandClass;\n}\n\nfunction getCCResponseForCommandEncapsulation(\n\tctx: GetNode<NodeId & SupportsCC>,\n\tsent: CRC16CCCommandEncapsulation,\n) {\n\tif (sent.encapsulated?.expectsCCResponse(ctx)) {\n\t\treturn CRC16CCCommandEncapsulation;\n\t}\n}\n\n@CCCommand(CRC16Command.CommandEncapsulation)\n@expectedCCResponse(\n\tgetCCResponseForCommandEncapsulation,\n\t() => \"checkEncapsulated\",\n)\nexport class CRC16CCCommandEncapsulation extends CRC16CC {\n\tpublic constructor(\n\t\toptions: WithAddress<CRC16CCCommandEncapsulationOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.encapsulated = options.encapsulated;\n\t\tthis.encapsulated.encapsulatingCC = this as any;\n\t}\n\n\tpublic static async from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): Promise<CRC16CCCommandEncapsulation> {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\n\t\tconst ccBuffer = raw.payload.subarray(0, -2);\n\n\t\t// Verify the CRC\n\t\tlet expectedCRC = CRC16_CCITT(headerBuffer);\n\t\texpectedCRC = CRC16_CCITT(ccBuffer, expectedCRC);\n\t\tconst actualCRC = raw.payload.readUInt16BE(\n\t\t\traw.payload.length - 2,\n\t\t);\n\t\tvalidatePayload(expectedCRC === actualCRC);\n\n\t\tconst encapsulated = await CommandClass.parse(ccBuffer, ctx);\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tencapsulated,\n\t\t});\n\t}\n\n\tpublic encapsulated: CommandClass;\n\n\tpublic async serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst commandBuffer = await this.encapsulated.serialize(ctx);\n\t\t// Reserve 2 bytes for the CRC\n\t\tthis.payload = Bytes.concat([commandBuffer, new Bytes(2)]);\n\n\t\t// Compute and save the CRC16 in the payload\n\t\t// The CC header is included in the CRC computation\n\t\tlet crc = CRC16_CCITT(headerBuffer);\n\t\tcrc = CRC16_CCITT(commandBuffer, crc);\n\t\tthis.payload.writeUInt16BE(crc, this.payload.length - 2);\n\n\t\treturn super.serialize(ctx);\n\t}\n\n\tprotected computeEncapsulationOverhead(): number {\n\t\t// CRC16 adds two bytes CRC to the default overhead\n\t\treturn super.computeEncapsulationOverhead() + 2;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\t// Hide the default payload line\n\t\t\tmessage: undefined,\n\t\t};\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAYO;AACP,iBAAsB;AACtB,0BAAyC;AACzC,oCAMO;AAGP,oBAAsB;AACtB,mBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7B,MAAM,eAAe,oBAAM,KAAK;EAC/B,2BAAe,sBAAsB;EACrC,0BAAa;CACb;IAUY,cAAU,MAAA;8BADtB,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACZ;kCAAA,YAAK;WAAA;;;;;;;;AAArC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACL,gBAAgB,MAAkB;AAGxC,aAAO;IAGR;IAEO,MAAM,iBAAiB,gBAA4B;AACzD,WAAK,sBACJ,2BACA,0BAAa,oBAAoB;AAGlC,YAAM,KAAK,IAAI,4BAA4B;QAC1C,QAAQ,KAAK,SAAS;QACtB,eAAe,KAAK,SAAS;QAC7B,cAAc;OACd;AACD,YAAM,KAAK,KAAK,YAAY,IAAI,KAAK,cAAc;IACpD;;;;IAKY,WAAO,MAAA;8BAFnB,4CAAa,2BAAe,sBAAsB,CAAC,OACnD,kDAAmB,CAAC,CAAC;;;;oBACO;+BAAA,YAAY;WAAA;;;;;;;;AAAzC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAA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AM,gBAAgB,MAAM,KAAK,aAAa,UAAU,GAAG;AAE3D,WAAK,UAAU,oBAAM,OAAO,CAAC,eAAe,IAAI,oBAAM,CAAC,CAAC,CAAC;AAIzD,UAAI,UAAM,yBAAY,YAAY;AAClC,gBAAM,yBAAY,eAAe,GAAG;AACpC,WAAK,QAAQ,cAAc,KAAK,KAAK,QAAQ,SAAS,CAAC;AAEvD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEU,+BAA4B;AAErC,aAAO,MAAM,6BAA4B,IAAK;IAC/C;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;;QAEvB,SAAS;;IAEX;;;;",
3
+ "sources": ["../../../src_gen/cc/CRC16CC.ts"],
4
+ "sourcesContent": ["import { CRC16_CCITT, CommandClasses, EncapsulationFlags, type GetNode, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type NodeId, type SupportsCC, type WithAddress, validatePayload, } from \"@zwave-js/core\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, commandClass, expectedCCResponse, implementedVersion, } from \"../lib/CommandClassDecorators.js\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport { CRC16Command } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nconst headerBuffer = Bytes.from([\n CommandClasses[\"CRC-16 Encapsulation\"],\n CRC16Command.CommandEncapsulation,\n]);\n// @noSetValueAPI\n// @noInterview This CC only has a single encapsulation command\n// Encapsulation CCs are used internally and too frequently that we\n// want to pay the cost of validating each call\n/* eslint-disable @zwave-js/ccapi-validate-args */\n@API(CommandClasses[\"CRC-16 Encapsulation\"])\nexport class CRC16CCAPI extends CCAPI {\n public supportsCommand(_cmd: CRC16Command): MaybeNotKnown<boolean> {\n // switch (cmd) {\n // \tcase CRC16Command.CommandEncapsulation:\n return true; // This is mandatory\n // }\n // return super.supportsCommand(cmd);\n }\n public async sendEncapsulated(encapsulatedCC: CommandClass): Promise<void> {\n this.assertSupportsCommand(CRC16Command, CRC16Command.CommandEncapsulation);\n const cc = new CRC16CCCommandEncapsulation({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n encapsulated: encapsulatedCC,\n });\n await this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"CRC-16 Encapsulation\"])\n@implementedVersion(1)\nexport class CRC16CC extends CommandClass {\n declare ccCommand: CRC16Command;\n /** Tests if a command should be supervised and thus requires encapsulation */\n public static requiresEncapsulation(cc: CommandClass): boolean {\n return (!!(cc.encapsulationFlags & EncapsulationFlags.CRC16)\n && !(cc instanceof CRC16CCCommandEncapsulation));\n }\n /** Encapsulates a command in a CRC-16 CC */\n public static encapsulate(cc: CommandClass): CRC16CCCommandEncapsulation {\n const ret = new CRC16CCCommandEncapsulation({\n nodeId: cc.nodeId,\n encapsulated: cc,\n });\n // Copy the encapsulation flags from the encapsulated command\n // but omit CRC-16, since we're doing that right now\n ret.encapsulationFlags = cc.encapsulationFlags\n & ~EncapsulationFlags.CRC16;\n return ret;\n }\n}\n// @publicAPI\nexport interface CRC16CCCommandEncapsulationOptions {\n encapsulated: CommandClass;\n}\nfunction getCCResponseForCommandEncapsulation(ctx: GetNode<NodeId & SupportsCC>, sent: CRC16CCCommandEncapsulation) {\n if (sent.encapsulated?.expectsCCResponse(ctx)) {\n return CRC16CCCommandEncapsulation;\n }\n}\n@CCCommand(CRC16Command.CommandEncapsulation)\n@expectedCCResponse(getCCResponseForCommandEncapsulation, () => \"checkEncapsulated\")\nexport class CRC16CCCommandEncapsulation extends CRC16CC {\n public constructor(options: WithAddress<CRC16CCCommandEncapsulationOptions>) {\n super(options);\n this.encapsulated = options.encapsulated;\n this.encapsulated.encapsulatingCC = this as any;\n }\n public static async from(raw: CCRaw, ctx: CCParsingContext): Promise<CRC16CCCommandEncapsulation> {\n validatePayload(raw.payload.length >= 3);\n const ccBuffer = raw.payload.subarray(0, -2);\n // Verify the CRC\n let expectedCRC = CRC16_CCITT(headerBuffer);\n expectedCRC = CRC16_CCITT(ccBuffer, expectedCRC);\n const actualCRC = raw.payload.readUInt16BE(raw.payload.length - 2);\n validatePayload(expectedCRC === actualCRC);\n const encapsulated = await CommandClass.parse(ccBuffer, ctx);\n return new this({\n nodeId: ctx.sourceNodeId,\n encapsulated,\n });\n }\n public encapsulated: CommandClass;\n public async serialize(ctx: CCEncodingContext): Promise<Bytes> {\n const commandBuffer = await this.encapsulated.serialize(ctx);\n // Reserve 2 bytes for the CRC\n this.payload = Bytes.concat([commandBuffer, new Bytes(2)]);\n // Compute and save the CRC16 in the payload\n // The CC header is included in the CRC computation\n let crc = CRC16_CCITT(headerBuffer);\n crc = CRC16_CCITT(commandBuffer, crc);\n this.payload.writeUInt16BE(crc, this.payload.length - 2);\n return super.serialize(ctx);\n }\n protected computeEncapsulationOverhead(): number {\n // CRC16 adds two bytes CRC to the default overhead\n return super.computeEncapsulationOverhead() + 2;\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n // Hide the default payload line\n message: undefined,\n };\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAA+M;AAC/M,iBAAsB;AACtB,0BAAyC;AACzC,oCAAsF;AACtF,oBAAsB;AACtB,mBAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7B,MAAM,eAAe,oBAAM,KAAK;EAC5B,2BAAe,sBAAsB;EACrC,0BAAa;CAChB;IAOY,cAAU,MAAA;8BADtB,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACZ;kCAAA,YAAK;WAAA;;;;;;;;AAArC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAA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;IACT,YAAmB,SAAwD;AACvE,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;AAC5B,WAAK,aAAa,kBAAkB;IACxC;IACO,aAAa,KAAK,KAAY,KAAqB;AACtD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,WAAW,IAAI,QAAQ,SAAS,GAAG,EAAE;AAE3C,UAAI,kBAAc,yBAAY,YAAY;AAC1C,wBAAc,yBAAY,UAAU,WAAW;AAC/C,YAAM,YAAY,IAAI,QAAQ,aAAa,IAAI,QAAQ,SAAS,CAAC;AACjE,uCAAgB,gBAAgB,SAAS;AACzC,YAAM,eAAe,MAAM,iCAAa,MAAM,UAAU,GAAG;AAC3D,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;OACH;IACL;IACO;IACA,MAAM,UAAU,KAAsB;AACzC,YAAM,gBAAgB,MAAM,KAAK,aAAa,UAAU,GAAG;AAE3D,WAAK,UAAU,oBAAM,OAAO,CAAC,eAAe,IAAI,oBAAM,CAAC,CAAC,CAAC;AAGzD,UAAI,UAAM,yBAAY,YAAY;AAClC,gBAAM,yBAAY,eAAe,GAAG;AACpC,WAAK,QAAQ,cAAc,KAAK,KAAK,QAAQ,SAAS,CAAC;AACvD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACU,+BAA4B;AAElC,aAAO,MAAM,6BAA4B,IAAK;IAClD;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;;QAEvB,SAAS;;IAEjB;;;;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/cc/CentralSceneCC._validateArgs.ts"],
4
- "sourcesContent": [null],
3
+ "sources": ["../../../src_gen/cc/CentralSceneCC._validateArgs.ts"],
4
+ "sourcesContent": ["import * as v from \"@zwave-js/core/validation\";\n\nexport function validateArgs_CentralSceneCCAPI_setConfiguration() {\n\treturn <T extends Function>(__decoratedMethod: T, { kind }: ClassMethodDecoratorContext): T | void => {\n\t\tif (kind === \"method\") {\n\t\t\treturn function setConfiguration(this: any, slowRefresh: unknown) {\n\t\t\t\tv.assert(\n\t\t\t\t\tv.primitive({ kind: \"parameter\", name: \"slowRefresh\" }, \"boolean\")(slowRefresh),\n\t\t\t\t);\n\t\t\t\treturn __decoratedMethod.call(this, slowRefresh);\n\t\t\t} as unknown as T;\n\t\t}\n\t};\n}"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAAA,QAAmB;AAEb,SAAU,kDAA+C;AAC9D,SAAO,CAAqB,mBAAsB,EAAE,KAAI,MAA6C;AACpG,QAAI,SAAS,UAAU;AACtB,aAAO,gCAAS,iBAA4B,aAAoB;AAC/D,UAAE,OACD,EAAE,UAAU,EAAE,MAAM,aAAa,MAAM,cAAa,GAAI,SAAS,EAAE,WAAW,CAAC;AAEhF,eAAO,kBAAkB,KAAK,MAAM,WAAW;MAChD,GALO;IAMR;EACD;AACD;AAXgB;",
6
6
  "names": []
7
7
  }
@@ -1,144 +1,11 @@
1
- import type { CCEncodingContext, CCParsingContext } from "@zwave-js/cc";
2
1
  import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core";
3
2
  import { Bytes } from "@zwave-js/shared";
4
3
  import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
5
4
  import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext } from "../lib/CommandClass.js";
6
5
  import { CentralSceneCommand, CentralSceneKeys } from "../lib/_Types.js";
7
- export declare const CentralSceneCCValues: Readonly<{
8
- sceneCount: {
9
- id: {
10
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
11
- readonly property: "sceneCount";
12
- };
13
- endpoint: (endpoint?: number) => {
14
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
15
- readonly endpoint: number;
16
- readonly property: "sceneCount";
17
- };
18
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
19
- readonly meta: Readonly<{
20
- readonly type: "any";
21
- readonly readable: true;
22
- readonly writeable: true;
23
- }>;
24
- options: {
25
- readonly internal: true;
26
- readonly minVersion: 1;
27
- readonly secret: false;
28
- readonly stateful: true;
29
- readonly supportsEndpoints: true;
30
- readonly autoCreate: true;
31
- };
32
- };
33
- supportsSlowRefresh: {
34
- id: {
35
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
36
- readonly property: "supportsSlowRefresh";
37
- };
38
- endpoint: (endpoint?: number) => {
39
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
40
- readonly endpoint: number;
41
- readonly property: "supportsSlowRefresh";
42
- };
43
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
44
- readonly meta: Readonly<{
45
- readonly type: "any";
46
- readonly readable: true;
47
- readonly writeable: true;
48
- }>;
49
- options: {
50
- readonly internal: true;
51
- readonly minVersion: 1;
52
- readonly secret: false;
53
- readonly stateful: true;
54
- readonly supportsEndpoints: true;
55
- readonly autoCreate: true;
56
- };
57
- };
58
- supportedKeyAttributes: {
59
- id: {
60
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
61
- readonly property: "supportedKeyAttributes";
62
- };
63
- endpoint: (endpoint?: number) => {
64
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
65
- readonly endpoint: number;
66
- readonly property: "supportedKeyAttributes";
67
- };
68
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
69
- readonly meta: Readonly<{
70
- readonly type: "any";
71
- readonly readable: true;
72
- readonly writeable: true;
73
- }>;
74
- options: {
75
- readonly internal: true;
76
- readonly minVersion: 1;
77
- readonly secret: false;
78
- readonly stateful: true;
79
- readonly supportsEndpoints: true;
80
- readonly autoCreate: true;
81
- };
82
- };
83
- slowRefresh: {
84
- id: {
85
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
86
- readonly property: "slowRefresh";
87
- };
88
- endpoint: (endpoint?: number) => {
89
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
90
- readonly endpoint: number;
91
- readonly property: "slowRefresh";
92
- };
93
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
94
- readonly meta: {
95
- readonly label: "Send held down notifications at a slow rate";
96
- readonly description: "When this is true, KeyHeldDown notifications are sent every 55s. When this is false, the notifications are sent every 200ms.";
97
- readonly type: "boolean";
98
- readonly readable: true;
99
- readonly writeable: true;
100
- };
101
- options: {
102
- readonly internal: false;
103
- readonly minVersion: 1;
104
- readonly secret: false;
105
- readonly stateful: true;
106
- readonly supportsEndpoints: true;
107
- readonly autoCreate: true;
108
- };
109
- };
110
- scene: ((sceneNumber: number) => {
111
- id: {
112
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
113
- readonly property: "scene";
114
- readonly propertyKey: string;
115
- };
116
- endpoint: (endpoint?: number) => {
117
- readonly commandClass: (typeof CommandClasses)["Central Scene"];
118
- readonly endpoint: number;
119
- readonly property: "scene";
120
- readonly propertyKey: string;
121
- };
122
- readonly meta: {
123
- readonly label: `Scene ${string}`;
124
- readonly writeable: false;
125
- readonly min: 0;
126
- readonly max: 255;
127
- readonly type: "number";
128
- readonly readable: true;
129
- };
130
- }) & {
131
- is: (valueId: import("@zwave-js/core").ValueID) => boolean;
132
- options: {
133
- readonly internal: false;
134
- readonly minVersion: 1;
135
- readonly secret: false;
136
- readonly stateful: false;
137
- readonly supportsEndpoints: true;
138
- readonly autoCreate: true;
139
- };
140
- };
141
- }>;
6
+ import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
7
+ import { CentralSceneCCValues } from "./_CCValues.generated.js";
8
+ export { CentralSceneCCValues };
142
9
  export declare class CentralSceneCCAPI extends CCAPI {
143
10
  supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean>;
144
11
  getSupported(): Promise<Pick<CentralSceneCCSupportedReport, "sceneCount" | "supportsSlowRefresh" | "supportedKeyAttributes"> | undefined>;
@@ -46,7 +46,6 @@ var import_shared = require("@zwave-js/shared");
46
46
  var import_API = require("../lib/API.js");
47
47
  var import_CommandClass = require("../lib/CommandClass.js");
48
48
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
49
- var import_Values = require("../lib/Values.js");
50
49
  var import_Types = require("../lib/_Types.js");
51
50
  var ccUtils = __toESM(require("../lib/utils.js"), 1);
52
51
  var import_CCValues_generated = require("./_CCValues.generated.js");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/cc/CentralSceneCC.ts"],
4
- "sourcesContent": ["import type { CCEncodingContext, CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tgetCCName,\n\tmaybeUnknownToString,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { CentralSceneCommand, CentralSceneKeys } from \"../lib/_Types.js\";\nimport * as ccUtils from \"../lib/utils.js\";\n\nexport const CentralSceneCCValues = V.defineCCValues(\n\tCommandClasses[\"Central Scene\"],\n\t{\n\t\t...V.staticProperty(\"sceneCount\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportsSlowRefresh\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedKeyAttributes\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\n\t\t\t\"slowRefresh\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Boolean,\n\t\t\t\tlabel: \"Send held down notifications at a slow rate\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"When this is true, KeyHeldDown notifications are sent every 55s. When this is false, the notifications are sent every 200ms.\",\n\t\t\t} as const,\n\t\t),\n\t\t...V.dynamicPropertyAndKeyWithName(\n\t\t\t\"scene\",\n\t\t\t\"scene\",\n\t\t\t(sceneNumber: number) => sceneNumber.toString().padStart(3, \"0\"),\n\t\t\t({ property, propertyKey }) =>\n\t\t\t\tproperty === \"scene\"\n\t\t\t\t&& typeof propertyKey === \"string\"\n\t\t\t\t&& /^\\d{3}$/.test(propertyKey),\n\t\t\t(sceneNumber: number) => ({\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: `Scene ${sceneNumber.toString().padStart(3, \"0\")}`,\n\t\t\t} as const),\n\t\t\t{ stateful: false } as const,\n\t\t),\n\t},\n);\n\n@API(CommandClasses[\"Central Scene\"])\nexport class CentralSceneCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase CentralSceneCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast(); // this is mandatory\n\t\t\tcase CentralSceneCommand.ConfigurationGet:\n\t\t\t\treturn this.version >= 3 && this.isSinglecast();\n\t\t\tcase CentralSceneCommand.ConfigurationSet:\n\t\t\t\treturn this.version >= 3;\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tCentralSceneCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\n\t\t\t\t\"sceneCount\",\n\t\t\t\t\"supportsSlowRefresh\",\n\t\t\t\t\"supportedKeyAttributes\",\n\t\t\t]);\n\t\t}\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic async getConfiguration() {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.ConfigurationGet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCConfigurationGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tCentralSceneCCConfigurationReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"slowRefresh\"]);\n\t\t}\n\t}\n\n\t@validateArgs()\n\tpublic async setConfiguration(\n\t\tslowRefresh: boolean,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tCentralSceneCommand,\n\t\t\tCentralSceneCommand.ConfigurationSet,\n\t\t);\n\n\t\tconst cc = new CentralSceneCCConfigurationSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tslowRefresh,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: CentralSceneCCAPI, { property }, value) {\n\t\t\tif (property !== \"slowRefresh\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn this.setConfiguration(value);\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: CentralSceneCCAPI, { property }) {\n\t\t\tif (property === \"slowRefresh\") {\n\t\t\t\treturn (await this.getConfiguration())?.[property];\n\t\t\t}\n\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t};\n\t}\n}\n\n@commandClass(CommandClasses[\"Central Scene\"])\n@implementedVersion(3)\n@ccValues(CentralSceneCCValues)\nexport class CentralSceneCC extends CommandClass {\n\tdeclare ccCommand: CentralSceneCommand;\n\n\tpublic determineRequiredCCInterviews(): readonly CommandClasses[] {\n\t\treturn [\n\t\t\t...super.determineRequiredCCInterviews(),\n\t\t\tCommandClasses.Association,\n\t\t\tCommandClasses[\"Multi Channel Association\"],\n\t\t\tCommandClasses[\"Association Group Information\"],\n\t\t];\n\t}\n\n\tpublic skipEndpointInterview(): boolean {\n\t\t// Central scene notifications are issued by the root device\n\t\treturn true;\n\t}\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Central Scene\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// If one Association group issues CentralScene notifications,\n\t\t// we must associate ourselves with that channel\n\t\ttry {\n\t\t\tawait ccUtils.assignLifelineIssueingCommand(\n\t\t\t\tctx,\n\t\t\t\tendpoint,\n\t\t\t\tthis.ccId,\n\t\t\t\tCentralSceneCommand.Notification,\n\t\t\t);\n\t\t} catch {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: endpoint.index,\n\t\t\t\tmessage: `Configuring associations to receive ${\n\t\t\t\t\tgetCCName(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t)\n\t\t\t\t} commands failed!`,\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t}\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"Querying supported scenes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst ccSupported = await api.getSupported();\n\t\tif (ccSupported) {\n\t\t\tconst logMessage = `received supported scenes:\n# of scenes: ${ccSupported.sceneCount}\nsupports slow refresh: ${ccSupported.supportsSlowRefresh}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported scenes timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\t// The slow refresh capability should be enabled whenever possible\n\t\tif (api.version >= 3 && ccSupported?.supportsSlowRefresh) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"Enabling slow refresh capability...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tawait api.setConfiguration(true);\n\t\t}\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n}\n\n// @publicAPI\nexport interface CentralSceneCCNotificationOptions {\n\tsequenceNumber: number;\n\tkeyAttribute: CentralSceneKeys;\n\tsceneNumber: number;\n\tslowRefresh?: boolean;\n}\n\n@CCCommand(CentralSceneCommand.Notification)\nexport class CentralSceneCCNotification extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCNotificationOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sequenceNumber = options.sequenceNumber;\n\t\tthis.keyAttribute = options.keyAttribute;\n\t\tthis.sceneNumber = options.sceneNumber;\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCNotification {\n\t\tvalidatePayload(raw.payload.length >= 3);\n\t\tconst sequenceNumber = raw.payload[0];\n\t\tconst keyAttribute: CentralSceneKeys = raw.payload[1] & 0b111;\n\t\tconst sceneNumber = raw.payload[2];\n\t\tlet slowRefresh: boolean | undefined;\n\t\tif (keyAttribute === CentralSceneKeys.KeyHeldDown) {\n\t\t\t// A receiving node MUST ignore this field if the command is not\n\t\t\t// carrying the Key Held Down key attribute.\n\t\t\tslowRefresh = !!(raw.payload[1] & 0b1000_0000);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsequenceNumber,\n\t\t\tkeyAttribute,\n\t\t\tsceneNumber,\n\t\t\tslowRefresh,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// In case the interview is not yet completed, we still create some basic metadata\n\t\tconst sceneValue = CentralSceneCCValues.scene(this.sceneNumber);\n\n\t\t// Get device configuration to check for custom scene labels\n\t\tconst sceneConfig = ctx.getDeviceConfig?.(this.nodeId as number)\n\t\t\t?.scenes?.get(this.sceneNumber);\n\n\t\tif (sceneConfig) {\n\t\t\t// Ensure metadata with custom label and description\n\t\t\tthis.ensureMetadata(ctx, sceneValue, {\n\t\t\t\t...sceneValue.meta,\n\t\t\t\tlabel: sceneConfig.label,\n\t\t\t\tdescription: sceneConfig.description,\n\t\t\t});\n\t\t} else {\n\t\t\t// Use default metadata\n\t\t\tthis.ensureMetadata(ctx, sceneValue);\n\t\t}\n\n\t\t// The spec behavior is pretty complicated, so we cannot just store\n\t\t// the value and call it a day. Handling of these notifications will\n\t\t// happen in the receiving node class\n\n\t\treturn true;\n\t}\n\n\tpublic readonly sequenceNumber: number;\n\tpublic readonly keyAttribute: CentralSceneKeys;\n\tpublic readonly sceneNumber: number;\n\tpublic readonly slowRefresh: boolean | undefined;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"sequence number\": this.sequenceNumber,\n\t\t\t\"key attribute\": getEnumMemberName(\n\t\t\t\tCentralSceneKeys,\n\t\t\t\tthis.keyAttribute,\n\t\t\t),\n\t\t\t\"scene number\": this.sceneNumber,\n\t\t};\n\t\tif (this.slowRefresh != undefined) {\n\t\t\tmessage[\"slow refresh\"] = this.slowRefresh;\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface CentralSceneCCSupportedReportOptions {\n\tsceneCount: number;\n\tsupportsSlowRefresh: MaybeNotKnown<boolean>;\n\tsupportedKeyAttributes: Record<number, readonly CentralSceneKeys[]>;\n}\n\n@CCCommand(CentralSceneCommand.SupportedReport)\n@ccValueProperty(\"sceneCount\", CentralSceneCCValues.sceneCount)\n@ccValueProperty(\n\t\"supportsSlowRefresh\",\n\tCentralSceneCCValues.supportsSlowRefresh,\n)\n@ccValueProperty(\n\t\"supportedKeyAttributes\",\n\tCentralSceneCCValues.supportedKeyAttributes,\n)\nexport class CentralSceneCCSupportedReport extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.sceneCount = options.sceneCount;\n\t\tthis.supportsSlowRefresh = options.supportsSlowRefresh;\n\t\tfor (\n\t\t\tconst [scene, keys] of Object.entries(\n\t\t\t\toptions.supportedKeyAttributes,\n\t\t\t)\n\t\t) {\n\t\t\tthis._supportedKeyAttributes.set(\n\t\t\t\tparseInt(scene),\n\t\t\t\tkeys,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 2);\n\t\tconst sceneCount = raw.payload[0];\n\t\tconst supportsSlowRefresh: MaybeNotKnown<boolean> =\n\t\t\t!!(raw.payload[1] & 0b1000_0000);\n\t\tconst bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;\n\t\tconst identicalKeyAttributes = !!(raw.payload[1] & 0b1);\n\t\tconst numEntries = identicalKeyAttributes ? 1 : sceneCount;\n\t\tvalidatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);\n\t\tconst supportedKeyAttributes: Record<\n\t\t\tnumber,\n\t\t\treadonly CentralSceneKeys[]\n\t\t> = {};\n\t\tfor (let i = 0; i < numEntries; i++) {\n\t\t\tconst mask = raw.payload.subarray(\n\t\t\t\t2 + i * bitMaskBytes,\n\t\t\t\t2 + (i + 1) * bitMaskBytes,\n\t\t\t);\n\t\t\tsupportedKeyAttributes[i + 1] = parseBitMask(\n\t\t\t\tmask,\n\t\t\t\tCentralSceneKeys.KeyPressed,\n\t\t\t);\n\t\t}\n\n\t\tif (identicalKeyAttributes) {\n\t\t\t// The key attributes are only transmitted for scene 1, copy them to the others\n\t\t\tfor (let i = 2; i <= sceneCount; i++) {\n\t\t\t\tsupportedKeyAttributes[i] = supportedKeyAttributes[1];\n\t\t\t}\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneCount,\n\t\t\tsupportsSlowRefresh,\n\t\t\tsupportedKeyAttributes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Get device configuration to check for custom scene labels\n\t\tconst deviceConfig = ctx.getDeviceConfig?.(this.nodeId as number);\n\n\t\t// Create/extend metadata for all scenes\n\t\tfor (let i = 1; i <= this.sceneCount; i++) {\n\t\t\tconst sceneValue = CentralSceneCCValues.scene(i);\n\t\t\tconst sceneMetadata = { ...sceneValue.meta };\n\n\t\t\t// Check if there's a custom configuration for this scene\n\t\t\tconst sceneConfig = deviceConfig?.scenes?.get(i);\n\t\t\tif (sceneConfig) {\n\t\t\t\t// @ts-expect-error The label type is a literal\n\t\t\t\tsceneMetadata.label = sceneConfig.label;\n\t\t\t}\n\t\t\tif (sceneConfig?.description) {\n\t\t\t\t// @ts-expect-error The predefined metadata has no description\n\t\t\t\tsceneMetadata.description = sceneConfig.description;\n\t\t\t}\n\n\t\t\tthis.setMetadata(ctx, sceneValue, {\n\t\t\t\t...sceneMetadata,\n\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\tCentralSceneKeys,\n\t\t\t\t\tthis._supportedKeyAttributes.get(i),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tpublic readonly sceneCount: number;\n\n\t// TODO: Only offer `slowRefresh` if this is true\n\n\tpublic readonly supportsSlowRefresh: MaybeNotKnown<boolean>;\n\n\tprivate _supportedKeyAttributes = new Map<\n\t\tnumber,\n\t\treadonly CentralSceneKeys[]\n\t>();\n\n\tpublic get supportedKeyAttributes(): ReadonlyMap<\n\t\tnumber,\n\t\treadonly CentralSceneKeys[]\n\t> {\n\t\treturn this._supportedKeyAttributes;\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\t\"scene count\": this.sceneCount,\n\t\t\t\"supports slow refresh\": maybeUnknownToString(\n\t\t\t\tthis.supportsSlowRefresh,\n\t\t\t),\n\t\t};\n\t\tfor (const [scene, keys] of this.supportedKeyAttributes) {\n\t\t\tmessage[`supported attributes (scene #${scene})`] = keys\n\t\t\t\t.map((k) => `\\n\u00B7 ${getEnumMemberName(CentralSceneKeys, k)}`)\n\t\t\t\t.join(\"\");\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(CentralSceneCommand.SupportedGet)\n@expectedCCResponse(CentralSceneCCSupportedReport)\nexport class CentralSceneCCSupportedGet extends CentralSceneCC {}\n\n// @publicAPI\nexport interface CentralSceneCCConfigurationReportOptions {\n\tslowRefresh: boolean;\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationReport)\n@ccValueProperty(\"slowRefresh\", CentralSceneCCValues.slowRefresh)\nexport class CentralSceneCCConfigurationReport extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCConfigurationReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): CentralSceneCCConfigurationReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst slowRefresh = !!(raw.payload[0] & 0b1000_0000);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tslowRefresh,\n\t\t});\n\t}\n\n\tpublic readonly slowRefresh: boolean;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"slow refresh\": this.slowRefresh },\n\t\t};\n\t}\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationGet)\n@expectedCCResponse(CentralSceneCCConfigurationReport)\nexport class CentralSceneCCConfigurationGet extends CentralSceneCC {}\n\n// @publicAPI\nexport interface CentralSceneCCConfigurationSetOptions {\n\tslowRefresh: boolean;\n}\n\n@CCCommand(CentralSceneCommand.ConfigurationSet)\n@useSupervision()\nexport class CentralSceneCCConfigurationSet extends CentralSceneCC {\n\tpublic constructor(\n\t\toptions: WithAddress<CentralSceneCCConfigurationSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.slowRefresh = options.slowRefresh;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): CentralSceneCCConfigurationSet {\n\t\tthrow new ZWaveError(\n\t\t\t`${this.name}: deserialization not implemented`,\n\t\t\tZWaveErrorCodes.Deserialization_NotImplemented,\n\t\t);\n\n\t\t// return new CentralSceneCCConfigurationSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic slowRefresh: boolean;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.slowRefresh ? 0b1000_0000 : 0]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { \"slow refresh\": this.slowRefresh },\n\t\t};\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,oBAA+C;AAE/C,iBAQO;AACP,0BAKO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAAsD;AACtD,cAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyCZ,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AA8D3C,mBAAA,MAAA,MAAA,8BAAA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AAO,KACb,MACA,MAAsB;AAEtB,YAAM,IAAI,uBACT,GAAG,KAAK,IAAI,qCACZ,4BAAgB,8BAA8B;IAMhD;IAEO;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,cAAc,MAAc,CAAC,CAAC;AAC9D,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,gBAAgB,KAAK,YAAW;;IAE7C;;;;",
3
+ "sources": ["../../../src_gen/cc/CentralSceneCC.ts"],
4
+ "sourcesContent": ["import * as __validateArgs from \"./CentralSceneCC._validateArgs.js\";\nconst { validateArgs_CentralSceneCCAPI_setConfiguration } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, getCCName, maybeUnknownToString, parseBitMask, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { CentralSceneCommand, CentralSceneKeys } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport * as ccUtils from \"../lib/utils.js\";\nimport { CentralSceneCCValues } from \"./_CCValues.generated.js\";\nexport { CentralSceneCCValues };\n@API(CommandClasses[\"Central Scene\"])\nexport class CentralSceneCCAPI extends CCAPI {\n public supportsCommand(cmd: CentralSceneCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case CentralSceneCommand.SupportedGet:\n return this.isSinglecast(); // this is mandatory\n case CentralSceneCommand.ConfigurationGet:\n return this.version >= 3 && this.isSinglecast();\n case CentralSceneCommand.ConfigurationSet:\n return this.version >= 3;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getSupported() {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.SupportedGet);\n const cc = new CentralSceneCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<CentralSceneCCSupportedReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"sceneCount\",\n \"supportsSlowRefresh\",\n \"supportedKeyAttributes\",\n ]);\n }\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getConfiguration() {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationGet);\n const cc = new CentralSceneCCConfigurationGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<CentralSceneCCConfigurationReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"slowRefresh\"]);\n }\n }\n @validateArgs_CentralSceneCCAPI_setConfiguration()\n public async setConfiguration(slowRefresh: boolean): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(CentralSceneCommand, CentralSceneCommand.ConfigurationSet);\n const cc = new CentralSceneCCConfigurationSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n slowRefresh,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: CentralSceneCCAPI, { property }, value) {\n if (property !== \"slowRefresh\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof value !== \"boolean\") {\n throwWrongValueType(this.ccId, property, \"boolean\", typeof value);\n }\n return this.setConfiguration(value);\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: CentralSceneCCAPI, { property }) {\n if (property === \"slowRefresh\") {\n return (await this.getConfiguration())?.[property];\n }\n throwUnsupportedProperty(this.ccId, property);\n };\n }\n}\n@commandClass(CommandClasses[\"Central Scene\"])\n@implementedVersion(3)\n@ccValues(CentralSceneCCValues)\nexport class CentralSceneCC extends CommandClass {\n declare ccCommand: CentralSceneCommand;\n public determineRequiredCCInterviews(): readonly CommandClasses[] {\n return [\n ...super.determineRequiredCCInterviews(),\n CommandClasses.Association,\n CommandClasses[\"Multi Channel Association\"],\n CommandClasses[\"Association Group Information\"],\n ];\n }\n public skipEndpointInterview(): boolean {\n // Central scene notifications are issued by the root device\n return true;\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Central Scene\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // If one Association group issues CentralScene notifications,\n // we must associate ourselves with that channel\n try {\n await ccUtils.assignLifelineIssueingCommand(ctx, endpoint, this.ccId, CentralSceneCommand.Notification);\n }\n catch {\n ctx.logNode(node.id, {\n endpoint: endpoint.index,\n message: `Configuring associations to receive ${getCCName(this.ccId)} commands failed!`,\n level: \"warn\",\n });\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported scenes...\",\n direction: \"outbound\",\n });\n const ccSupported = await api.getSupported();\n if (ccSupported) {\n const logMessage = `received supported scenes:\n# of scenes: ${ccSupported.sceneCount}\nsupports slow refresh: ${ccSupported.supportsSlowRefresh}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported scenes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n // The slow refresh capability should be enabled whenever possible\n if (api.version >= 3 && ccSupported?.supportsSlowRefresh) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Enabling slow refresh capability...\",\n direction: \"outbound\",\n });\n await api.setConfiguration(true);\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n}\n// @publicAPI\nexport interface CentralSceneCCNotificationOptions {\n sequenceNumber: number;\n keyAttribute: CentralSceneKeys;\n sceneNumber: number;\n slowRefresh?: boolean;\n}\n@CCCommand(CentralSceneCommand.Notification)\nexport class CentralSceneCCNotification extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCNotificationOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sequenceNumber = options.sequenceNumber;\n this.keyAttribute = options.keyAttribute;\n this.sceneNumber = options.sceneNumber;\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCNotification {\n validatePayload(raw.payload.length >= 3);\n const sequenceNumber = raw.payload[0];\n const keyAttribute: CentralSceneKeys = raw.payload[1] & 0b111;\n const sceneNumber = raw.payload[2];\n let slowRefresh: boolean | undefined;\n if (keyAttribute === CentralSceneKeys.KeyHeldDown) {\n // A receiving node MUST ignore this field if the command is not\n // carrying the Key Held Down key attribute.\n slowRefresh = !!(raw.payload[1] & 128);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sequenceNumber,\n keyAttribute,\n sceneNumber,\n slowRefresh,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // In case the interview is not yet completed, we still create some basic metadata\n const sceneValue = CentralSceneCCValues.scene(this.sceneNumber);\n // Get device configuration to check for custom scene labels\n const sceneConfig = ctx.getDeviceConfig?.(this.nodeId as number)\n ?.scenes?.get(this.sceneNumber);\n if (sceneConfig) {\n // Ensure metadata with custom label and description\n this.ensureMetadata(ctx, sceneValue, {\n ...sceneValue.meta,\n label: sceneConfig.label,\n description: sceneConfig.description,\n });\n }\n else {\n // Use default metadata\n this.ensureMetadata(ctx, sceneValue);\n }\n // The spec behavior is pretty complicated, so we cannot just store\n // the value and call it a day. Handling of these notifications will\n // happen in the receiving node class\n return true;\n }\n public readonly sequenceNumber: number;\n public readonly keyAttribute: CentralSceneKeys;\n public readonly sceneNumber: number;\n public readonly slowRefresh: boolean | undefined;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"sequence number\": this.sequenceNumber,\n \"key attribute\": getEnumMemberName(CentralSceneKeys, this.keyAttribute),\n \"scene number\": this.sceneNumber,\n };\n if (this.slowRefresh != undefined) {\n message[\"slow refresh\"] = this.slowRefresh;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport interface CentralSceneCCSupportedReportOptions {\n sceneCount: number;\n supportsSlowRefresh: MaybeNotKnown<boolean>;\n supportedKeyAttributes: Record<number, readonly CentralSceneKeys[]>;\n}\n@CCCommand(CentralSceneCommand.SupportedReport)\n@ccValueProperty(\"sceneCount\", CentralSceneCCValues.sceneCount)\n@ccValueProperty(\"supportsSlowRefresh\", CentralSceneCCValues.supportsSlowRefresh)\n@ccValueProperty(\"supportedKeyAttributes\", CentralSceneCCValues.supportedKeyAttributes)\nexport class CentralSceneCCSupportedReport extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.sceneCount = options.sceneCount;\n this.supportsSlowRefresh = options.supportsSlowRefresh;\n for (const [scene, keys] of Object.entries(options.supportedKeyAttributes)) {\n this._supportedKeyAttributes.set(parseInt(scene), keys);\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCSupportedReport {\n validatePayload(raw.payload.length >= 2);\n const sceneCount = raw.payload[0];\n const supportsSlowRefresh: MaybeNotKnown<boolean> = !!(raw.payload[1] & 128);\n const bitMaskBytes = (raw.payload[1] & 0b110) >>> 1;\n const identicalKeyAttributes = !!(raw.payload[1] & 0b1);\n const numEntries = identicalKeyAttributes ? 1 : sceneCount;\n validatePayload(raw.payload.length >= 2 + bitMaskBytes * numEntries);\n const supportedKeyAttributes: Record<number, readonly CentralSceneKeys[]> = {};\n for (let i = 0; i < numEntries; i++) {\n const mask = raw.payload.subarray(2 + i * bitMaskBytes, 2 + (i + 1) * bitMaskBytes);\n supportedKeyAttributes[i + 1] = parseBitMask(mask, CentralSceneKeys.KeyPressed);\n }\n if (identicalKeyAttributes) {\n // The key attributes are only transmitted for scene 1, copy them to the others\n for (let i = 2; i <= sceneCount; i++) {\n supportedKeyAttributes[i] = supportedKeyAttributes[1];\n }\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n sceneCount,\n supportsSlowRefresh,\n supportedKeyAttributes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Get device configuration to check for custom scene labels\n const deviceConfig = ctx.getDeviceConfig?.(this.nodeId as number);\n // Create/extend metadata for all scenes\n for (let i = 1; i <= this.sceneCount; i++) {\n const sceneValue = CentralSceneCCValues.scene(i);\n const sceneMetadata = { ...sceneValue.meta };\n // Check if there's a custom configuration for this scene\n const sceneConfig = deviceConfig?.scenes?.get(i);\n if (sceneConfig) {\n // @ts-expect-error The label type is a literal\n sceneMetadata.label = sceneConfig.label;\n }\n if (sceneConfig?.description) {\n // @ts-expect-error The predefined metadata has no description\n sceneMetadata.description = sceneConfig.description;\n }\n this.setMetadata(ctx, sceneValue, {\n ...sceneMetadata,\n states: enumValuesToMetadataStates(CentralSceneKeys, this._supportedKeyAttributes.get(i)),\n });\n }\n return true;\n }\n public readonly sceneCount: number;\n // TODO: Only offer `slowRefresh` if this is true\n public readonly supportsSlowRefresh: MaybeNotKnown<boolean>;\n private _supportedKeyAttributes = new Map<number, readonly CentralSceneKeys[]>();\n public get supportedKeyAttributes(): ReadonlyMap<number, readonly CentralSceneKeys[]> {\n return this._supportedKeyAttributes;\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"scene count\": this.sceneCount,\n \"supports slow refresh\": maybeUnknownToString(this.supportsSlowRefresh),\n };\n for (const [scene, keys] of this.supportedKeyAttributes) {\n message[`supported attributes (scene #${scene})`] = keys\n .map((k) => `\\n\u00B7 ${getEnumMemberName(CentralSceneKeys, k)}`)\n .join(\"\");\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(CentralSceneCommand.SupportedGet)\n@expectedCCResponse(CentralSceneCCSupportedReport)\nexport class CentralSceneCCSupportedGet extends CentralSceneCC {\n}\n// @publicAPI\nexport interface CentralSceneCCConfigurationReportOptions {\n slowRefresh: boolean;\n}\n@CCCommand(CentralSceneCommand.ConfigurationReport)\n@ccValueProperty(\"slowRefresh\", CentralSceneCCValues.slowRefresh)\nexport class CentralSceneCCConfigurationReport extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCConfigurationReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.slowRefresh = options.slowRefresh;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): CentralSceneCCConfigurationReport {\n validatePayload(raw.payload.length >= 1);\n const slowRefresh = !!(raw.payload[0] & 128);\n return new this({\n nodeId: ctx.sourceNodeId,\n slowRefresh,\n });\n }\n public readonly slowRefresh: boolean;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"slow refresh\": this.slowRefresh },\n };\n }\n}\n@CCCommand(CentralSceneCommand.ConfigurationGet)\n@expectedCCResponse(CentralSceneCCConfigurationReport)\nexport class CentralSceneCCConfigurationGet extends CentralSceneCC {\n}\n// @publicAPI\nexport interface CentralSceneCCConfigurationSetOptions {\n slowRefresh: boolean;\n}\n@CCCommand(CentralSceneCommand.ConfigurationSet)\n@useSupervision()\nexport class CentralSceneCCConfigurationSet extends CentralSceneCC {\n public constructor(options: WithAddress<CentralSceneCCConfigurationSetOptions>) {\n super(options);\n this.slowRefresh = options.slowRefresh;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): CentralSceneCCConfigurationSet {\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new CentralSceneCCConfigurationSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public slowRefresh: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.slowRefresh ? 128 : 0]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: { \"slow refresh\": this.slowRefresh },\n };\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAsT;AACtT,oBAA+C;AAC/C,iBAAwJ;AACxJ,0BAA4F;AAC5F,oCAAiI;AAEjI,mBAAsD;AAEtD,cAAyB;AACzB,gCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAVrC,MAAM,EAAE,gDAA+C,IAAK;IAa/C,qBAAiB,MAAA;8BAD7B,mCAAI,2BAAe,eAAe,CAAC,CAAC;;;;oBACE;;;yCAAA,YAAK;WAAA;;;;;;;;AAyCxC,mBAAA,MAAA,MAAA,8BAAA,EAAA,MAAA,UAAA,MAAA,oBAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,sBAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,kBAAb,OAA6B,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAzCjC,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACF,gB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