@zwave-js/cc 14.3.10 → 15.0.0-beta.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 (461) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +139 -57
  2. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  3. package/build/cjs/cc/AssociationCC.d.ts +178 -43
  4. package/build/cjs/cc/AssociationCC.js +0 -4
  5. package/build/cjs/cc/AssociationCC.js.map +2 -2
  6. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +138 -38
  7. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  8. package/build/cjs/cc/BarrierOperatorCC.d.ts +275 -73
  9. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  10. package/build/cjs/cc/BasicCC.d.ts +316 -71
  11. package/build/cjs/cc/BasicCC.js.map +2 -2
  12. package/build/cjs/cc/BatteryCC.d.ts +759 -164
  13. package/build/cjs/cc/BatteryCC.js.map +2 -2
  14. package/build/cjs/cc/BinarySensorCC.d.ts +91 -26
  15. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  16. package/build/cjs/cc/BinarySwitchCC.d.ts +190 -38
  17. package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
  18. package/build/cjs/cc/CRC16CC.d.ts +4 -8
  19. package/build/cjs/cc/CRC16CC.js +4 -27
  20. package/build/cjs/cc/CRC16CC.js.map +2 -2
  21. package/build/cjs/cc/CentralSceneCC.d.ts +272 -53
  22. package/build/cjs/cc/CentralSceneCC.js.map +2 -2
  23. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +150 -37
  24. package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
  25. package/build/cjs/cc/ClockCC.d.ts +3 -3
  26. package/build/cjs/cc/ClockCC.js.map +2 -2
  27. package/build/cjs/cc/ColorSwitchCC.d.ts +423 -96
  28. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  29. package/build/cjs/cc/ConfigurationCC._validateArgs.js +1 -1
  30. package/build/cjs/cc/ConfigurationCC._validateArgs.js.map +1 -1
  31. package/build/cjs/cc/ConfigurationCC.d.ts +101 -37
  32. package/build/cjs/cc/ConfigurationCC.js +0 -8
  33. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  34. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +1 -1
  35. package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
  36. package/build/cjs/cc/DoorLockCC._validateArgs.js +1 -1
  37. package/build/cjs/cc/DoorLockCC._validateArgs.js.map +1 -1
  38. package/build/cjs/cc/DoorLockCC.d.ts +1731 -419
  39. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  40. package/build/cjs/cc/DoorLockLoggingCC.d.ts +64 -12
  41. package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
  42. package/build/cjs/cc/EnergyProductionCC.d.ts +29 -14
  43. package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
  44. package/build/cjs/cc/EntryControlCC.d.ts +308 -57
  45. package/build/cjs/cc/EntryControlCC.js.map +2 -2
  46. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
  47. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js +26 -0
  48. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
  49. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +389 -64
  50. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +154 -8
  51. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
  52. package/build/cjs/cc/HumidityControlModeCC.d.ts +125 -27
  53. package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
  54. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +64 -18
  55. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
  56. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +116 -39
  57. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  58. package/build/cjs/cc/InclusionControllerCC.d.ts +4 -4
  59. package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
  60. package/build/cjs/cc/IndicatorCC.d.ts +325 -83
  61. package/build/cjs/cc/IndicatorCC.js.map +2 -2
  62. package/build/cjs/cc/IrrigationCC.d.ts +2170 -683
  63. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  64. package/build/cjs/cc/LanguageCC.d.ts +128 -26
  65. package/build/cjs/cc/LanguageCC.js.map +2 -2
  66. package/build/cjs/cc/LockCC.d.ts +64 -14
  67. package/build/cjs/cc/LockCC.js.map +2 -2
  68. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
  69. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  70. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +219 -57
  71. package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
  72. package/build/cjs/cc/MeterCC.d.ts +364 -89
  73. package/build/cjs/cc/MeterCC.js.map +2 -2
  74. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +138 -40
  75. package/build/cjs/cc/MultiChannelAssociationCC.js +0 -5
  76. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  77. package/build/cjs/cc/MultiChannelCC.d.ts +469 -99
  78. package/build/cjs/cc/MultiChannelCC.js +8 -72
  79. package/build/cjs/cc/MultiChannelCC.js.map +2 -2
  80. package/build/cjs/cc/MultiCommandCC.d.ts +4 -8
  81. package/build/cjs/cc/MultiCommandCC.js +4 -37
  82. package/build/cjs/cc/MultiCommandCC.js.map +2 -2
  83. package/build/cjs/cc/MultilevelSensorCC.d.ts +118 -33
  84. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  85. package/build/cjs/cc/MultilevelSwitchCC.d.ts +490 -125
  86. package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
  87. package/build/cjs/cc/NodeNamingCC.d.ts +128 -26
  88. package/build/cjs/cc/NodeNamingCC.js.map +2 -2
  89. package/build/cjs/cc/NotificationCC.d.ts +603 -161
  90. package/build/cjs/cc/NotificationCC.js +12 -1
  91. package/build/cjs/cc/NotificationCC.js.map +2 -2
  92. package/build/cjs/cc/PowerlevelCC.d.ts +6 -6
  93. package/build/cjs/cc/PowerlevelCC.js.map +2 -2
  94. package/build/cjs/cc/ProtectionCC.d.ts +496 -94
  95. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  96. package/build/cjs/cc/SceneActivationCC.d.ts +127 -28
  97. package/build/cjs/cc/SceneActivationCC.js.map +2 -2
  98. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +52 -25
  99. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
  100. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +53 -25
  101. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
  102. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +268 -64
  103. package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
  104. package/build/cjs/cc/Security2CC.d.ts +15 -21
  105. package/build/cjs/cc/Security2CC.js +32 -347
  106. package/build/cjs/cc/Security2CC.js.map +3 -3
  107. package/build/cjs/cc/SecurityCC.d.ts +12 -19
  108. package/build/cjs/cc/SecurityCC.js +12 -106
  109. package/build/cjs/cc/SecurityCC.js.map +2 -2
  110. package/build/cjs/cc/SoundSwitchCC.d.ts +253 -64
  111. package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
  112. package/build/cjs/cc/SupervisionCC.d.ts +28 -16
  113. package/build/cjs/cc/SupervisionCC.js +4 -29
  114. package/build/cjs/cc/SupervisionCC.js.map +2 -2
  115. package/build/cjs/cc/ThermostatFanModeCC.d.ts +187 -38
  116. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  117. package/build/cjs/cc/ThermostatFanStateCC.d.ts +64 -18
  118. package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
  119. package/build/cjs/cc/ThermostatModeCC.d.ts +189 -40
  120. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  121. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +65 -19
  122. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  123. package/build/cjs/cc/ThermostatSetbackCC.d.ts +4 -4
  124. package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
  125. package/build/cjs/cc/ThermostatSetpointCC.d.ts +116 -36
  126. package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
  127. package/build/cjs/cc/TimeCC.d.ts +6 -6
  128. package/build/cjs/cc/TimeCC.js.map +2 -2
  129. package/build/cjs/cc/TimeParametersCC.d.ts +63 -12
  130. package/build/cjs/cc/TimeParametersCC.js.map +2 -2
  131. package/build/cjs/cc/TransportServiceCC.d.ts +7 -12
  132. package/build/cjs/cc/TransportServiceCC.js +3 -20
  133. package/build/cjs/cc/TransportServiceCC.js.map +2 -2
  134. package/build/cjs/cc/UserCodeCC._validateArgs.js +1 -1
  135. package/build/cjs/cc/UserCodeCC._validateArgs.js.map +1 -1
  136. package/build/cjs/cc/UserCodeCC.d.ts +931 -176
  137. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  138. package/build/cjs/cc/VersionCC.d.ts +897 -185
  139. package/build/cjs/cc/VersionCC.js.map +2 -2
  140. package/build/cjs/cc/WakeUpCC.d.ts +190 -38
  141. package/build/cjs/cc/WakeUpCC.js.map +2 -2
  142. package/build/cjs/cc/WindowCoveringCC.d.ts +193 -103
  143. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  144. package/build/cjs/cc/ZWavePlusCC.d.ts +311 -51
  145. package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
  146. package/build/cjs/cc/ZWaveProtocolCC.d.ts +28 -28
  147. package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
  148. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
  149. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
  150. package/build/cjs/index.d.ts +1 -0
  151. package/build/cjs/index.js.map +1 -1
  152. package/build/cjs/index_browser.d.ts +9 -0
  153. package/build/cjs/index_browser.js +41 -1
  154. package/build/cjs/index_browser.js.map +2 -2
  155. package/build/cjs/lib/API.d.ts +7 -5
  156. package/build/cjs/lib/API.js +1 -1
  157. package/build/cjs/lib/API.js.map +2 -2
  158. package/build/cjs/lib/CommandClass.d.ts +10 -21
  159. package/build/cjs/lib/CommandClass.js +51 -106
  160. package/build/cjs/lib/CommandClass.js.map +3 -3
  161. package/build/cjs/lib/CommandClassDecorators.d.ts +1 -1
  162. package/build/cjs/lib/CommandClassDecorators.js +3 -3
  163. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  164. package/build/cjs/lib/Values.d.ts +2 -2
  165. package/build/cjs/lib/Values.js.map +2 -2
  166. package/build/cjs/lib/traits.d.ts +94 -0
  167. package/build/cjs/lib/traits.js +17 -0
  168. package/build/cjs/lib/traits.js.map +7 -0
  169. package/build/cjs/lib/utils.d.ts +2 -2
  170. package/build/cjs/lib/utils.js.map +2 -2
  171. package/build/esm/cc/AlarmSensorCC.d.ts +139 -57
  172. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  173. package/build/esm/cc/AlarmSensorCC.js +0 -1
  174. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  175. package/build/esm/cc/AssociationCC.d.ts +178 -43
  176. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  177. package/build/esm/cc/AssociationCC.js +0 -13
  178. package/build/esm/cc/AssociationCC.js.map +1 -1
  179. package/build/esm/cc/AssociationGroupInfoCC.d.ts +138 -38
  180. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  181. package/build/esm/cc/AssociationGroupInfoCC.js +0 -6
  182. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  183. package/build/esm/cc/BarrierOperatorCC.d.ts +275 -73
  184. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  185. package/build/esm/cc/BarrierOperatorCC.js +0 -3
  186. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  187. package/build/esm/cc/BasicCC.d.ts +316 -71
  188. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  189. package/build/esm/cc/BasicCC.js +0 -2
  190. package/build/esm/cc/BasicCC.js.map +1 -1
  191. package/build/esm/cc/BatteryCC.d.ts +759 -164
  192. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  193. package/build/esm/cc/BatteryCC.js +1 -2
  194. package/build/esm/cc/BatteryCC.js.map +1 -1
  195. package/build/esm/cc/BinarySensorCC.d.ts +91 -26
  196. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  197. package/build/esm/cc/BinarySensorCC.js +0 -3
  198. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  199. package/build/esm/cc/BinarySwitchCC.d.ts +190 -38
  200. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  201. package/build/esm/cc/BinarySwitchCC.js +0 -2
  202. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  203. package/build/esm/cc/CRC16CC.d.ts +4 -8
  204. package/build/esm/cc/CRC16CC.d.ts.map +1 -1
  205. package/build/esm/cc/CRC16CC.js +4 -34
  206. package/build/esm/cc/CRC16CC.js.map +1 -1
  207. package/build/esm/cc/CentralSceneCC.d.ts +272 -53
  208. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  209. package/build/esm/cc/CentralSceneCC.js +0 -1
  210. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  211. package/build/esm/cc/ClimateControlScheduleCC.d.ts +150 -37
  212. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  213. package/build/esm/cc/ClimateControlScheduleCC.js +0 -3
  214. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  215. package/build/esm/cc/ClockCC.d.ts +3 -3
  216. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  217. package/build/esm/cc/ClockCC.js +0 -1
  218. package/build/esm/cc/ClockCC.js.map +1 -1
  219. package/build/esm/cc/ColorSwitchCC.d.ts +423 -96
  220. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  221. package/build/esm/cc/ColorSwitchCC.js +0 -6
  222. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  223. package/build/esm/cc/ConfigurationCC._validateArgs.js +1 -1
  224. package/build/esm/cc/ConfigurationCC._validateArgs.js.map +1 -1
  225. package/build/esm/cc/ConfigurationCC.d.ts +101 -37
  226. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  227. package/build/esm/cc/ConfigurationCC.js +0 -25
  228. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  229. package/build/esm/cc/DeviceResetLocallyCC.d.ts +1 -1
  230. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  231. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  232. package/build/esm/cc/DoorLockCC._validateArgs.js +1 -1
  233. package/build/esm/cc/DoorLockCC._validateArgs.js.map +1 -1
  234. package/build/esm/cc/DoorLockCC.d.ts +1731 -419
  235. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  236. package/build/esm/cc/DoorLockCC.js +0 -2
  237. package/build/esm/cc/DoorLockCC.js.map +1 -1
  238. package/build/esm/cc/DoorLockLoggingCC.d.ts +64 -12
  239. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  240. package/build/esm/cc/DoorLockLoggingCC.js +0 -1
  241. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  242. package/build/esm/cc/EnergyProductionCC.d.ts +29 -14
  243. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
  244. package/build/esm/cc/EnergyProductionCC.js +0 -2
  245. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  246. package/build/esm/cc/EntryControlCC.d.ts +308 -57
  247. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  248. package/build/esm/cc/EntryControlCC.js +0 -1
  249. package/build/esm/cc/EntryControlCC.js.map +1 -1
  250. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
  251. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
  252. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js +20 -0
  253. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
  254. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +389 -64
  255. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  256. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +158 -30
  257. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  258. package/build/esm/cc/HumidityControlModeCC.d.ts +125 -27
  259. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  260. package/build/esm/cc/HumidityControlModeCC.js +0 -1
  261. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  262. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +64 -18
  263. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  264. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  265. package/build/esm/cc/HumidityControlSetpointCC.d.ts +116 -39
  266. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  267. package/build/esm/cc/HumidityControlSetpointCC.js +0 -4
  268. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  269. package/build/esm/cc/InclusionControllerCC.d.ts +4 -4
  270. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
  271. package/build/esm/cc/InclusionControllerCC.js +0 -2
  272. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  273. package/build/esm/cc/IndicatorCC.d.ts +325 -83
  274. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  275. package/build/esm/cc/IndicatorCC.js +0 -7
  276. package/build/esm/cc/IndicatorCC.js.map +1 -1
  277. package/build/esm/cc/IrrigationCC.d.ts +2170 -683
  278. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  279. package/build/esm/cc/IrrigationCC.js +0 -9
  280. package/build/esm/cc/IrrigationCC.js.map +1 -1
  281. package/build/esm/cc/LanguageCC.d.ts +128 -26
  282. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  283. package/build/esm/cc/LanguageCC.js +0 -1
  284. package/build/esm/cc/LanguageCC.js.map +1 -1
  285. package/build/esm/cc/LockCC.d.ts +64 -14
  286. package/build/esm/cc/LockCC.d.ts.map +1 -1
  287. package/build/esm/cc/LockCC.js +0 -1
  288. package/build/esm/cc/LockCC.js.map +1 -1
  289. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
  290. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  291. package/build/esm/cc/ManufacturerProprietaryCC.js +0 -1
  292. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  293. package/build/esm/cc/ManufacturerSpecificCC.d.ts +219 -57
  294. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  295. package/build/esm/cc/ManufacturerSpecificCC.js +0 -2
  296. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  297. package/build/esm/cc/MeterCC.d.ts +364 -89
  298. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  299. package/build/esm/cc/MeterCC.js +0 -4
  300. package/build/esm/cc/MeterCC.js.map +1 -1
  301. package/build/esm/cc/MultiChannelAssociationCC.d.ts +138 -40
  302. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  303. package/build/esm/cc/MultiChannelAssociationCC.js +0 -16
  304. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  305. package/build/esm/cc/MultiChannelCC.d.ts +469 -99
  306. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  307. package/build/esm/cc/MultiChannelCC.js +8 -101
  308. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  309. package/build/esm/cc/MultiCommandCC.d.ts +4 -8
  310. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
  311. package/build/esm/cc/MultiCommandCC.js +4 -38
  312. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  313. package/build/esm/cc/MultilevelSensorCC.d.ts +118 -33
  314. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  315. package/build/esm/cc/MultilevelSensorCC.js +0 -5
  316. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  317. package/build/esm/cc/MultilevelSwitchCC.d.ts +490 -125
  318. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  319. package/build/esm/cc/MultilevelSwitchCC.js +0 -4
  320. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  321. package/build/esm/cc/NodeNamingCC.d.ts +128 -26
  322. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  323. package/build/esm/cc/NodeNamingCC.js +0 -2
  324. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  325. package/build/esm/cc/NotificationCC.d.ts +603 -161
  326. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  327. package/build/esm/cc/NotificationCC.js +18 -12
  328. package/build/esm/cc/NotificationCC.js.map +1 -1
  329. package/build/esm/cc/PowerlevelCC.d.ts +6 -6
  330. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
  331. package/build/esm/cc/PowerlevelCC.js +0 -4
  332. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  333. package/build/esm/cc/ProtectionCC.d.ts +496 -94
  334. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  335. package/build/esm/cc/ProtectionCC.js +0 -3
  336. package/build/esm/cc/ProtectionCC.js.map +1 -1
  337. package/build/esm/cc/SceneActivationCC.d.ts +127 -28
  338. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  339. package/build/esm/cc/SceneActivationCC.js +0 -1
  340. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  341. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +52 -25
  342. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  343. package/build/esm/cc/SceneActuatorConfigurationCC.js +0 -2
  344. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  345. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +53 -25
  346. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  347. package/build/esm/cc/SceneControllerConfigurationCC.js +0 -2
  348. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  349. package/build/esm/cc/ScheduleEntryLockCC.d.ts +268 -64
  350. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  351. package/build/esm/cc/ScheduleEntryLockCC.js +0 -14
  352. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  353. package/build/esm/cc/Security2CC.d.ts +15 -21
  354. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  355. package/build/esm/cc/Security2CC.js +27 -475
  356. package/build/esm/cc/Security2CC.js.map +1 -1
  357. package/build/esm/cc/SecurityCC.d.ts +12 -19
  358. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  359. package/build/esm/cc/SecurityCC.js +13 -138
  360. package/build/esm/cc/SecurityCC.js.map +1 -1
  361. package/build/esm/cc/SoundSwitchCC.d.ts +253 -64
  362. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  363. package/build/esm/cc/SoundSwitchCC.js +0 -7
  364. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  365. package/build/esm/cc/SupervisionCC.d.ts +28 -16
  366. package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
  367. package/build/esm/cc/SupervisionCC.js +4 -34
  368. package/build/esm/cc/SupervisionCC.js.map +1 -1
  369. package/build/esm/cc/ThermostatFanModeCC.d.ts +187 -38
  370. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  371. package/build/esm/cc/ThermostatFanModeCC.js +0 -1
  372. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  373. package/build/esm/cc/ThermostatFanStateCC.d.ts +64 -18
  374. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  375. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  376. package/build/esm/cc/ThermostatModeCC.d.ts +189 -40
  377. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  378. package/build/esm/cc/ThermostatModeCC.js +0 -3
  379. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  380. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +65 -19
  381. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  382. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  383. package/build/esm/cc/ThermostatSetbackCC.d.ts +4 -4
  384. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
  385. package/build/esm/cc/ThermostatSetbackCC.js +0 -2
  386. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  387. package/build/esm/cc/ThermostatSetpointCC.d.ts +116 -36
  388. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  389. package/build/esm/cc/ThermostatSetpointCC.js +0 -6
  390. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  391. package/build/esm/cc/TimeCC.d.ts +6 -6
  392. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  393. package/build/esm/cc/TimeCC.js +0 -4
  394. package/build/esm/cc/TimeCC.js.map +1 -1
  395. package/build/esm/cc/TimeParametersCC.d.ts +63 -12
  396. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  397. package/build/esm/cc/TimeParametersCC.js +0 -1
  398. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  399. package/build/esm/cc/TransportServiceCC.d.ts +7 -12
  400. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  401. package/build/esm/cc/TransportServiceCC.js +5 -38
  402. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  403. package/build/esm/cc/UserCodeCC._validateArgs.js +1 -1
  404. package/build/esm/cc/UserCodeCC._validateArgs.js.map +1 -1
  405. package/build/esm/cc/UserCodeCC.d.ts +931 -176
  406. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  407. package/build/esm/cc/UserCodeCC.js +0 -12
  408. package/build/esm/cc/UserCodeCC.js.map +1 -1
  409. package/build/esm/cc/VersionCC.d.ts +897 -185
  410. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  411. package/build/esm/cc/VersionCC.js +0 -4
  412. package/build/esm/cc/VersionCC.js.map +1 -1
  413. package/build/esm/cc/WakeUpCC.d.ts +190 -38
  414. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  415. package/build/esm/cc/WakeUpCC.js +0 -1
  416. package/build/esm/cc/WakeUpCC.js.map +1 -1
  417. package/build/esm/cc/WindowCoveringCC.d.ts +193 -103
  418. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  419. package/build/esm/cc/WindowCoveringCC.js +0 -5
  420. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  421. package/build/esm/cc/ZWavePlusCC.d.ts +311 -51
  422. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  423. package/build/esm/cc/ZWavePlusCC.js +0 -1
  424. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  425. package/build/esm/cc/ZWaveProtocolCC.d.ts +28 -28
  426. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  427. package/build/esm/cc/ZWaveProtocolCC.js +0 -27
  428. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  429. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
  430. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  431. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +0 -3
  432. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  433. package/build/esm/index.d.ts +1 -0
  434. package/build/esm/index.d.ts.map +1 -1
  435. package/build/esm/index_browser.d.ts +9 -0
  436. package/build/esm/index_browser.d.ts.map +1 -1
  437. package/build/esm/index_browser.js +8 -1
  438. package/build/esm/index_browser.js.map +1 -1
  439. package/build/esm/lib/API.d.ts +7 -5
  440. package/build/esm/lib/API.d.ts.map +1 -1
  441. package/build/esm/lib/API.js +1 -1
  442. package/build/esm/lib/API.js.map +1 -1
  443. package/build/esm/lib/CommandClass.d.ts +10 -21
  444. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  445. package/build/esm/lib/CommandClass.js +8 -101
  446. package/build/esm/lib/CommandClass.js.map +1 -1
  447. package/build/esm/lib/CommandClassDecorators.d.ts +1 -1
  448. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  449. package/build/esm/lib/CommandClassDecorators.js +1 -1
  450. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  451. package/build/esm/lib/Values.d.ts +2 -2
  452. package/build/esm/lib/Values.d.ts.map +1 -1
  453. package/build/esm/lib/Values.js.map +1 -1
  454. package/build/esm/lib/traits.d.ts +94 -0
  455. package/build/esm/lib/traits.d.ts.map +1 -0
  456. package/build/esm/lib/traits.js +2 -0
  457. package/build/esm/lib/traits.js.map +1 -0
  458. package/build/esm/lib/utils.d.ts +2 -2
  459. package/build/esm/lib/utils.d.ts.map +1 -1
  460. package/build/esm/lib/utils.js.map +1 -1
  461. package/package.json +13 -13
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/ProtectionCC.ts"],
4
- "sourcesContent": ["import {\n\tCommandClasses,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tTimeout,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\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\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 {\n\tLocalProtectionState,\n\tProtectionCommand,\n\tRFProtectionState,\n} from \"../lib/_Types.js\";\n\nexport const ProtectionCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Protection, {\n\t\t...V.staticProperty(\n\t\t\t\"exclusiveControlNodeId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tmax: MAX_NODES,\n\t\t\t\tlabel: \"Node ID with exclusive control\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"localProtectionState\",\n\t\t\t\"local\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Local protection state\",\n\t\t\t\tstates: enumValuesToMetadataStates(LocalProtectionState),\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"rfProtectionState\",\n\t\t\t\"rf\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"RF protection state\",\n\t\t\t\tstates: enumValuesToMetadataStates(RFProtectionState),\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"timeout\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"RF protection timeout\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\"supportsExclusiveControl\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportsTimeout\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedLocalStates\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedRFStates\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t}),\n});\n\n@API(CommandClasses.Protection)\nexport class ProtectionCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ProtectionCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ProtectionCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ProtectionCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase ProtectionCommand.SupportedGet:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase ProtectionCommand.TimeoutGet:\n\t\t\tcase ProtectionCommand.TimeoutSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsTimeout.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase ProtectionCommand.ExclusiveControlGet:\n\t\t\tcase ProtectionCommand.ExclusiveControlSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsExclusiveControl.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }, value) {\n\t\t\tconst valueDB = this.tryGetValueDB();\n\t\t\tif (property === \"local\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst rf = valueDB?.getValue<RFProtectionState>(\n\t\t\t\t\tProtectionCCValues.rfProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(value, rf);\n\t\t\t} else if (property === \"rf\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst local = valueDB?.getValue<LocalProtectionState>(\n\t\t\t\t\tProtectionCCValues.localProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(\n\t\t\t\t\tlocal ?? LocalProtectionState.Unprotected,\n\t\t\t\t\tvalue,\n\t\t\t\t);\n\t\t\t} else if (property === \"exclusiveControlNodeId\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.setExclusiveControl(value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"local\":\n\t\t\t\tcase \"rf\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tcase \"exclusiveControlNodeId\":\n\t\t\t\t\treturn this.getExclusiveControl();\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\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Get);\n\n\t\tconst cc = new ProtectionCCGet({\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<ProtectionCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"local\", \"rf\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tlocal: LocalProtectionState,\n\t\trf?: RFProtectionState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Set);\n\n\t\tconst cc = new ProtectionCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCSupportedGet({\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\tProtectionCCSupportedReport\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\"supportsExclusiveControl\",\n\t\t\t\t\"supportsTimeout\",\n\t\t\t\t\"supportedLocalStates\",\n\t\t\t\t\"supportedRFStates\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getExclusiveControl(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlGet({\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\tProtectionCCExclusiveControlReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.exclusiveControlNodeId;\n\t}\n\n\t@validateArgs()\n\tpublic async setExclusiveControl(\n\t\tnodeId: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\texclusiveControlNodeId: nodeId,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getTimeout(): Promise<MaybeNotKnown<Timeout>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutGet({\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\tProtectionCCTimeoutReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.timeout;\n\t}\n\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\ttimeout: Timeout,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Protection)\n@implementedVersion(2)\n@ccValues(ProtectionCCValues)\nexport class ProtectionCC extends CommandClass {\n\tdeclare ccCommand: ProtectionCommand;\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.Protection,\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// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// First find out what the device supports\n\t\tif (api.version >= 2) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getSupported();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received protection capabilities:\nexclusive control: ${resp.supportsExclusiveControl}\ntimeout: ${resp.supportsTimeout}\nlocal protection states: ${\n\t\t\t\t\tresp.supportedLocalStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nRF protection states: ${\n\t\t\t\t\tresp.supportedRFStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(RFProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.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.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst supportsExclusiveControl = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsExclusiveControl,\n\t\t);\n\t\tconst supportsTimeout = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsTimeout,\n\t\t);\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tmessage: \"querying protection status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst protectionResp = await api.get();\n\t\tif (protectionResp) {\n\t\t\tlet logMessage = `received protection status:\nlocal: ${getEnumMemberName(LocalProtectionState, protectionResp.local)}`;\n\t\t\tif (protectionResp.rf != undefined) {\n\t\t\t\tlogMessage += `\nrf ${getEnumMemberName(RFProtectionState, protectionResp.rf)}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tif (supportsTimeout) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection timeout...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst timeout = await api.getTimeout();\n\t\t\tif (timeout) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: `received timeout: ${timeout.toString()}`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (supportsExclusiveControl) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying exclusive control node...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst nodeId = await api.getExclusiveControl();\n\t\t\tif (nodeId != undefined) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: (nodeId !== 0\n\t\t\t\t\t\t? `Node ${nodeId.toString().padStart(3, \"0\")}`\n\t\t\t\t\t\t: `no node`) + ` has exclusive control`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCSetOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Set)\n@useSupervision()\nexport class ProtectionCCSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(_raw: CCRaw, _ctx: CCParsingContext): ProtectionCCSet {\n\t\t// TODO: Deserialize payload\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 ProtectionCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic local: LocalProtectionState;\n\tpublic rf?: RFProtectionState;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.local & 0b1111,\n\t\t\t(this.rf ?? RFProtectionState.Unprotected) & 0b1111,\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 include the local state\n\t\t\tthis.payload = this.payload.subarray(0, 1);\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\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 ProtectionCCReportOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Report)\n@ccValueProperty(\"local\", ProtectionCCValues.localProtectionState)\n@ccValueProperty(\"rf\", ProtectionCCValues.rfProtectionState)\nexport class ProtectionCCReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ProtectionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst local: LocalProtectionState = raw.payload[0] & 0b1111;\n\t\tlet rf: RFProtectionState | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\trf = raw.payload[1] & 0b1111;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t}\n\n\tpublic readonly local: LocalProtectionState;\n\n\tpublic readonly rf?: RFProtectionState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\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(ProtectionCommand.Get)\n@expectedCCResponse(ProtectionCCReport)\nexport class ProtectionCCGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCSupportedReportOptions {\n\tsupportsTimeout: boolean;\n\tsupportsExclusiveControl: boolean;\n\tsupportedLocalStates: LocalProtectionState[];\n\tsupportedRFStates: RFProtectionState[];\n}\n\n@CCCommand(ProtectionCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportsExclusiveControl\",\n\tProtectionCCValues.supportsExclusiveControl,\n)\n@ccValueProperty(\"supportsTimeout\", ProtectionCCValues.supportsTimeout)\n@ccValueProperty(\n\t\"supportedLocalStates\",\n\tProtectionCCValues.supportedLocalStates,\n)\n@ccValueProperty(\"supportedRFStates\", ProtectionCCValues.supportedRFStates)\nexport class ProtectionCCSupportedReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportsTimeout = options.supportsTimeout;\n\t\tthis.supportsExclusiveControl = options.supportsExclusiveControl;\n\t\tthis.supportedLocalStates = options.supportedLocalStates;\n\t\tthis.supportedRFStates = options.supportedRFStates;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst supportsTimeout = !!(raw.payload[0] & 0b1);\n\t\tconst supportsExclusiveControl = !!(raw.payload[0] & 0b10);\n\t\tconst supportedLocalStates: LocalProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(1, 3),\n\t\t\tLocalProtectionState.Unprotected,\n\t\t);\n\t\tconst supportedRFStates: RFProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(3, 5),\n\t\t\tRFProtectionState.Unprotected,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportsTimeout,\n\t\t\tsupportsExclusiveControl,\n\t\t\tsupportedLocalStates,\n\t\t\tsupportedRFStates,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// update metadata (partially) for the local and rf values\n\t\tconst localStateValue = ProtectionCCValues.localProtectionState;\n\t\tthis.setMetadata(ctx, localStateValue, {\n\t\t\t...localStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tLocalProtectionState,\n\t\t\t\tthis.supportedLocalStates,\n\t\t\t),\n\t\t});\n\n\t\tconst rfStateValue = ProtectionCCValues.rfProtectionState;\n\t\tthis.setMetadata(ctx, rfStateValue, {\n\t\t\t...rfStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tRFProtectionState,\n\t\t\t\tthis.supportedRFStates,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportsExclusiveControl: boolean;\n\n\tpublic readonly supportsTimeout: boolean;\n\n\tpublic readonly supportedLocalStates: LocalProtectionState[];\n\n\tpublic readonly supportedRFStates: RFProtectionState[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supports exclusive control\": this.supportsExclusiveControl,\n\t\t\t\t\"supports timeout\": this.supportsTimeout,\n\t\t\t\t\"local protection states\": this.supportedLocalStates\n\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t)\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"RF protection states\": this.supportedRFStates\n\t\t\t\t\t.map((rf) => getEnumMemberName(RFProtectionState, rf))\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.SupportedGet)\n@expectedCCResponse(ProtectionCCSupportedReport)\nexport class ProtectionCCSupportedGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlReportOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlReport)\n@ccValueProperty(\n\t\"exclusiveControlNodeId\",\n\tProtectionCCValues.exclusiveControlNodeId,\n)\nexport class ProtectionCCExclusiveControlReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst exclusiveControlNodeId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\texclusiveControlNodeId,\n\t\t});\n\t}\n\n\tpublic readonly exclusiveControlNodeId: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlGet)\n@expectedCCResponse(ProtectionCCExclusiveControlReport)\nexport class ProtectionCCExclusiveControlGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlSetOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCExclusiveControlSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlSet {\n\t\t// TODO: Deserialize payload\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 ProtectionCCExclusiveControlSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic exclusiveControlNodeId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.exclusiveControlNodeId]);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\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: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutReportOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutReport)\n@ccValueProperty(\"timeout\", ProtectionCCValues.timeout)\nexport class ProtectionCCTimeoutReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCTimeoutReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst timeout: Timeout = Timeout.parse(raw.payload[0]);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttimeout,\n\t\t});\n\t}\n\n\tpublic readonly timeout: Timeout;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.TimeoutGet)\n@expectedCCResponse(ProtectionCCTimeoutReport)\nexport class ProtectionCCTimeoutGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutSetOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCTimeoutSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCTimeoutSet {\n\t\t// TODO: Deserialize payload\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 ProtectionCCTimeoutSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic timeout: Timeout;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([this.timeout.serialize()]);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\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: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAgBO;AAMP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAIO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,qBAAqB,OAAO,OAAO;EAC/C,GAAG,gBAAE,qBAAqB,2BAAe,YAAY;IACpD,GAAG,gBAAE,eACJ,0BACA;MACC,GAAG,0BAAc;MACjB,KAAK;MACL,KAAK;MACL,O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sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\tMAX_NODES,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tTimeout,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\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\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 {\n\tLocalProtectionState,\n\tProtectionCommand,\n\tRFProtectionState,\n} from \"../lib/_Types.js\";\n\nexport const ProtectionCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Protection, {\n\t\t...V.staticProperty(\n\t\t\t\"exclusiveControlNodeId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tmax: MAX_NODES,\n\t\t\t\tlabel: \"Node ID with exclusive control\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"localProtectionState\",\n\t\t\t\"local\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"Local protection state\",\n\t\t\t\tstates: enumValuesToMetadataStates(LocalProtectionState),\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticPropertyWithName(\n\t\t\t\"rfProtectionState\",\n\t\t\t\"rf\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Number,\n\t\t\t\tlabel: \"RF protection state\",\n\t\t\t\tstates: enumValuesToMetadataStates(RFProtectionState),\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"timeout\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tlabel: \"RF protection timeout\",\n\t\t\t} as const,\n\t\t\t{ minVersion: 2 } as const,\n\t\t),\n\n\t\t...V.staticProperty(\"supportsExclusiveControl\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportsTimeout\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedLocalStates\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t\t...V.staticProperty(\"supportedRFStates\", undefined, {\n\t\t\tinternal: true,\n\t\t}),\n\t}),\n});\n\n@API(CommandClasses.Protection)\nexport class ProtectionCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ProtectionCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ProtectionCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ProtectionCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t\tcase ProtectionCommand.SupportedGet:\n\t\t\t\treturn this.version >= 2 && this.isSinglecast();\n\t\t\tcase ProtectionCommand.TimeoutGet:\n\t\t\tcase ProtectionCommand.TimeoutSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsTimeout.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\tcase ProtectionCommand.ExclusiveControlGet:\n\t\t\tcase ProtectionCommand.ExclusiveControlSet: {\n\t\t\t\treturn (\n\t\t\t\t\tthis.isSinglecast()\n\t\t\t\t\t&& this.tryGetValueDB()?.getValue<boolean>(\n\t\t\t\t\t\tProtectionCCValues.supportsExclusiveControl.endpoint(\n\t\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }, value) {\n\t\t\tconst valueDB = this.tryGetValueDB();\n\t\t\tif (property === \"local\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst rf = valueDB?.getValue<RFProtectionState>(\n\t\t\t\t\tProtectionCCValues.rfProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(value, rf);\n\t\t\t} else if (property === \"rf\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We need to set both values together, so retrieve the other one from the value DB\n\t\t\t\tconst local = valueDB?.getValue<LocalProtectionState>(\n\t\t\t\t\tProtectionCCValues.localProtectionState.endpoint(\n\t\t\t\t\t\tthis.endpoint.index,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn this.set(\n\t\t\t\t\tlocal ?? LocalProtectionState.Unprotected,\n\t\t\t\t\tvalue,\n\t\t\t\t);\n\t\t\t} else if (property === \"exclusiveControlNodeId\") {\n\t\t\t\tif (typeof value !== \"number\") {\n\t\t\t\t\tthrowWrongValueType(\n\t\t\t\t\t\tthis.ccId,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\"number\",\n\t\t\t\t\t\ttypeof value,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn this.setExclusiveControl(value);\n\t\t\t} else {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ProtectionCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"local\":\n\t\t\t\tcase \"rf\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\t\t\t\tcase \"exclusiveControlNodeId\":\n\t\t\t\t\treturn this.getExclusiveControl();\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\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Get);\n\n\t\tconst cc = new ProtectionCCGet({\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<ProtectionCCReport>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"local\", \"rf\"]);\n\t\t}\n\t}\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tlocal: LocalProtectionState,\n\t\trf?: RFProtectionState,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(ProtectionCommand, ProtectionCommand.Set);\n\n\t\tconst cc = new ProtectionCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async getSupported() {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCSupportedGet({\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\tProtectionCCSupportedReport\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\"supportsExclusiveControl\",\n\t\t\t\t\"supportsTimeout\",\n\t\t\t\t\"supportedLocalStates\",\n\t\t\t\t\"supportedRFStates\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tpublic async getExclusiveControl(): Promise<MaybeNotKnown<number>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlGet({\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\tProtectionCCExclusiveControlReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.exclusiveControlNodeId;\n\t}\n\n\t@validateArgs()\n\tpublic async setExclusiveControl(\n\t\tnodeId: number,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.ExclusiveControlSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCExclusiveControlSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\texclusiveControlNodeId: nodeId,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getTimeout(): Promise<MaybeNotKnown<Timeout>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutGet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutGet({\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\tProtectionCCTimeoutReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.timeout;\n\t}\n\n\t@validateArgs()\n\tpublic async setTimeout(\n\t\ttimeout: Timeout,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tProtectionCommand,\n\t\t\tProtectionCommand.TimeoutSet,\n\t\t);\n\n\t\tconst cc = new ProtectionCCTimeoutSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\ttimeout,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses.Protection)\n@implementedVersion(2)\n@ccValues(ProtectionCCValues)\nexport class ProtectionCC extends CommandClass {\n\tdeclare ccCommand: ProtectionCommand;\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.Protection,\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// We need to do some queries after a potential timeout\n\t\t// In this case, do now mark this CC as interviewed completely\n\t\tlet hadCriticalTimeout = false;\n\n\t\t// First find out what the device supports\n\t\tif (api.version >= 2) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection capabilities...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst resp = await api.getSupported();\n\t\t\tif (resp) {\n\t\t\t\tconst logMessage = `received protection capabilities:\nexclusive control: ${resp.supportsExclusiveControl}\ntimeout: ${resp.supportsTimeout}\nlocal protection states: ${\n\t\t\t\t\tresp.supportedLocalStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}\nRF protection states: ${\n\t\t\t\t\tresp.supportedRFStates\n\t\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\t\tgetEnumMemberName(RFProtectionState, local)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t\t.join(\"\")\n\t\t\t\t}`;\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: logMessage,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\thadCriticalTimeout = true;\n\t\t\t}\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tif (!hadCriticalTimeout) this.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.Protection,\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tconst supportsExclusiveControl = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsExclusiveControl,\n\t\t);\n\t\tconst supportsTimeout = !!this.getValue(\n\t\t\tctx,\n\t\t\tProtectionCCValues.supportsTimeout,\n\t\t);\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tmessage: \"querying protection status...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst protectionResp = await api.get();\n\t\tif (protectionResp) {\n\t\t\tlet logMessage = `received protection status:\nlocal: ${getEnumMemberName(LocalProtectionState, protectionResp.local)}`;\n\t\t\tif (protectionResp.rf != undefined) {\n\t\t\t\tlogMessage += `\nrf ${getEnumMemberName(RFProtectionState, protectionResp.rf)}`;\n\t\t\t}\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\n\t\tif (supportsTimeout) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying protection timeout...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst timeout = await api.getTimeout();\n\t\t\tif (timeout) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: `received timeout: ${timeout.toString()}`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (supportsExclusiveControl) {\n\t\t\t// Query the current timeout\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tmessage: \"querying exclusive control node...\",\n\t\t\t\tdirection: \"outbound\",\n\t\t\t});\n\t\t\tconst nodeId = await api.getExclusiveControl();\n\t\t\tif (nodeId != undefined) {\n\t\t\t\tctx.logNode(node.id, {\n\t\t\t\t\tmessage: (nodeId !== 0\n\t\t\t\t\t\t? `Node ${nodeId.toString().padStart(3, \"0\")}`\n\t\t\t\t\t\t: `no node`) + ` has exclusive control`,\n\t\t\t\t\tdirection: \"inbound\",\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCSetOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Set)\n@useSupervision()\nexport class ProtectionCCSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(_raw: CCRaw, _ctx: CCParsingContext): ProtectionCCSet {\n\t\t// TODO: Deserialize payload\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 ProtectionCCSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic local: LocalProtectionState;\n\tpublic rf?: RFProtectionState;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.local & 0b1111,\n\t\t\t(this.rf ?? RFProtectionState.Unprotected) & 0b1111,\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 include the local state\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\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\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 ProtectionCCReportOptions {\n\tlocal: LocalProtectionState;\n\trf?: RFProtectionState;\n}\n\n@CCCommand(ProtectionCommand.Report)\n@ccValueProperty(\"local\", ProtectionCCValues.localProtectionState)\n@ccValueProperty(\"rf\", ProtectionCCValues.rfProtectionState)\nexport class ProtectionCCReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.local = options.local;\n\t\tthis.rf = options.rf;\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ProtectionCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst local: LocalProtectionState = raw.payload[0] & 0b1111;\n\t\tlet rf: RFProtectionState | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\trf = raw.payload[1] & 0b1111;\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tlocal,\n\t\t\trf,\n\t\t});\n\t}\n\n\tpublic readonly local: LocalProtectionState;\n\n\tpublic readonly rf?: RFProtectionState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tlocal: getEnumMemberName(LocalProtectionState, this.local),\n\t\t};\n\t\tif (this.rf != undefined) {\n\t\t\tmessage.rf = getEnumMemberName(RFProtectionState, this.rf);\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(ProtectionCommand.Get)\n@expectedCCResponse(ProtectionCCReport)\nexport class ProtectionCCGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCSupportedReportOptions {\n\tsupportsTimeout: boolean;\n\tsupportsExclusiveControl: boolean;\n\tsupportedLocalStates: LocalProtectionState[];\n\tsupportedRFStates: RFProtectionState[];\n}\n\n@CCCommand(ProtectionCommand.SupportedReport)\n@ccValueProperty(\n\t\"supportsExclusiveControl\",\n\tProtectionCCValues.supportsExclusiveControl,\n)\n@ccValueProperty(\"supportsTimeout\", ProtectionCCValues.supportsTimeout)\n@ccValueProperty(\n\t\"supportedLocalStates\",\n\tProtectionCCValues.supportedLocalStates,\n)\n@ccValueProperty(\"supportedRFStates\", ProtectionCCValues.supportedRFStates)\nexport class ProtectionCCSupportedReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.supportsTimeout = options.supportsTimeout;\n\t\tthis.supportsExclusiveControl = options.supportsExclusiveControl;\n\t\tthis.supportedLocalStates = options.supportedLocalStates;\n\t\tthis.supportedRFStates = options.supportedRFStates;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCSupportedReport {\n\t\tvalidatePayload(raw.payload.length >= 5);\n\t\tconst supportsTimeout = !!(raw.payload[0] & 0b1);\n\t\tconst supportsExclusiveControl = !!(raw.payload[0] & 0b10);\n\t\tconst supportedLocalStates: LocalProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(1, 3),\n\t\t\tLocalProtectionState.Unprotected,\n\t\t);\n\t\tconst supportedRFStates: RFProtectionState[] = parseBitMask(\n\t\t\traw.payload.subarray(3, 5),\n\t\t\tRFProtectionState.Unprotected,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportsTimeout,\n\t\t\tsupportsExclusiveControl,\n\t\t\tsupportedLocalStates,\n\t\t\tsupportedRFStates,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// update metadata (partially) for the local and rf values\n\t\tconst localStateValue = ProtectionCCValues.localProtectionState;\n\t\tthis.setMetadata(ctx, localStateValue, {\n\t\t\t...localStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tLocalProtectionState,\n\t\t\t\tthis.supportedLocalStates,\n\t\t\t),\n\t\t});\n\n\t\tconst rfStateValue = ProtectionCCValues.rfProtectionState;\n\t\tthis.setMetadata(ctx, rfStateValue, {\n\t\t\t...rfStateValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tRFProtectionState,\n\t\t\t\tthis.supportedRFStates,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportsExclusiveControl: boolean;\n\n\tpublic readonly supportsTimeout: boolean;\n\n\tpublic readonly supportedLocalStates: LocalProtectionState[];\n\n\tpublic readonly supportedRFStates: RFProtectionState[];\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supports exclusive control\": this.supportsExclusiveControl,\n\t\t\t\t\"supports timeout\": this.supportsTimeout,\n\t\t\t\t\"local protection states\": this.supportedLocalStates\n\t\t\t\t\t.map((local) =>\n\t\t\t\t\t\tgetEnumMemberName(LocalProtectionState, local)\n\t\t\t\t\t)\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t\t\"RF protection states\": this.supportedRFStates\n\t\t\t\t\t.map((rf) => getEnumMemberName(RFProtectionState, rf))\n\t\t\t\t\t.map((str) => `\\n\u00B7 ${str}`)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.SupportedGet)\n@expectedCCResponse(ProtectionCCSupportedReport)\nexport class ProtectionCCSupportedGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlReportOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlReport)\n@ccValueProperty(\n\t\"exclusiveControlNodeId\",\n\tProtectionCCValues.exclusiveControlNodeId,\n)\nexport class ProtectionCCExclusiveControlReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst exclusiveControlNodeId = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\texclusiveControlNodeId,\n\t\t});\n\t}\n\n\tpublic readonly exclusiveControlNodeId: number;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlGet)\n@expectedCCResponse(ProtectionCCExclusiveControlReport)\nexport class ProtectionCCExclusiveControlGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCExclusiveControlSetOptions {\n\texclusiveControlNodeId: number;\n}\n\n@CCCommand(ProtectionCommand.ExclusiveControlSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCExclusiveControlSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCExclusiveControlSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.exclusiveControlNodeId = options.exclusiveControlNodeId;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCExclusiveControlSet {\n\t\t// TODO: Deserialize payload\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 ProtectionCCExclusiveControlSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic exclusiveControlNodeId: number;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.exclusiveControlNodeId]);\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: {\n\t\t\t\t\"exclusive control node id\": this.exclusiveControlNodeId,\n\t\t\t},\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutReportOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutReport)\n@ccValueProperty(\"timeout\", ProtectionCCValues.timeout)\nexport class ProtectionCCTimeoutReport extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ProtectionCCTimeoutReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst timeout: Timeout = Timeout.parse(raw.payload[0]);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\ttimeout,\n\t\t});\n\t}\n\n\tpublic readonly timeout: Timeout;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n\n@CCCommand(ProtectionCommand.TimeoutGet)\n@expectedCCResponse(ProtectionCCTimeoutReport)\nexport class ProtectionCCTimeoutGet extends ProtectionCC {}\n\n// @publicAPI\nexport interface ProtectionCCTimeoutSetOptions {\n\ttimeout: Timeout;\n}\n\n@CCCommand(ProtectionCommand.TimeoutSet)\n@expectedCCResponse(ProtectionCCReport)\n@useSupervision()\nexport class ProtectionCCTimeoutSet extends ProtectionCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ProtectionCCTimeoutSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.timeout = options.timeout;\n\t}\n\n\tpublic static from(\n\t\t_raw: CCRaw,\n\t\t_ctx: CCParsingContext,\n\t): ProtectionCCTimeoutSet {\n\t\t// TODO: Deserialize payload\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 ProtectionCCTimeoutSet({\n\t\t// \tnodeId: ctx.sourceNodeId,\n\t\t// });\n\t}\n\n\tpublic timeout: Timeout;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([this.timeout.serialize()]);\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: { timeout: this.timeout.toString() },\n\t\t};\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAwC;AAExC,iBAQO;AACP,0BAOO;AACP,oCASO;AACP,oBAAkB;AAClB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K,CAAC,KAAK,QAAQ,UAAS,CAAE,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS,EAAE,SAAS,KAAK,QAAQ,SAAQ,EAAE;;IAE7C;;;;",
6
6
  "names": ["import_safe"]
7
7
  }
@@ -1,65 +1,164 @@
1
- import type { MessageOrCCLogEntry, SupervisionResult, WithAddress } from "@zwave-js/core/safe";
2
- import { CommandClasses, Duration, type MaybeNotKnown } from "@zwave-js/core/safe";
3
- import type { CCEncodingContext, CCParsingContext, GetValueDB } from "@zwave-js/host/safe";
1
+ import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
2
+ import type { GetValueDB, MessageOrCCLogEntry, SupervisionResult, WithAddress } from "@zwave-js/core/safe";
3
+ import { CommandClasses, Duration, type MaybeNotKnown, ValueMetadata } from "@zwave-js/core/safe";
4
4
  import { Bytes } from "@zwave-js/shared/safe";
5
5
  import { CCAPI, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
6
6
  import { type CCRaw, CommandClass } from "../lib/CommandClass.js";
7
7
  import { SceneActivationCommand } from "../lib/_Types.js";
8
8
  export declare const SceneActivationCCValues: Readonly<{
9
9
  dimmingDuration: {
10
- readonly id: {
11
- commandClass: (typeof CommandClasses)["Scene Activation"];
12
- property: "dimmingDuration";
13
- };
10
+ readonly id: ValueIDBase;
14
11
  readonly endpoint: (endpoint?: number | undefined) => {
15
12
  readonly commandClass: (typeof CommandClasses)["Scene Activation"];
16
13
  readonly endpoint: number;
17
14
  readonly property: "dimmingDuration";
18
15
  };
19
16
  readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
20
- readonly meta: {
21
- readonly label: "Dimming duration";
22
- readonly type: "duration";
17
+ readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
18
+ readonly type: "any";
23
19
  readonly readable: true;
24
20
  readonly writeable: true;
25
- };
26
- readonly options: {
21
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
22
+ readonly type: "any";
23
+ readonly readable: true;
24
+ readonly writeable: true;
25
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
26
+ readonly type: "any";
27
+ readonly readable: true;
28
+ readonly writeable: true;
29
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
30
+ readonly type: "any";
31
+ readonly readable: true;
32
+ readonly writeable: true;
33
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
34
+ readonly type: "any";
35
+ readonly readable: true;
36
+ readonly writeable: true;
37
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
38
+ readonly type: "any";
39
+ readonly readable: true;
40
+ readonly writeable: true;
41
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
42
+ readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
27
43
  readonly internal: false;
28
44
  readonly minVersion: 1;
29
45
  readonly secret: false;
30
46
  readonly stateful: true;
31
47
  readonly supportsEndpoints: true;
32
48
  readonly autoCreate: true;
33
- };
49
+ } : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
50
+ readonly internal: false;
51
+ readonly minVersion: 1;
52
+ readonly secret: false;
53
+ readonly stateful: true;
54
+ readonly supportsEndpoints: true;
55
+ readonly autoCreate: true;
56
+ }, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
57
+ readonly internal: false;
58
+ readonly minVersion: 1;
59
+ readonly secret: false;
60
+ readonly stateful: true;
61
+ readonly supportsEndpoints: true;
62
+ readonly autoCreate: true;
63
+ } : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
64
+ readonly internal: false;
65
+ readonly minVersion: 1;
66
+ readonly secret: false;
67
+ readonly stateful: true;
68
+ readonly supportsEndpoints: true;
69
+ readonly autoCreate: true;
70
+ }, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
71
+ readonly internal: false;
72
+ readonly minVersion: 1;
73
+ readonly secret: false;
74
+ readonly stateful: true;
75
+ readonly supportsEndpoints: true;
76
+ readonly autoCreate: true;
77
+ } : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
78
+ readonly internal: false;
79
+ readonly minVersion: 1;
80
+ readonly secret: false;
81
+ readonly stateful: true;
82
+ readonly supportsEndpoints: true;
83
+ readonly autoCreate: true;
84
+ }, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
34
85
  };
35
86
  sceneId: {
36
- readonly id: {
37
- commandClass: (typeof CommandClasses)["Scene Activation"];
38
- property: "sceneId";
39
- };
87
+ readonly id: ValueIDBase;
40
88
  readonly endpoint: (endpoint?: number | undefined) => {
41
89
  readonly commandClass: (typeof CommandClasses)["Scene Activation"];
42
90
  readonly endpoint: number;
43
91
  readonly property: "sceneId";
44
92
  };
45
93
  readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
46
- readonly meta: {
47
- readonly min: 1;
48
- readonly label: "Scene ID";
49
- readonly valueChangeOptions: readonly ["transitionDuration"];
50
- readonly max: 255;
51
- readonly type: "number";
94
+ readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
95
+ readonly type: "any";
52
96
  readonly readable: true;
53
97
  readonly writeable: true;
54
- };
55
- readonly options: {
98
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
99
+ readonly type: "any";
100
+ readonly readable: true;
101
+ readonly writeable: true;
102
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
103
+ readonly type: "any";
104
+ readonly readable: true;
105
+ readonly writeable: true;
106
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
107
+ readonly type: "any";
108
+ readonly readable: true;
109
+ readonly writeable: true;
110
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
111
+ readonly type: "any";
112
+ readonly readable: true;
113
+ readonly writeable: true;
114
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
115
+ readonly type: "any";
116
+ readonly readable: true;
117
+ readonly writeable: true;
118
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
119
+ readonly options: Readonly<(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
120
+ readonly internal: false;
121
+ readonly minVersion: 1;
56
122
  readonly secret: false;
123
+ readonly stateful: true;
124
+ readonly supportsEndpoints: true;
125
+ readonly autoCreate: true;
126
+ } : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
57
127
  readonly internal: false;
58
128
  readonly minVersion: 1;
129
+ readonly secret: false;
130
+ readonly stateful: true;
59
131
  readonly supportsEndpoints: true;
60
132
  readonly autoCreate: true;
61
- readonly stateful: false;
62
- };
133
+ }, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
134
+ readonly internal: false;
135
+ readonly minVersion: 1;
136
+ readonly secret: false;
137
+ readonly stateful: true;
138
+ readonly supportsEndpoints: true;
139
+ readonly autoCreate: true;
140
+ } : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
141
+ readonly internal: false;
142
+ readonly minVersion: 1;
143
+ readonly secret: false;
144
+ readonly stateful: true;
145
+ readonly supportsEndpoints: true;
146
+ readonly autoCreate: true;
147
+ }, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]] ? never : K]: (import("@zwave-js/cc").CCValueOptions extends NonNullable<TBlueprint["options"]> ? {
148
+ readonly internal: false;
149
+ readonly minVersion: 1;
150
+ readonly secret: false;
151
+ readonly stateful: true;
152
+ readonly supportsEndpoints: true;
153
+ readonly autoCreate: true;
154
+ } : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<{
155
+ readonly internal: false;
156
+ readonly minVersion: 1;
157
+ readonly secret: false;
158
+ readonly stateful: true;
159
+ readonly supportsEndpoints: true;
160
+ readonly autoCreate: true;
161
+ }, ("stateful" | "secret" | "internal" | "minVersion" | "supportsEndpoints" | "autoCreate") & keyof NonNullable<TBlueprint["options"]>> & TBlueprint["options"]>)[K]; } : never>;
63
162
  };
64
163
  }>;
65
164
  export declare class SceneActivationCCAPI extends CCAPI {
@@ -83,7 +182,7 @@ export declare class SceneActivationCCSet extends SceneActivationCC {
83
182
  static from(raw: CCRaw, ctx: CCParsingContext): SceneActivationCCSet;
84
183
  sceneId: number;
85
184
  dimmingDuration: Duration | undefined;
86
- serialize(ctx: CCEncodingContext): Bytes;
185
+ serialize(ctx: CCEncodingContext): Promise<Bytes>;
87
186
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
88
187
  }
89
188
  //# sourceMappingURL=SceneActivationCC.d.ts.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/SceneActivationCC.ts"],
4
- "sourcesContent": ["import type {\n\tMessageOrCCLogEntry,\n\tMessageRecord,\n\tSupervisionResult,\n\tWithAddress,\n} from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype MaybeNotKnown,\n\tValueMetadata,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { SceneActivationCommand } from \"../lib/_Types.js\";\n\nexport const SceneActivationCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Scene Activation\"], {\n\t\t...V.staticProperty(\n\t\t\t\"sceneId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tlabel: \"Scene ID\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t\t{ stateful: false },\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"dimmingDuration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Duration,\n\t\t\t\tlabel: \"Dimming duration\",\n\t\t\t} as const,\n\t\t),\n\t}),\n});\n\n// @noInterview This CC is write-only\n\n@API(CommandClasses[\"Scene Activation\"])\nexport class SceneActivationCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\t_cmd: SceneActivationCommand,\n\t): MaybeNotKnown<boolean> {\n\t\t// There is only one mandatory command\n\t\treturn true;\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: SceneActivationCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"sceneId\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\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\t/**\n\t * Activates the Scene with the given ID\n\t * @param duration The duration specifying how long the transition should take. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\tsceneId: number,\n\t\tdimmingDuration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tSceneActivationCommand,\n\t\t\tSceneActivationCommand.Set,\n\t\t);\n\n\t\tconst cc = new SceneActivationCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Scene Activation\"])\n@implementedVersion(1)\n@ccValues(SceneActivationCCValues)\nexport class SceneActivationCC extends CommandClass {\n\tdeclare ccCommand: SceneActivationCommand;\n}\n\n// @publicAPI\nexport interface SceneActivationCCSetOptions {\n\tsceneId: number;\n\tdimmingDuration?: Duration | string;\n}\n\n@CCCommand(SceneActivationCommand.Set)\n@useSupervision()\n@ccValueProperty(\"sceneId\", SceneActivationCCValues.sceneId)\n@ccValueProperty(\"dimmingDuration\", SceneActivationCCValues.dimmingDuration)\nexport class SceneActivationCCSet extends SceneActivationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<SceneActivationCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.sceneId = options.sceneId;\n\t\tthis.dimmingDuration = Duration.from(options.dimmingDuration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): SceneActivationCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst sceneId = raw.payload[0];\n\t\tvalidatePayload(sceneId >= 1, sceneId <= 255);\n\n\t\t// Per the specs, dimmingDuration is required, but as always the real world is different...\n\t\tlet dimmingDuration: Duration | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\tdimmingDuration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t}\n\n\tpublic sceneId: number;\n\n\tpublic dimmingDuration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.sceneId,\n\t\t\tthis.dimmingDuration?.serializeSet() ?? 0xff,\n\t\t]);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = { \"scene id\": this.sceneId };\n\t\tif (this.dimmingDuration != undefined) {\n\t\t\tmessage[\"dimming duration\"] = this.dimmingDuration.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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,kBAMO;AAMP,IAAAA,eAAsB;AAEtB,iBAMO;AACP,0BAAyC;AACzC,oCAQO;AACP,oBAAkB;AAClB,mBAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhC,MAAM,0BAA0B,OAAO,OAAO;EACpD,GAAG,gBAAE,qBAAqB,2BAAe,kBAAkB,GAAG;IAC7D,GAAG,gBAAE,eACJ,WACA;MACC,GAAG,0BAAc;MACjB,KAAK;MACL,OAAO;MACP,oBAAoB,CAAC,oBAAoB;OAE1C,EAAE,UAAU,MAAK,CAAE;IAGpB,GAAG,gBAAE,eACJ,mBACA;MACC,GAAG,0BAAc;MACjB,OAAO;KACE;GAEX;CACD;IAKY,wBAAoB,MAAA;8BADhC,mCAAI,2BAAe,kBAAkB,CAAC,CAAC;;;;oBACE;;;4CAAA,YAAK;WAAA;;;;;;;;yBAmC7C,sCAAA,CAAc;AACf,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;AApCjB,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACL,gBACN,MAA4B;AAG5B,aAAO;IACR;IAEA,KAAwB,oBAAS,IAAC;AACjC,aAAO,e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AU,QAAQ;AACvB,WAAK,kBAAkB,qBAAS,KAAK,QAAQ,eAAe;IAC7D;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,UAAU,IAAI,QAAQ,CAAC;AAC7B,uCAAgB,WAAW,GAAG,WAAW,GAAG;AAG5C,UAAI;AACJ,UAAI,IAAI,QAAQ,UAAU,GAAG;AAC5B,0BAAkB,qBAAS,SAAS,IAAI,QAAQ,CAAC,CAAC;MACnD;AAEA,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;QACA;OACA;IACF;IAEO;IAEA;IAEA,UAAU,KAAsB;AACtC,WAAK,UAAU,mBAAM,KAAK;QACzB,KAAK;QACL,KAAK,iBAAiB,aAAY,KAAM;OACxC;AAED,aAAO,MAAM,UAAU,GAAG;IAC3B;IAEO,WAAW,KAAgB;AACjC,YAAM,UAAyB,EAAE,YAAY,KAAK,QAAO;AACzD,UAAI,KAAK,mBAAmB,QAAW;AACtC,gBAAQ,kBAAkB,IAAI,KAAK,gBAAgB,SAAQ;MAC5D;AACA,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;",
4
+ "sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport type {\n\tGetValueDB,\n\tMessageOrCCLogEntry,\n\tMessageRecord,\n\tSupervisionResult,\n\tWithAddress,\n} from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\tDuration,\n\ttype MaybeNotKnown,\n\tValueMetadata,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport { type CCRaw, CommandClass } from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { SceneActivationCommand } from \"../lib/_Types.js\";\n\nexport const SceneActivationCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Scene Activation\"], {\n\t\t...V.staticProperty(\n\t\t\t\"sceneId\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tmin: 1,\n\t\t\t\tlabel: \"Scene ID\",\n\t\t\t\tvalueChangeOptions: [\"transitionDuration\"],\n\t\t\t} as const,\n\t\t\t{ stateful: false },\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"dimmingDuration\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.Duration,\n\t\t\t\tlabel: \"Dimming duration\",\n\t\t\t} as const,\n\t\t),\n\t}),\n});\n\n// @noInterview This CC is write-only\n\n@API(CommandClasses[\"Scene Activation\"])\nexport class SceneActivationCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\t_cmd: SceneActivationCommand,\n\t): MaybeNotKnown<boolean> {\n\t\t// There is only one mandatory command\n\t\treturn true;\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(\n\t\t\tthis: SceneActivationCCAPI,\n\t\t\t{ property },\n\t\t\tvalue,\n\t\t\toptions,\n\t\t) {\n\t\t\tif (property !== \"sceneId\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\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\t/**\n\t * Activates the Scene with the given ID\n\t * @param duration The duration specifying how long the transition should take. Can be a Duration instance or a user-friendly duration string like `\"1m17s\"`.\n\t */\n\t@validateArgs()\n\tpublic async set(\n\t\tsceneId: number,\n\t\tdimmingDuration?: Duration | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tSceneActivationCommand,\n\t\t\tSceneActivationCommand.Set,\n\t\t);\n\n\t\tconst cc = new SceneActivationCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n}\n\n@commandClass(CommandClasses[\"Scene Activation\"])\n@implementedVersion(1)\n@ccValues(SceneActivationCCValues)\nexport class SceneActivationCC extends CommandClass {\n\tdeclare ccCommand: SceneActivationCommand;\n}\n\n// @publicAPI\nexport interface SceneActivationCCSetOptions {\n\tsceneId: number;\n\tdimmingDuration?: Duration | string;\n}\n\n@CCCommand(SceneActivationCommand.Set)\n@useSupervision()\n@ccValueProperty(\"sceneId\", SceneActivationCCValues.sceneId)\n@ccValueProperty(\"dimmingDuration\", SceneActivationCCValues.dimmingDuration)\nexport class SceneActivationCCSet extends SceneActivationCC {\n\tpublic constructor(\n\t\toptions: WithAddress<SceneActivationCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.sceneId = options.sceneId;\n\t\tthis.dimmingDuration = Duration.from(options.dimmingDuration);\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): SceneActivationCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst sceneId = raw.payload[0];\n\t\tvalidatePayload(sceneId >= 1, sceneId <= 255);\n\n\t\t// Per the specs, dimmingDuration is required, but as always the real world is different...\n\t\tlet dimmingDuration: Duration | undefined;\n\t\tif (raw.payload.length >= 2) {\n\t\t\tdimmingDuration = Duration.parseSet(raw.payload[1]);\n\t\t}\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsceneId,\n\t\t\tdimmingDuration,\n\t\t});\n\t}\n\n\tpublic sceneId: number;\n\n\tpublic dimmingDuration: Duration | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = Bytes.from([\n\t\t\tthis.sceneId,\n\t\t\tthis.dimmingDuration?.serializeSet() ?? 0xff,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = { \"scene id\": this.sceneId };\n\t\tif (this.dimmingDuration != undefined) {\n\t\t\tmessage[\"dimming duration\"] = this.dimmingDuration.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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,kBAMO;AACP,IAAAA,eAAsB;AAEtB,iBAMO;AACP,0BAAyC;AACzC,oCAQO;AACP,oBAAkB;AAClB,mBAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhC,MAAM,0BAA0B,OAAO,OAAO;EACpD,GAAG,gBAAE,qBAAqB,2BAAe,kBAAkB,GAAG;IAC7D,GAAG,gBAAE,eACJ,WACA;MACC,GAAG,0BAAc;MACjB,KAAK;MACL,OAAO;MACP,oBAAoB,CAAC,oBAAoB;OAE1C,EAAE,UAAU,MAAK,CAAE;IAGpB,GAAG,gBAAE,eACJ,mBACA;MACC,GAAG,0BAAc;MACjB,OAAO;KACE;GAEX;CACD;IAKY,wBAAoB,MAAA;8BADhC,mCAAI,2BAAe,kBAAkB,CAAC,CAAC;;;;oBACE;;;4CAAA,YAAK;WAAA;;;;;;;;yBAmC7C,sCAAA,CAAc;AACf,mBAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MA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WithAddress } from "@zwave-js/core/safe";
2
- import type { CCEncodingContext, CCParsingContext, GetValueDB } from "@zwave-js/host/safe";
1
+ import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
2
+ import { CommandClasses, Duration, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, ValueMetadata, type WithAddress } from "@zwave-js/core/safe";
3
3
  import { Bytes } from "@zwave-js/shared/safe";
4
4
  import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
5
5
  import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext } from "../lib/CommandClass.js";
6
6
  import { SceneActuatorConfigurationCommand } from "../lib/_Types.js";
7
7
  export declare const SceneActuatorConfigurationCCValues: Readonly<{
8
8
  dimmingDuration: ((sceneId: number) => {
9
- readonly meta: {
10
- readonly label: `Dimming duration (${number})`;
11
- readonly type: "duration";
9
+ readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
10
+ readonly type: "any";
12
11
  readonly readable: true;
13
12
  readonly writeable: true;
14
- };
15
- readonly id: {
16
- commandClass: (typeof CommandClasses)["Scene Actuator Configuration"];
17
- property: "dimmingDuration";
18
- propertyKey: number;
19
- };
13
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
14
+ readonly type: "any";
15
+ readonly readable: true;
16
+ readonly writeable: true;
17
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
18
+ readonly type: "any";
19
+ readonly readable: true;
20
+ readonly writeable: true;
21
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
22
+ readonly type: "any";
23
+ readonly readable: true;
24
+ readonly writeable: true;
25
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
26
+ readonly type: "any";
27
+ readonly readable: true;
28
+ readonly writeable: true;
29
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
30
+ readonly type: "any";
31
+ readonly readable: true;
32
+ readonly writeable: true;
33
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
34
+ readonly id: ValueIDBase;
20
35
  readonly endpoint: (endpoint?: number | undefined) => {
21
36
  readonly commandClass: (typeof CommandClasses)["Scene Actuator Configuration"];
22
37
  readonly endpoint: number;
@@ -35,20 +50,32 @@ export declare const SceneActuatorConfigurationCCValues: Readonly<{
35
50
  };
36
51
  };
37
52
  level: ((sceneId: number) => {
38
- readonly meta: {
39
- readonly label: `Level (${number})`;
40
- readonly valueChangeOptions: readonly ["transitionDuration"];
41
- readonly min: 0;
42
- readonly max: 255;
43
- readonly type: "number";
53
+ readonly meta: Readonly<(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
54
+ readonly type: "any";
44
55
  readonly readable: true;
45
56
  readonly writeable: true;
46
- };
47
- readonly id: {
48
- commandClass: (typeof CommandClasses)["Scene Actuator Configuration"];
49
- property: "level";
50
- propertyKey: number;
51
- };
57
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
58
+ readonly type: "any";
59
+ readonly readable: true;
60
+ readonly writeable: true;
61
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
62
+ readonly type: "any";
63
+ readonly readable: true;
64
+ readonly writeable: true;
65
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
66
+ readonly type: "any";
67
+ readonly readable: true;
68
+ readonly writeable: true;
69
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable<TBlueprint["meta"]> ? Readonly<{
70
+ readonly type: "any";
71
+ readonly readable: true;
72
+ readonly writeable: true;
73
+ }> : import("alcalzone-shared/types").Simplify<import("alcalzone-shared/types").Omit<Readonly<{
74
+ readonly type: "any";
75
+ readonly readable: true;
76
+ readonly writeable: true;
77
+ }>, ("type" | "readable" | "writeable") & keyof NonNullable<TBlueprint["meta"]>> & TBlueprint["meta"]>)[K]; } : never>;
78
+ readonly id: ValueIDBase;
52
79
  readonly endpoint: (endpoint?: number | undefined) => {
53
80
  readonly commandClass: (typeof CommandClasses)["Scene Actuator Configuration"];
54
81
  readonly endpoint: number;
@@ -90,7 +117,7 @@ export declare class SceneActuatorConfigurationCCSet extends SceneActuatorConfig
90
117
  sceneId: number;
91
118
  dimmingDuration: Duration;
92
119
  level?: number;
93
- serialize(ctx: CCEncodingContext): Bytes;
120
+ serialize(ctx: CCEncodingContext): Promise<Bytes>;
94
121
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
95
122
  }
96
123
  export interface SceneActuatorConfigurationCCReportOptions {
@@ -114,7 +141,7 @@ export declare class SceneActuatorConfigurationCCGet extends SceneActuatorConfig
114
141
  constructor(options: WithAddress<SceneActuatorConfigurationCCGetOptions>);
115
142
  static from(_raw: CCRaw, _ctx: CCParsingContext): SceneActuatorConfigurationCCGet;
116
143
  sceneId: number;
117
- serialize(ctx: CCEncodingContext): Bytes;
144
+ serialize(ctx: CCEncodingContext): Promise<Bytes>;
118
145
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
119
146
  }
120
147
  //# sourceMappingURL=SceneActuatorConfigurationCC.d.ts.map