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

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 (922) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +194 -0
  2. package/build/cjs/cc/AlarmSensorCC.js +395 -0
  3. package/build/cjs/cc/AlarmSensorCC.js.map +7 -0
  4. package/build/cjs/cc/AssociationCC.d.ts +253 -0
  5. package/build/cjs/cc/AssociationCC.js +711 -0
  6. package/build/cjs/cc/AssociationCC.js.map +7 -0
  7. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +230 -0
  8. package/build/cjs/cc/AssociationGroupInfoCC.js +746 -0
  9. package/build/cjs/cc/AssociationGroupInfoCC.js.map +7 -0
  10. package/build/cjs/cc/BarrierOperatorCC.d.ts +243 -0
  11. package/build/cjs/cc/BarrierOperatorCC.js +582 -0
  12. package/build/cjs/cc/BarrierOperatorCC.js.map +7 -0
  13. package/build/cjs/cc/BasicCC.d.ts +191 -0
  14. package/build/cjs/cc/BasicCC.js +384 -0
  15. package/build/cjs/cc/BasicCC.js.map +7 -0
  16. package/build/cjs/cc/BatteryCC.d.ts +406 -0
  17. package/build/cjs/cc/BatteryCC.js +508 -0
  18. package/build/cjs/cc/BatteryCC.js.map +7 -0
  19. package/build/cjs/cc/BinarySensorCC.d.ts +122 -0
  20. package/build/cjs/cc/BinarySensorCC.js +431 -0
  21. package/build/cjs/cc/BinarySensorCC.js.map +7 -0
  22. package/build/cjs/cc/BinarySwitchCC.d.ts +139 -0
  23. package/build/cjs/cc/BinarySwitchCC.js +378 -0
  24. package/build/cjs/cc/BinarySwitchCC.js.map +7 -0
  25. package/build/cjs/cc/CRC16CC.d.ts +29 -0
  26. package/build/cjs/cc/CRC16CC.js +133 -0
  27. package/build/cjs/cc/CRC16CC.js.map +7 -0
  28. package/build/cjs/cc/CentralSceneCC.d.ts +210 -0
  29. package/build/cjs/cc/CentralSceneCC.js +449 -0
  30. package/build/cjs/cc/CentralSceneCC.js.map +7 -0
  31. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +177 -0
  32. package/build/cjs/cc/ClimateControlScheduleCC.js +480 -0
  33. package/build/cjs/cc/ClimateControlScheduleCC.js.map +7 -0
  34. package/build/cjs/cc/ClockCC.d.ts +47 -0
  35. package/build/cjs/cc/ClockCC.js +226 -0
  36. package/build/cjs/cc/ClockCC.js.map +7 -0
  37. package/build/cjs/cc/ColorSwitchCC.d.ts +339 -0
  38. package/build/cjs/cc/ColorSwitchCC.js +1117 -0
  39. package/build/cjs/cc/ColorSwitchCC.js.map +7 -0
  40. package/build/cjs/cc/ConfigurationCC.d.ts +396 -0
  41. package/build/cjs/cc/ConfigurationCC.js +2230 -0
  42. package/build/cjs/cc/ConfigurationCC.js.map +7 -0
  43. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +17 -0
  44. package/build/cjs/cc/DeviceResetLocallyCC.js +92 -0
  45. package/build/cjs/cc/DeviceResetLocallyCC.js.map +7 -0
  46. package/build/cjs/cc/DoorLockCC.d.ts +837 -0
  47. package/build/cjs/cc/DoorLockCC.js +1239 -0
  48. package/build/cjs/cc/DoorLockCC.js.map +7 -0
  49. package/build/cjs/cc/DoorLockLoggingCC.d.ts +77 -0
  50. package/build/cjs/cc/DoorLockLoggingCC.js +343 -0
  51. package/build/cjs/cc/DoorLockLoggingCC.js.map +7 -0
  52. package/build/cjs/cc/EnergyProductionCC.d.ts +77 -0
  53. package/build/cjs/cc/EnergyProductionCC.js +240 -0
  54. package/build/cjs/cc/EnergyProductionCC.js.map +7 -0
  55. package/build/cjs/cc/EntryControlCC.d.ts +231 -0
  56. package/build/cjs/cc/EntryControlCC.js +593 -0
  57. package/build/cjs/cc/EntryControlCC.js.map +7 -0
  58. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  59. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +1122 -0
  60. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +7 -0
  61. package/build/cjs/cc/HailCC.d.ts +6 -0
  62. package/build/cjs/cc/HailCC.js +45 -0
  63. package/build/cjs/cc/HailCC.js.map +7 -0
  64. package/build/cjs/cc/HumidityControlModeCC.d.ts +111 -0
  65. package/build/cjs/cc/HumidityControlModeCC.js +323 -0
  66. package/build/cjs/cc/HumidityControlModeCC.js.map +7 -0
  67. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  68. package/build/cjs/cc/HumidityControlOperatingStateCC.js +164 -0
  69. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +7 -0
  70. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +209 -0
  71. package/build/cjs/cc/HumidityControlSetpointCC.js +634 -0
  72. package/build/cjs/cc/HumidityControlSetpointCC.js.map +7 -0
  73. package/build/cjs/cc/InclusionControllerCC.d.ts +42 -0
  74. package/build/cjs/cc/InclusionControllerCC.js +160 -0
  75. package/build/cjs/cc/InclusionControllerCC.js.map +7 -0
  76. package/build/cjs/cc/IndicatorCC.d.ts +338 -0
  77. package/build/cjs/cc/IndicatorCC.js +1234 -0
  78. package/build/cjs/cc/IndicatorCC.js.map +7 -0
  79. package/build/cjs/cc/IrrigationCC.d.ts +1496 -0
  80. package/build/cjs/cc/IrrigationCC.js +1978 -0
  81. package/build/cjs/cc/IrrigationCC.js.map +7 -0
  82. package/build/cjs/cc/LanguageCC.d.ts +101 -0
  83. package/build/cjs/cc/LanguageCC.js +267 -0
  84. package/build/cjs/cc/LanguageCC.js.map +7 -0
  85. package/build/cjs/cc/LockCC.d.ts +73 -0
  86. package/build/cjs/cc/LockCC.js +222 -0
  87. package/build/cjs/cc/LockCC.js.map +7 -0
  88. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +32 -0
  89. package/build/cjs/cc/ManufacturerProprietaryCC.js +209 -0
  90. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +7 -0
  91. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +171 -0
  92. package/build/cjs/cc/ManufacturerSpecificCC.js +334 -0
  93. package/build/cjs/cc/ManufacturerSpecificCC.js.map +7 -0
  94. package/build/cjs/cc/MeterCC.d.ts +318 -0
  95. package/build/cjs/cc/MeterCC.js +1235 -0
  96. package/build/cjs/cc/MeterCC.js.map +7 -0
  97. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +241 -0
  98. package/build/cjs/cc/MultiChannelAssociationCC.js +956 -0
  99. package/build/cjs/cc/MultiChannelAssociationCC.js.map +7 -0
  100. package/build/cjs/cc/MultiChannelCC.d.ts +394 -0
  101. package/build/cjs/cc/MultiChannelCC.js +1050 -0
  102. package/build/cjs/cc/MultiChannelCC.js.map +7 -0
  103. package/build/cjs/cc/MultiCommandCC.d.ts +27 -0
  104. package/build/cjs/cc/MultiCommandCC.js +159 -0
  105. package/build/cjs/cc/MultiCommandCC.js.map +7 -0
  106. package/build/cjs/cc/MultilevelSensorCC.d.ts +185 -0
  107. package/build/cjs/cc/MultilevelSensorCC.js +716 -0
  108. package/build/cjs/cc/MultilevelSensorCC.js.map +7 -0
  109. package/build/cjs/cc/MultilevelSwitchCC.d.ts +357 -0
  110. package/build/cjs/cc/MultilevelSwitchCC.js +780 -0
  111. package/build/cjs/cc/MultilevelSwitchCC.js.map +7 -0
  112. package/build/cjs/cc/NoOperationCC.d.ts +9 -0
  113. package/build/cjs/cc/NoOperationCC.js +64 -0
  114. package/build/cjs/cc/NoOperationCC.js.map +7 -0
  115. package/build/cjs/cc/NodeNamingCC.d.ts +118 -0
  116. package/build/cjs/cc/NodeNamingCC.js +364 -0
  117. package/build/cjs/cc/NodeNamingCC.js.map +7 -0
  118. package/build/cjs/cc/NotificationCC.d.ts +479 -0
  119. package/build/cjs/cc/NotificationCC.js +1245 -0
  120. package/build/cjs/cc/NotificationCC.js.map +7 -0
  121. package/build/cjs/cc/PowerlevelCC.d.ts +82 -0
  122. package/build/cjs/cc/PowerlevelCC.js +510 -0
  123. package/build/cjs/cc/PowerlevelCC.js.map +7 -0
  124. package/build/cjs/cc/ProtectionCC.d.ts +325 -0
  125. package/build/cjs/cc/ProtectionCC.js +667 -0
  126. package/build/cjs/cc/ProtectionCC.js.map +7 -0
  127. package/build/cjs/cc/SceneActivationCC.d.ts +89 -0
  128. package/build/cjs/cc/SceneActivationCC.js +193 -0
  129. package/build/cjs/cc/SceneActivationCC.js.map +7 -0
  130. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  131. package/build/cjs/cc/SceneActuatorConfigurationCC.js +370 -0
  132. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +7 -0
  133. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +129 -0
  134. package/build/cjs/cc/SceneControllerConfigurationCC.js +423 -0
  135. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +7 -0
  136. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +434 -0
  137. package/build/cjs/cc/ScheduleEntryLockCC.js +1763 -0
  138. package/build/cjs/cc/ScheduleEntryLockCC.js.map +7 -0
  139. package/build/cjs/cc/Security2CC.d.ts +251 -0
  140. package/build/cjs/cc/Security2CC.js +1589 -0
  141. package/build/cjs/cc/Security2CC.js.map +7 -0
  142. package/build/cjs/cc/SecurityCC.d.ts +128 -0
  143. package/build/cjs/cc/SecurityCC.js +757 -0
  144. package/build/cjs/cc/SecurityCC.js.map +7 -0
  145. package/build/cjs/cc/SoundSwitchCC.d.ts +232 -0
  146. package/build/cjs/cc/SoundSwitchCC.js +661 -0
  147. package/build/cjs/cc/SoundSwitchCC.js.map +7 -0
  148. package/build/cjs/cc/SupervisionCC.d.ts +104 -0
  149. package/build/cjs/cc/SupervisionCC.js +308 -0
  150. package/build/cjs/cc/SupervisionCC.js.map +7 -0
  151. package/build/cjs/cc/ThermostatFanModeCC.d.ts +141 -0
  152. package/build/cjs/cc/ThermostatFanModeCC.js +372 -0
  153. package/build/cjs/cc/ThermostatFanModeCC.js.map +7 -0
  154. package/build/cjs/cc/ThermostatFanStateCC.d.ts +60 -0
  155. package/build/cjs/cc/ThermostatFanStateCC.js +166 -0
  156. package/build/cjs/cc/ThermostatFanStateCC.js.map +7 -0
  157. package/build/cjs/cc/ThermostatModeCC.d.ts +150 -0
  158. package/build/cjs/cc/ThermostatModeCC.js +436 -0
  159. package/build/cjs/cc/ThermostatModeCC.js.map +7 -0
  160. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +61 -0
  161. package/build/cjs/cc/ThermostatOperatingStateCC.js +162 -0
  162. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +7 -0
  163. package/build/cjs/cc/ThermostatSetbackCC.d.ts +46 -0
  164. package/build/cjs/cc/ThermostatSetbackCC.js +262 -0
  165. package/build/cjs/cc/ThermostatSetbackCC.js.map +7 -0
  166. package/build/cjs/cc/ThermostatSetpointCC.d.ts +197 -0
  167. package/build/cjs/cc/ThermostatSetpointCC.js +638 -0
  168. package/build/cjs/cc/ThermostatSetpointCC.js.map +7 -0
  169. package/build/cjs/cc/TimeCC.d.ts +88 -0
  170. package/build/cjs/cc/TimeCC.js +473 -0
  171. package/build/cjs/cc/TimeCC.js.map +7 -0
  172. package/build/cjs/cc/TimeParametersCC.d.ts +72 -0
  173. package/build/cjs/cc/TimeParametersCC.js +313 -0
  174. package/build/cjs/cc/TimeParametersCC.js.map +7 -0
  175. package/build/cjs/cc/TransportServiceCC.d.ts +107 -0
  176. package/build/cjs/cc/TransportServiceCC.js +404 -0
  177. package/build/cjs/cc/TransportServiceCC.js.map +7 -0
  178. package/build/cjs/cc/UserCodeCC.d.ts +683 -0
  179. package/build/cjs/cc/UserCodeCC.js +1620 -0
  180. package/build/cjs/cc/UserCodeCC.js.map +7 -0
  181. package/build/cjs/cc/VersionCC.d.ts +469 -0
  182. package/build/cjs/cc/VersionCC.js +828 -0
  183. package/build/cjs/cc/VersionCC.js.map +7 -0
  184. package/build/cjs/cc/WakeUpCC.d.ts +150 -0
  185. package/build/cjs/cc/WakeUpCC.js +456 -0
  186. package/build/cjs/cc/WakeUpCC.js.map +7 -0
  187. package/build/cjs/cc/WindowCoveringCC.d.ts +315 -0
  188. package/build/cjs/cc/WindowCoveringCC.js +776 -0
  189. package/build/cjs/cc/WindowCoveringCC.js.map +7 -0
  190. package/build/cjs/cc/ZWaveLongRangeCC.d.ts +4 -0
  191. package/build/cjs/cc/ZWaveLongRangeCC.js +43 -0
  192. package/build/cjs/cc/ZWaveLongRangeCC.js.map +7 -0
  193. package/build/cjs/cc/ZWavePlusCC.d.ts +163 -0
  194. package/build/cjs/cc/ZWavePlusCC.js +288 -0
  195. package/build/cjs/cc/ZWavePlusCC.js.map +7 -0
  196. package/build/cjs/cc/ZWaveProtocolCC.d.ts +344 -0
  197. package/build/cjs/cc/ZWaveProtocolCC.js +1071 -0
  198. package/build/cjs/cc/ZWaveProtocolCC.js.map +7 -0
  199. package/build/cjs/cc/index.d.ts +132 -0
  200. package/build/cjs/cc/index.js +1180 -0
  201. package/build/cjs/cc/index.js.map +7 -0
  202. package/build/cjs/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  203. package/build/cjs/cc/manufacturerProprietary/Decorators.js +76 -0
  204. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +7 -0
  205. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  206. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +412 -0
  207. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +7 -0
  208. package/build/cjs/index.d.ts +15 -0
  209. package/build/cjs/index.js +77 -0
  210. package/build/cjs/index.js.map +7 -0
  211. package/build/cjs/index_safe.d.ts +3 -0
  212. package/build/cjs/index_safe.js +25 -0
  213. package/build/cjs/index_safe.js.map +7 -0
  214. package/build/cjs/lib/API.d.ts +271 -0
  215. package/build/cjs/lib/API.js +413 -0
  216. package/build/cjs/lib/API.js.map +7 -0
  217. package/build/cjs/lib/CommandClass.d.ts +234 -0
  218. package/build/cjs/lib/CommandClass.js +692 -0
  219. package/build/cjs/lib/CommandClass.js.map +7 -0
  220. package/build/cjs/lib/CommandClassDecorators.d.ts +112 -0
  221. package/build/cjs/lib/CommandClassDecorators.js +182 -0
  222. package/build/cjs/lib/CommandClassDecorators.js.map +7 -0
  223. package/build/cjs/lib/EncapsulatingCommandClass.d.ts +22 -0
  224. package/build/cjs/lib/EncapsulatingCommandClass.js +71 -0
  225. package/build/cjs/lib/EncapsulatingCommandClass.js.map +7 -0
  226. package/build/cjs/lib/ICommandClassContainer.js +17 -0
  227. package/build/cjs/lib/ICommandClassContainer.js.map +7 -0
  228. package/build/cjs/lib/NotificationEventPayload.d.ts +10 -0
  229. package/build/cjs/lib/NotificationEventPayload.js +31 -0
  230. package/build/cjs/lib/NotificationEventPayload.js.map +7 -0
  231. package/build/cjs/lib/Security2/Extension.js +333 -0
  232. package/build/cjs/lib/Security2/Extension.js.map +7 -0
  233. package/build/cjs/lib/Security2/shared.js +69 -0
  234. package/build/cjs/lib/Security2/shared.js.map +7 -0
  235. package/build/cjs/lib/SetValueResult.js +65 -0
  236. package/build/cjs/lib/SetValueResult.js.map +7 -0
  237. package/build/cjs/lib/Values.d.ts +223 -0
  238. package/build/cjs/lib/Values.js +191 -0
  239. package/build/cjs/lib/Values.js.map +7 -0
  240. package/build/cjs/lib/_Types.js +1676 -0
  241. package/build/cjs/lib/_Types.js.map +7 -0
  242. package/build/cjs/lib/serializers.d.ts +34 -0
  243. package/build/cjs/lib/serializers.js +110 -0
  244. package/build/cjs/lib/serializers.js.map +7 -0
  245. package/build/cjs/lib/utils.d.ts +17 -0
  246. package/build/cjs/lib/utils.js +678 -0
  247. package/build/cjs/lib/utils.js.map +7 -0
  248. package/build/cjs/package.json +3 -0
  249. package/build/esm/cc/AlarmSensorCC.d.ts +194 -0
  250. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -0
  251. package/build/esm/cc/AlarmSensorCC.js +392 -0
  252. package/build/esm/cc/AlarmSensorCC.js.map +1 -0
  253. package/build/esm/cc/AssociationCC.d.ts +253 -0
  254. package/build/esm/cc/AssociationCC.d.ts.map +1 -0
  255. package/build/esm/cc/AssociationCC.js +706 -0
  256. package/build/esm/cc/AssociationCC.js.map +1 -0
  257. package/build/esm/cc/AssociationGroupInfoCC.d.ts +230 -0
  258. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -0
  259. package/build/esm/cc/AssociationGroupInfoCC.js +769 -0
  260. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -0
  261. package/build/esm/cc/BarrierOperatorCC.d.ts +243 -0
  262. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -0
  263. package/build/esm/cc/BarrierOperatorCC.js +610 -0
  264. package/build/esm/cc/BarrierOperatorCC.js.map +1 -0
  265. package/build/esm/cc/BasicCC.d.ts +191 -0
  266. package/build/esm/cc/BasicCC.d.ts.map +1 -0
  267. package/build/esm/cc/BasicCC.js +390 -0
  268. package/build/esm/cc/BasicCC.js.map +1 -0
  269. package/build/esm/cc/BatteryCC.d.ts +406 -0
  270. package/build/esm/cc/BatteryCC.d.ts.map +1 -0
  271. package/build/esm/cc/BatteryCC.js +513 -0
  272. package/build/esm/cc/BatteryCC.js.map +1 -0
  273. package/build/esm/cc/BinarySensorCC.d.ts +122 -0
  274. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -0
  275. package/build/esm/cc/BinarySensorCC.js +417 -0
  276. package/build/esm/cc/BinarySensorCC.js.map +1 -0
  277. package/build/esm/cc/BinarySwitchCC.d.ts +139 -0
  278. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -0
  279. package/build/esm/cc/BinarySwitchCC.js +362 -0
  280. package/build/esm/cc/BinarySwitchCC.js.map +1 -0
  281. package/build/esm/cc/CRC16CC.d.ts +29 -0
  282. package/build/esm/cc/CRC16CC.d.ts.map +1 -0
  283. package/build/esm/cc/CRC16CC.js +123 -0
  284. package/build/esm/cc/CRC16CC.js.map +1 -0
  285. package/build/esm/cc/CentralSceneCC.d.ts +210 -0
  286. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -0
  287. package/build/esm/cc/CentralSceneCC.js +427 -0
  288. package/build/esm/cc/CentralSceneCC.js.map +1 -0
  289. package/build/esm/cc/ClimateControlScheduleCC.d.ts +177 -0
  290. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -0
  291. package/build/esm/cc/ClimateControlScheduleCC.js +466 -0
  292. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -0
  293. package/build/esm/cc/ClockCC.d.ts +47 -0
  294. package/build/esm/cc/ClockCC.d.ts.map +1 -0
  295. package/build/esm/cc/ClockCC.js +205 -0
  296. package/build/esm/cc/ClockCC.js.map +1 -0
  297. package/build/esm/cc/ColorSwitchCC.d.ts +339 -0
  298. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -0
  299. package/build/esm/cc/ColorSwitchCC.js +1149 -0
  300. package/build/esm/cc/ColorSwitchCC.js.map +1 -0
  301. package/build/esm/cc/ConfigurationCC.d.ts +396 -0
  302. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -0
  303. package/build/esm/cc/ConfigurationCC.js +2454 -0
  304. package/build/esm/cc/ConfigurationCC.js.map +1 -0
  305. package/build/esm/cc/DeviceResetLocallyCC.d.ts +17 -0
  306. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -0
  307. package/build/esm/cc/DeviceResetLocallyCC.js +73 -0
  308. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -0
  309. package/build/esm/cc/DoorLockCC.d.ts +837 -0
  310. package/build/esm/cc/DoorLockCC.d.ts.map +1 -0
  311. package/build/esm/cc/DoorLockCC.js +1270 -0
  312. package/build/esm/cc/DoorLockCC.js.map +1 -0
  313. package/build/esm/cc/DoorLockLoggingCC.d.ts +77 -0
  314. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -0
  315. package/build/esm/cc/DoorLockLoggingCC.js +316 -0
  316. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -0
  317. package/build/esm/cc/EnergyProductionCC.d.ts +77 -0
  318. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -0
  319. package/build/esm/cc/EnergyProductionCC.js +213 -0
  320. package/build/esm/cc/EnergyProductionCC.js.map +1 -0
  321. package/build/esm/cc/EntryControlCC.d.ts +231 -0
  322. package/build/esm/cc/EntryControlCC.d.ts.map +1 -0
  323. package/build/esm/cc/EntryControlCC.js +581 -0
  324. package/build/esm/cc/EntryControlCC.js.map +1 -0
  325. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +359 -0
  326. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
  327. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1142 -0
  328. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
  329. package/build/esm/cc/HailCC.d.ts +6 -0
  330. package/build/esm/cc/HailCC.d.ts.map +1 -0
  331. package/build/esm/cc/HailCC.js +21 -0
  332. package/build/esm/cc/HailCC.js.map +1 -0
  333. package/build/esm/cc/HumidityControlModeCC.d.ts +111 -0
  334. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -0
  335. package/build/esm/cc/HumidityControlModeCC.js +305 -0
  336. package/build/esm/cc/HumidityControlModeCC.js.map +1 -0
  337. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +60 -0
  338. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
  339. package/build/esm/cc/HumidityControlOperatingStateCC.js +137 -0
  340. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -0
  341. package/build/esm/cc/HumidityControlSetpointCC.d.ts +209 -0
  342. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -0
  343. package/build/esm/cc/HumidityControlSetpointCC.js +645 -0
  344. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -0
  345. package/build/esm/cc/InclusionControllerCC.d.ts +42 -0
  346. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -0
  347. package/build/esm/cc/InclusionControllerCC.js +133 -0
  348. package/build/esm/cc/InclusionControllerCC.js.map +1 -0
  349. package/build/esm/cc/IndicatorCC.d.ts +338 -0
  350. package/build/esm/cc/IndicatorCC.d.ts.map +1 -0
  351. package/build/esm/cc/IndicatorCC.js +1317 -0
  352. package/build/esm/cc/IndicatorCC.js.map +1 -0
  353. package/build/esm/cc/IrrigationCC.d.ts +1496 -0
  354. package/build/esm/cc/IrrigationCC.d.ts.map +1 -0
  355. package/build/esm/cc/IrrigationCC.js +2038 -0
  356. package/build/esm/cc/IrrigationCC.js.map +1 -0
  357. package/build/esm/cc/LanguageCC.d.ts +101 -0
  358. package/build/esm/cc/LanguageCC.d.ts.map +1 -0
  359. package/build/esm/cc/LanguageCC.js +243 -0
  360. package/build/esm/cc/LanguageCC.js.map +1 -0
  361. package/build/esm/cc/LockCC.d.ts +73 -0
  362. package/build/esm/cc/LockCC.d.ts.map +1 -0
  363. package/build/esm/cc/LockCC.js +197 -0
  364. package/build/esm/cc/LockCC.js.map +1 -0
  365. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +32 -0
  366. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
  367. package/build/esm/cc/ManufacturerProprietaryCC.js +201 -0
  368. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -0
  369. package/build/esm/cc/ManufacturerSpecificCC.d.ts +171 -0
  370. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -0
  371. package/build/esm/cc/ManufacturerSpecificCC.js +315 -0
  372. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -0
  373. package/build/esm/cc/MeterCC.d.ts +318 -0
  374. package/build/esm/cc/MeterCC.d.ts.map +1 -0
  375. package/build/esm/cc/MeterCC.js +1308 -0
  376. package/build/esm/cc/MeterCC.js.map +1 -0
  377. package/build/esm/cc/MultiChannelAssociationCC.d.ts +241 -0
  378. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -0
  379. package/build/esm/cc/MultiChannelAssociationCC.js +981 -0
  380. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -0
  381. package/build/esm/cc/MultiChannelCC.d.ts +394 -0
  382. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -0
  383. package/build/esm/cc/MultiChannelCC.js +1127 -0
  384. package/build/esm/cc/MultiChannelCC.js.map +1 -0
  385. package/build/esm/cc/MultiCommandCC.d.ts +27 -0
  386. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -0
  387. package/build/esm/cc/MultiCommandCC.js +142 -0
  388. package/build/esm/cc/MultiCommandCC.js.map +1 -0
  389. package/build/esm/cc/MultilevelSensorCC.d.ts +185 -0
  390. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -0
  391. package/build/esm/cc/MultilevelSensorCC.js +753 -0
  392. package/build/esm/cc/MultilevelSensorCC.js.map +1 -0
  393. package/build/esm/cc/MultilevelSwitchCC.d.ts +357 -0
  394. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -0
  395. package/build/esm/cc/MultilevelSwitchCC.js +810 -0
  396. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -0
  397. package/build/esm/cc/NoOperationCC.d.ts +9 -0
  398. package/build/esm/cc/NoOperationCC.d.ts.map +1 -0
  399. package/build/esm/cc/NoOperationCC.js +39 -0
  400. package/build/esm/cc/NoOperationCC.js.map +1 -0
  401. package/build/esm/cc/NodeNamingCC.d.ts +118 -0
  402. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -0
  403. package/build/esm/cc/NodeNamingCC.js +345 -0
  404. package/build/esm/cc/NodeNamingCC.js.map +1 -0
  405. package/build/esm/cc/NotificationCC.d.ts +479 -0
  406. package/build/esm/cc/NotificationCC.d.ts.map +1 -0
  407. package/build/esm/cc/NotificationCC.js +1350 -0
  408. package/build/esm/cc/NotificationCC.js.map +1 -0
  409. package/build/esm/cc/PowerlevelCC.d.ts +82 -0
  410. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -0
  411. package/build/esm/cc/PowerlevelCC.js +485 -0
  412. package/build/esm/cc/PowerlevelCC.js.map +1 -0
  413. package/build/esm/cc/ProtectionCC.d.ts +325 -0
  414. package/build/esm/cc/ProtectionCC.d.ts.map +1 -0
  415. package/build/esm/cc/ProtectionCC.js +669 -0
  416. package/build/esm/cc/ProtectionCC.js.map +1 -0
  417. package/build/esm/cc/SceneActivationCC.d.ts +89 -0
  418. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -0
  419. package/build/esm/cc/SceneActivationCC.js +166 -0
  420. package/build/esm/cc/SceneActivationCC.js.map +1 -0
  421. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +120 -0
  422. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
  423. package/build/esm/cc/SceneActuatorConfigurationCC.js +374 -0
  424. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -0
  425. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +129 -0
  426. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
  427. package/build/esm/cc/SceneControllerConfigurationCC.js +446 -0
  428. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -0
  429. package/build/esm/cc/ScheduleEntryLockCC.d.ts +434 -0
  430. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -0
  431. package/build/esm/cc/ScheduleEntryLockCC.js +1826 -0
  432. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -0
  433. package/build/esm/cc/Security2CC.d.ts +251 -0
  434. package/build/esm/cc/Security2CC.d.ts.map +1 -0
  435. package/build/esm/cc/Security2CC.js +1814 -0
  436. package/build/esm/cc/Security2CC.js.map +1 -0
  437. package/build/esm/cc/SecurityCC.d.ts +128 -0
  438. package/build/esm/cc/SecurityCC.d.ts.map +1 -0
  439. package/build/esm/cc/SecurityCC.js +800 -0
  440. package/build/esm/cc/SecurityCC.js.map +1 -0
  441. package/build/esm/cc/SoundSwitchCC.d.ts +232 -0
  442. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -0
  443. package/build/esm/cc/SoundSwitchCC.js +633 -0
  444. package/build/esm/cc/SoundSwitchCC.js.map +1 -0
  445. package/build/esm/cc/SupervisionCC.d.ts +104 -0
  446. package/build/esm/cc/SupervisionCC.d.ts.map +1 -0
  447. package/build/esm/cc/SupervisionCC.js +319 -0
  448. package/build/esm/cc/SupervisionCC.js.map +1 -0
  449. package/build/esm/cc/ThermostatFanModeCC.d.ts +141 -0
  450. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -0
  451. package/build/esm/cc/ThermostatFanModeCC.js +359 -0
  452. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -0
  453. package/build/esm/cc/ThermostatFanStateCC.d.ts +60 -0
  454. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -0
  455. package/build/esm/cc/ThermostatFanStateCC.js +139 -0
  456. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -0
  457. package/build/esm/cc/ThermostatModeCC.d.ts +150 -0
  458. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -0
  459. package/build/esm/cc/ThermostatModeCC.js +426 -0
  460. package/build/esm/cc/ThermostatModeCC.js.map +1 -0
  461. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +61 -0
  462. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
  463. package/build/esm/cc/ThermostatOperatingStateCC.js +135 -0
  464. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -0
  465. package/build/esm/cc/ThermostatSetbackCC.d.ts +46 -0
  466. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -0
  467. package/build/esm/cc/ThermostatSetbackCC.js +244 -0
  468. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -0
  469. package/build/esm/cc/ThermostatSetpointCC.d.ts +197 -0
  470. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -0
  471. package/build/esm/cc/ThermostatSetpointCC.js +655 -0
  472. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -0
  473. package/build/esm/cc/TimeCC.d.ts +88 -0
  474. package/build/esm/cc/TimeCC.d.ts.map +1 -0
  475. package/build/esm/cc/TimeCC.js +451 -0
  476. package/build/esm/cc/TimeCC.js.map +1 -0
  477. package/build/esm/cc/TimeParametersCC.d.ts +72 -0
  478. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -0
  479. package/build/esm/cc/TimeParametersCC.js +300 -0
  480. package/build/esm/cc/TimeParametersCC.js.map +1 -0
  481. package/build/esm/cc/TransportServiceCC.d.ts +107 -0
  482. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -0
  483. package/build/esm/cc/TransportServiceCC.js +422 -0
  484. package/build/esm/cc/TransportServiceCC.js.map +1 -0
  485. package/build/esm/cc/UserCodeCC.d.ts +683 -0
  486. package/build/esm/cc/UserCodeCC.d.ts.map +1 -0
  487. package/build/esm/cc/UserCodeCC.js +1695 -0
  488. package/build/esm/cc/UserCodeCC.js.map +1 -0
  489. package/build/esm/cc/VersionCC.d.ts +469 -0
  490. package/build/esm/cc/VersionCC.d.ts.map +1 -0
  491. package/build/esm/cc/VersionCC.js +862 -0
  492. package/build/esm/cc/VersionCC.js.map +1 -0
  493. package/build/esm/cc/WakeUpCC.d.ts +150 -0
  494. package/build/esm/cc/WakeUpCC.d.ts.map +1 -0
  495. package/build/esm/cc/WakeUpCC.js +438 -0
  496. package/build/esm/cc/WakeUpCC.js.map +1 -0
  497. package/build/esm/cc/WindowCoveringCC.d.ts +315 -0
  498. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -0
  499. package/build/esm/cc/WindowCoveringCC.js +780 -0
  500. package/build/esm/cc/WindowCoveringCC.js.map +1 -0
  501. package/build/esm/cc/ZWaveLongRangeCC.d.ts +4 -0
  502. package/build/esm/cc/ZWaveLongRangeCC.d.ts.map +1 -0
  503. package/build/esm/cc/ZWaveLongRangeCC.js +17 -0
  504. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -0
  505. package/build/esm/cc/ZWavePlusCC.d.ts +163 -0
  506. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -0
  507. package/build/esm/cc/ZWavePlusCC.js +267 -0
  508. package/build/esm/cc/ZWavePlusCC.js.map +1 -0
  509. package/build/esm/cc/ZWaveProtocolCC.d.ts +344 -0
  510. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -0
  511. package/build/esm/cc/ZWaveProtocolCC.js +1030 -0
  512. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -0
  513. package/build/esm/cc/index.d.ts +132 -0
  514. package/build/esm/cc/index.d.ts.map +1 -0
  515. package/build/esm/cc/index.js +71 -0
  516. package/build/esm/cc/index.js.map +1 -0
  517. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts +64 -0
  518. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -0
  519. package/build/esm/cc/manufacturerProprietary/Decorators.js +79 -0
  520. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -0
  521. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +79 -0
  522. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
  523. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +385 -0
  524. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
  525. package/build/esm/index.d.ts +15 -0
  526. package/build/esm/index.d.ts.map +1 -0
  527. package/build/esm/index.js +14 -0
  528. package/build/esm/index.js.map +1 -0
  529. package/build/esm/index_safe.d.ts +3 -0
  530. package/build/esm/index_safe.d.ts.map +1 -0
  531. package/build/esm/index_safe.js +4 -0
  532. package/build/esm/index_safe.js.map +1 -0
  533. package/build/esm/lib/API.d.ts +271 -0
  534. package/build/esm/lib/API.d.ts.map +1 -0
  535. package/build/esm/lib/API.js +448 -0
  536. package/build/esm/lib/API.js.map +1 -0
  537. package/build/esm/lib/CommandClass.d.ts +234 -0
  538. package/build/esm/lib/CommandClass.d.ts.map +1 -0
  539. package/build/esm/lib/CommandClass.js +781 -0
  540. package/build/esm/lib/CommandClass.js.map +1 -0
  541. package/build/esm/lib/CommandClassDecorators.d.ts +112 -0
  542. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -0
  543. package/build/esm/lib/CommandClassDecorators.js +229 -0
  544. package/build/esm/lib/CommandClassDecorators.js.map +1 -0
  545. package/build/esm/lib/EncapsulatingCommandClass.d.ts +22 -0
  546. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -0
  547. package/build/esm/lib/EncapsulatingCommandClass.js +56 -0
  548. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -0
  549. package/build/esm/lib/ICommandClassContainer.d.ts +2 -0
  550. package/build/esm/lib/ICommandClassContainer.d.ts.map +1 -0
  551. package/build/esm/lib/ICommandClassContainer.js +2 -0
  552. package/build/esm/lib/ICommandClassContainer.js.map +1 -0
  553. package/build/esm/lib/NotificationEventPayload.d.ts +10 -0
  554. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -0
  555. package/build/esm/lib/NotificationEventPayload.js +7 -0
  556. package/build/esm/lib/NotificationEventPayload.js.map +1 -0
  557. package/build/esm/lib/Security2/Extension.d.ts +106 -0
  558. package/build/esm/lib/Security2/Extension.d.ts.map +1 -0
  559. package/build/esm/lib/Security2/Extension.js +296 -0
  560. package/build/esm/lib/Security2/Extension.js.map +1 -0
  561. package/build/esm/lib/Security2/shared.d.ts +37 -0
  562. package/build/esm/lib/Security2/shared.d.ts.map +1 -0
  563. package/build/esm/lib/Security2/shared.js +40 -0
  564. package/build/esm/lib/Security2/shared.js.map +1 -0
  565. package/build/esm/lib/SetValueResult.d.ts +55 -0
  566. package/build/esm/lib/SetValueResult.d.ts.map +1 -0
  567. package/build/esm/lib/SetValueResult.js +53 -0
  568. package/build/esm/lib/SetValueResult.js.map +1 -0
  569. package/build/esm/lib/Values.d.ts +223 -0
  570. package/build/esm/lib/Values.d.ts.map +1 -0
  571. package/build/esm/lib/Values.js +169 -0
  572. package/build/esm/lib/Values.js.map +1 -0
  573. package/build/esm/lib/_Types.d.ts +1461 -0
  574. package/build/esm/lib/_Types.d.ts.map +1 -0
  575. package/build/esm/lib/_Types.js +1432 -0
  576. package/build/esm/lib/_Types.js.map +1 -0
  577. package/build/esm/lib/serializers.d.ts +34 -0
  578. package/build/esm/lib/serializers.d.ts.map +1 -0
  579. package/build/esm/lib/serializers.js +98 -0
  580. package/build/esm/lib/serializers.js.map +1 -0
  581. package/build/esm/lib/utils.d.ts +17 -0
  582. package/build/esm/lib/utils.d.ts.map +1 -0
  583. package/build/esm/lib/utils.js +847 -0
  584. package/build/esm/lib/utils.js.map +1 -0
  585. package/build/esm/package.json +3 -0
  586. package/package.json +28 -23
  587. package/build/cc/AlarmSensorCC.d.ts +0 -194
  588. package/build/cc/AlarmSensorCC.d.ts.map +0 -1
  589. package/build/cc/AlarmSensorCC.js +0 -395
  590. package/build/cc/AlarmSensorCC.js.map +0 -1
  591. package/build/cc/AssociationCC.d.ts +0 -253
  592. package/build/cc/AssociationCC.d.ts.map +0 -1
  593. package/build/cc/AssociationCC.js +0 -732
  594. package/build/cc/AssociationCC.js.map +0 -1
  595. package/build/cc/AssociationGroupInfoCC.d.ts +0 -230
  596. package/build/cc/AssociationGroupInfoCC.d.ts.map +0 -1
  597. package/build/cc/AssociationGroupInfoCC.js +0 -772
  598. package/build/cc/AssociationGroupInfoCC.js.map +0 -1
  599. package/build/cc/BarrierOperatorCC.d.ts +0 -243
  600. package/build/cc/BarrierOperatorCC.d.ts.map +0 -1
  601. package/build/cc/BarrierOperatorCC.js +0 -613
  602. package/build/cc/BarrierOperatorCC.js.map +0 -1
  603. package/build/cc/BasicCC.d.ts +0 -191
  604. package/build/cc/BasicCC.d.ts.map +0 -1
  605. package/build/cc/BasicCC.js +0 -393
  606. package/build/cc/BasicCC.js.map +0 -1
  607. package/build/cc/BatteryCC.d.ts +0 -406
  608. package/build/cc/BatteryCC.d.ts.map +0 -1
  609. package/build/cc/BatteryCC.js +0 -516
  610. package/build/cc/BatteryCC.js.map +0 -1
  611. package/build/cc/BinarySensorCC.d.ts +0 -122
  612. package/build/cc/BinarySensorCC.d.ts.map +0 -1
  613. package/build/cc/BinarySensorCC.js +0 -420
  614. package/build/cc/BinarySensorCC.js.map +0 -1
  615. package/build/cc/BinarySwitchCC.d.ts +0 -139
  616. package/build/cc/BinarySwitchCC.d.ts.map +0 -1
  617. package/build/cc/BinarySwitchCC.js +0 -365
  618. package/build/cc/BinarySwitchCC.js.map +0 -1
  619. package/build/cc/CRC16CC.d.ts +0 -29
  620. package/build/cc/CRC16CC.d.ts.map +0 -1
  621. package/build/cc/CRC16CC.js +0 -126
  622. package/build/cc/CRC16CC.js.map +0 -1
  623. package/build/cc/CentralSceneCC.d.ts +0 -210
  624. package/build/cc/CentralSceneCC.d.ts.map +0 -1
  625. package/build/cc/CentralSceneCC.js +0 -453
  626. package/build/cc/CentralSceneCC.js.map +0 -1
  627. package/build/cc/ClimateControlScheduleCC.d.ts +0 -177
  628. package/build/cc/ClimateControlScheduleCC.d.ts.map +0 -1
  629. package/build/cc/ClimateControlScheduleCC.js +0 -469
  630. package/build/cc/ClimateControlScheduleCC.js.map +0 -1
  631. package/build/cc/ClockCC.d.ts +0 -47
  632. package/build/cc/ClockCC.d.ts.map +0 -1
  633. package/build/cc/ClockCC.js +0 -208
  634. package/build/cc/ClockCC.js.map +0 -1
  635. package/build/cc/ColorSwitchCC.d.ts +0 -339
  636. package/build/cc/ColorSwitchCC.d.ts.map +0 -1
  637. package/build/cc/ColorSwitchCC.js +0 -1152
  638. package/build/cc/ColorSwitchCC.js.map +0 -1
  639. package/build/cc/ConfigurationCC.d.ts +0 -396
  640. package/build/cc/ConfigurationCC.d.ts.map +0 -1
  641. package/build/cc/ConfigurationCC.js +0 -2458
  642. package/build/cc/ConfigurationCC.js.map +0 -1
  643. package/build/cc/DeviceResetLocallyCC.d.ts +0 -17
  644. package/build/cc/DeviceResetLocallyCC.d.ts.map +0 -1
  645. package/build/cc/DeviceResetLocallyCC.js +0 -76
  646. package/build/cc/DeviceResetLocallyCC.js.map +0 -1
  647. package/build/cc/DoorLockCC.d.ts +0 -837
  648. package/build/cc/DoorLockCC.d.ts.map +0 -1
  649. package/build/cc/DoorLockCC.js +0 -1273
  650. package/build/cc/DoorLockCC.js.map +0 -1
  651. package/build/cc/DoorLockLoggingCC.d.ts +0 -77
  652. package/build/cc/DoorLockLoggingCC.d.ts.map +0 -1
  653. package/build/cc/DoorLockLoggingCC.js +0 -319
  654. package/build/cc/DoorLockLoggingCC.js.map +0 -1
  655. package/build/cc/EnergyProductionCC.d.ts +0 -77
  656. package/build/cc/EnergyProductionCC.d.ts.map +0 -1
  657. package/build/cc/EnergyProductionCC.js +0 -216
  658. package/build/cc/EnergyProductionCC.js.map +0 -1
  659. package/build/cc/EntryControlCC.d.ts +0 -231
  660. package/build/cc/EntryControlCC.d.ts.map +0 -1
  661. package/build/cc/EntryControlCC.js +0 -607
  662. package/build/cc/EntryControlCC.js.map +0 -1
  663. package/build/cc/FirmwareUpdateMetaDataCC.d.ts +0 -359
  664. package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +0 -1
  665. package/build/cc/FirmwareUpdateMetaDataCC.js +0 -1145
  666. package/build/cc/FirmwareUpdateMetaDataCC.js.map +0 -1
  667. package/build/cc/HailCC.d.ts +0 -6
  668. package/build/cc/HailCC.d.ts.map +0 -1
  669. package/build/cc/HailCC.js +0 -24
  670. package/build/cc/HailCC.js.map +0 -1
  671. package/build/cc/HumidityControlModeCC.d.ts +0 -111
  672. package/build/cc/HumidityControlModeCC.d.ts.map +0 -1
  673. package/build/cc/HumidityControlModeCC.js +0 -308
  674. package/build/cc/HumidityControlModeCC.js.map +0 -1
  675. package/build/cc/HumidityControlOperatingStateCC.d.ts +0 -60
  676. package/build/cc/HumidityControlOperatingStateCC.d.ts.map +0 -1
  677. package/build/cc/HumidityControlOperatingStateCC.js +0 -140
  678. package/build/cc/HumidityControlOperatingStateCC.js.map +0 -1
  679. package/build/cc/HumidityControlSetpointCC.d.ts +0 -209
  680. package/build/cc/HumidityControlSetpointCC.d.ts.map +0 -1
  681. package/build/cc/HumidityControlSetpointCC.js +0 -648
  682. package/build/cc/HumidityControlSetpointCC.js.map +0 -1
  683. package/build/cc/InclusionControllerCC.d.ts +0 -42
  684. package/build/cc/InclusionControllerCC.d.ts.map +0 -1
  685. package/build/cc/InclusionControllerCC.js +0 -136
  686. package/build/cc/InclusionControllerCC.js.map +0 -1
  687. package/build/cc/IndicatorCC.d.ts +0 -338
  688. package/build/cc/IndicatorCC.d.ts.map +0 -1
  689. package/build/cc/IndicatorCC.js +0 -1320
  690. package/build/cc/IndicatorCC.js.map +0 -1
  691. package/build/cc/IrrigationCC.d.ts +0 -1496
  692. package/build/cc/IrrigationCC.d.ts.map +0 -1
  693. package/build/cc/IrrigationCC.js +0 -2041
  694. package/build/cc/IrrigationCC.js.map +0 -1
  695. package/build/cc/LanguageCC.d.ts +0 -101
  696. package/build/cc/LanguageCC.d.ts.map +0 -1
  697. package/build/cc/LanguageCC.js +0 -246
  698. package/build/cc/LanguageCC.js.map +0 -1
  699. package/build/cc/LockCC.d.ts +0 -73
  700. package/build/cc/LockCC.d.ts.map +0 -1
  701. package/build/cc/LockCC.js +0 -200
  702. package/build/cc/LockCC.js.map +0 -1
  703. package/build/cc/ManufacturerProprietaryCC.d.ts +0 -32
  704. package/build/cc/ManufacturerProprietaryCC.d.ts.map +0 -1
  705. package/build/cc/ManufacturerProprietaryCC.js +0 -204
  706. package/build/cc/ManufacturerProprietaryCC.js.map +0 -1
  707. package/build/cc/ManufacturerSpecificCC.d.ts +0 -171
  708. package/build/cc/ManufacturerSpecificCC.d.ts.map +0 -1
  709. package/build/cc/ManufacturerSpecificCC.js +0 -318
  710. package/build/cc/ManufacturerSpecificCC.js.map +0 -1
  711. package/build/cc/MeterCC.d.ts +0 -318
  712. package/build/cc/MeterCC.d.ts.map +0 -1
  713. package/build/cc/MeterCC.js +0 -1312
  714. package/build/cc/MeterCC.js.map +0 -1
  715. package/build/cc/MultiChannelAssociationCC.d.ts +0 -241
  716. package/build/cc/MultiChannelAssociationCC.d.ts.map +0 -1
  717. package/build/cc/MultiChannelAssociationCC.js +0 -1007
  718. package/build/cc/MultiChannelAssociationCC.js.map +0 -1
  719. package/build/cc/MultiChannelCC.d.ts +0 -394
  720. package/build/cc/MultiChannelCC.d.ts.map +0 -1
  721. package/build/cc/MultiChannelCC.js +0 -1130
  722. package/build/cc/MultiChannelCC.js.map +0 -1
  723. package/build/cc/MultiCommandCC.d.ts +0 -27
  724. package/build/cc/MultiCommandCC.d.ts.map +0 -1
  725. package/build/cc/MultiCommandCC.js +0 -145
  726. package/build/cc/MultiCommandCC.js.map +0 -1
  727. package/build/cc/MultilevelSensorCC.d.ts +0 -185
  728. package/build/cc/MultilevelSensorCC.d.ts.map +0 -1
  729. package/build/cc/MultilevelSensorCC.js +0 -756
  730. package/build/cc/MultilevelSensorCC.js.map +0 -1
  731. package/build/cc/MultilevelSwitchCC.d.ts +0 -357
  732. package/build/cc/MultilevelSwitchCC.d.ts.map +0 -1
  733. package/build/cc/MultilevelSwitchCC.js +0 -813
  734. package/build/cc/MultilevelSwitchCC.js.map +0 -1
  735. package/build/cc/NoOperationCC.d.ts +0 -9
  736. package/build/cc/NoOperationCC.d.ts.map +0 -1
  737. package/build/cc/NoOperationCC.js +0 -42
  738. package/build/cc/NoOperationCC.js.map +0 -1
  739. package/build/cc/NodeNamingCC.d.ts +0 -118
  740. package/build/cc/NodeNamingCC.d.ts.map +0 -1
  741. package/build/cc/NodeNamingCC.js +0 -348
  742. package/build/cc/NodeNamingCC.js.map +0 -1
  743. package/build/cc/NotificationCC.d.ts +0 -479
  744. package/build/cc/NotificationCC.d.ts.map +0 -1
  745. package/build/cc/NotificationCC.js +0 -1379
  746. package/build/cc/NotificationCC.js.map +0 -1
  747. package/build/cc/PowerlevelCC.d.ts +0 -82
  748. package/build/cc/PowerlevelCC.d.ts.map +0 -1
  749. package/build/cc/PowerlevelCC.js +0 -488
  750. package/build/cc/PowerlevelCC.js.map +0 -1
  751. package/build/cc/ProtectionCC.d.ts +0 -325
  752. package/build/cc/ProtectionCC.d.ts.map +0 -1
  753. package/build/cc/ProtectionCC.js +0 -672
  754. package/build/cc/ProtectionCC.js.map +0 -1
  755. package/build/cc/SceneActivationCC.d.ts +0 -89
  756. package/build/cc/SceneActivationCC.d.ts.map +0 -1
  757. package/build/cc/SceneActivationCC.js +0 -169
  758. package/build/cc/SceneActivationCC.js.map +0 -1
  759. package/build/cc/SceneActuatorConfigurationCC.d.ts +0 -120
  760. package/build/cc/SceneActuatorConfigurationCC.d.ts.map +0 -1
  761. package/build/cc/SceneActuatorConfigurationCC.js +0 -377
  762. package/build/cc/SceneActuatorConfigurationCC.js.map +0 -1
  763. package/build/cc/SceneControllerConfigurationCC.d.ts +0 -129
  764. package/build/cc/SceneControllerConfigurationCC.d.ts.map +0 -1
  765. package/build/cc/SceneControllerConfigurationCC.js +0 -449
  766. package/build/cc/SceneControllerConfigurationCC.js.map +0 -1
  767. package/build/cc/ScheduleEntryLockCC.d.ts +0 -434
  768. package/build/cc/ScheduleEntryLockCC.d.ts.map +0 -1
  769. package/build/cc/ScheduleEntryLockCC.js +0 -1829
  770. package/build/cc/ScheduleEntryLockCC.js.map +0 -1
  771. package/build/cc/Security2CC.d.ts +0 -251
  772. package/build/cc/Security2CC.d.ts.map +0 -1
  773. package/build/cc/Security2CC.js +0 -1817
  774. package/build/cc/Security2CC.js.map +0 -1
  775. package/build/cc/SecurityCC.d.ts +0 -128
  776. package/build/cc/SecurityCC.d.ts.map +0 -1
  777. package/build/cc/SecurityCC.js +0 -803
  778. package/build/cc/SecurityCC.js.map +0 -1
  779. package/build/cc/SoundSwitchCC.d.ts +0 -232
  780. package/build/cc/SoundSwitchCC.d.ts.map +0 -1
  781. package/build/cc/SoundSwitchCC.js +0 -636
  782. package/build/cc/SoundSwitchCC.js.map +0 -1
  783. package/build/cc/SupervisionCC.d.ts +0 -104
  784. package/build/cc/SupervisionCC.d.ts.map +0 -1
  785. package/build/cc/SupervisionCC.js +0 -322
  786. package/build/cc/SupervisionCC.js.map +0 -1
  787. package/build/cc/ThermostatFanModeCC.d.ts +0 -141
  788. package/build/cc/ThermostatFanModeCC.d.ts.map +0 -1
  789. package/build/cc/ThermostatFanModeCC.js +0 -362
  790. package/build/cc/ThermostatFanModeCC.js.map +0 -1
  791. package/build/cc/ThermostatFanStateCC.d.ts +0 -60
  792. package/build/cc/ThermostatFanStateCC.d.ts.map +0 -1
  793. package/build/cc/ThermostatFanStateCC.js +0 -142
  794. package/build/cc/ThermostatFanStateCC.js.map +0 -1
  795. package/build/cc/ThermostatModeCC.d.ts +0 -150
  796. package/build/cc/ThermostatModeCC.d.ts.map +0 -1
  797. package/build/cc/ThermostatModeCC.js +0 -429
  798. package/build/cc/ThermostatModeCC.js.map +0 -1
  799. package/build/cc/ThermostatOperatingStateCC.d.ts +0 -61
  800. package/build/cc/ThermostatOperatingStateCC.d.ts.map +0 -1
  801. package/build/cc/ThermostatOperatingStateCC.js +0 -138
  802. package/build/cc/ThermostatOperatingStateCC.js.map +0 -1
  803. package/build/cc/ThermostatSetbackCC.d.ts +0 -46
  804. package/build/cc/ThermostatSetbackCC.d.ts.map +0 -1
  805. package/build/cc/ThermostatSetbackCC.js +0 -247
  806. package/build/cc/ThermostatSetbackCC.js.map +0 -1
  807. package/build/cc/ThermostatSetpointCC.d.ts +0 -197
  808. package/build/cc/ThermostatSetpointCC.d.ts.map +0 -1
  809. package/build/cc/ThermostatSetpointCC.js +0 -658
  810. package/build/cc/ThermostatSetpointCC.js.map +0 -1
  811. package/build/cc/TimeCC.d.ts +0 -88
  812. package/build/cc/TimeCC.d.ts.map +0 -1
  813. package/build/cc/TimeCC.js +0 -454
  814. package/build/cc/TimeCC.js.map +0 -1
  815. package/build/cc/TimeParametersCC.d.ts +0 -72
  816. package/build/cc/TimeParametersCC.d.ts.map +0 -1
  817. package/build/cc/TimeParametersCC.js +0 -303
  818. package/build/cc/TimeParametersCC.js.map +0 -1
  819. package/build/cc/TransportServiceCC.d.ts +0 -107
  820. package/build/cc/TransportServiceCC.d.ts.map +0 -1
  821. package/build/cc/TransportServiceCC.js +0 -426
  822. package/build/cc/TransportServiceCC.js.map +0 -1
  823. package/build/cc/UserCodeCC.d.ts +0 -683
  824. package/build/cc/UserCodeCC.d.ts.map +0 -1
  825. package/build/cc/UserCodeCC.js +0 -1699
  826. package/build/cc/UserCodeCC.js.map +0 -1
  827. package/build/cc/VersionCC.d.ts +0 -469
  828. package/build/cc/VersionCC.d.ts.map +0 -1
  829. package/build/cc/VersionCC.js +0 -865
  830. package/build/cc/VersionCC.js.map +0 -1
  831. package/build/cc/WakeUpCC.d.ts +0 -150
  832. package/build/cc/WakeUpCC.d.ts.map +0 -1
  833. package/build/cc/WakeUpCC.js +0 -441
  834. package/build/cc/WakeUpCC.js.map +0 -1
  835. package/build/cc/WindowCoveringCC.d.ts +0 -315
  836. package/build/cc/WindowCoveringCC.d.ts.map +0 -1
  837. package/build/cc/WindowCoveringCC.js +0 -783
  838. package/build/cc/WindowCoveringCC.js.map +0 -1
  839. package/build/cc/ZWaveLongRangeCC.d.ts +0 -4
  840. package/build/cc/ZWaveLongRangeCC.d.ts.map +0 -1
  841. package/build/cc/ZWaveLongRangeCC.js +0 -20
  842. package/build/cc/ZWaveLongRangeCC.js.map +0 -1
  843. package/build/cc/ZWavePlusCC.d.ts +0 -163
  844. package/build/cc/ZWavePlusCC.d.ts.map +0 -1
  845. package/build/cc/ZWavePlusCC.js +0 -270
  846. package/build/cc/ZWavePlusCC.js.map +0 -1
  847. package/build/cc/ZWaveProtocolCC.d.ts +0 -344
  848. package/build/cc/ZWaveProtocolCC.d.ts.map +0 -1
  849. package/build/cc/ZWaveProtocolCC.js +0 -1033
  850. package/build/cc/ZWaveProtocolCC.js.map +0 -1
  851. package/build/cc/index.d.ts +0 -132
  852. package/build/cc/index.d.ts.map +0 -1
  853. package/build/cc/index.js +0 -627
  854. package/build/cc/index.js.map +0 -1
  855. package/build/cc/manufacturerProprietary/Decorators.d.ts +0 -64
  856. package/build/cc/manufacturerProprietary/Decorators.d.ts.map +0 -1
  857. package/build/cc/manufacturerProprietary/Decorators.js +0 -83
  858. package/build/cc/manufacturerProprietary/Decorators.js.map +0 -1
  859. package/build/cc/manufacturerProprietary/FibaroCC.d.ts +0 -79
  860. package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +0 -1
  861. package/build/cc/manufacturerProprietary/FibaroCC.js +0 -392
  862. package/build/cc/manufacturerProprietary/FibaroCC.js.map +0 -1
  863. package/build/index.d.ts +0 -15
  864. package/build/index.d.ts.map +0 -1
  865. package/build/index.js +0 -52
  866. package/build/index.js.map +0 -1
  867. package/build/index_safe.d.ts +0 -3
  868. package/build/index_safe.d.ts.map +0 -1
  869. package/build/index_safe.js +0 -20
  870. package/build/index_safe.js.map +0 -1
  871. package/build/lib/API.d.ts +0 -271
  872. package/build/lib/API.d.ts.map +0 -1
  873. package/build/lib/API.js +0 -458
  874. package/build/lib/API.js.map +0 -1
  875. package/build/lib/CommandClass.d.ts +0 -234
  876. package/build/lib/CommandClass.d.ts.map +0 -1
  877. package/build/lib/CommandClass.js +0 -788
  878. package/build/lib/CommandClass.js.map +0 -1
  879. package/build/lib/CommandClassDecorators.d.ts +0 -112
  880. package/build/lib/CommandClassDecorators.d.ts.map +0 -1
  881. package/build/lib/CommandClassDecorators.js +0 -243
  882. package/build/lib/CommandClassDecorators.js.map +0 -1
  883. package/build/lib/EncapsulatingCommandClass.d.ts +0 -22
  884. package/build/lib/EncapsulatingCommandClass.d.ts.map +0 -1
  885. package/build/lib/EncapsulatingCommandClass.js +0 -61
  886. package/build/lib/EncapsulatingCommandClass.js.map +0 -1
  887. package/build/lib/ICommandClassContainer.d.ts.map +0 -1
  888. package/build/lib/ICommandClassContainer.js +0 -3
  889. package/build/lib/ICommandClassContainer.js.map +0 -1
  890. package/build/lib/NotificationEventPayload.d.ts +0 -10
  891. package/build/lib/NotificationEventPayload.d.ts.map +0 -1
  892. package/build/lib/NotificationEventPayload.js +0 -10
  893. package/build/lib/NotificationEventPayload.js.map +0 -1
  894. package/build/lib/Security2/Extension.d.ts.map +0 -1
  895. package/build/lib/Security2/Extension.js +0 -303
  896. package/build/lib/Security2/Extension.js.map +0 -1
  897. package/build/lib/Security2/shared.d.ts.map +0 -1
  898. package/build/lib/Security2/shared.js +0 -43
  899. package/build/lib/Security2/shared.js.map +0 -1
  900. package/build/lib/SetValueResult.d.ts.map +0 -1
  901. package/build/lib/SetValueResult.js +0 -60
  902. package/build/lib/SetValueResult.js.map +0 -1
  903. package/build/lib/Values.d.ts +0 -223
  904. package/build/lib/Values.d.ts.map +0 -1
  905. package/build/lib/Values.js +0 -172
  906. package/build/lib/Values.js.map +0 -1
  907. package/build/lib/_Types.d.ts.map +0 -1
  908. package/build/lib/_Types.js +0 -1443
  909. package/build/lib/_Types.js.map +0 -1
  910. package/build/lib/serializers.d.ts +0 -34
  911. package/build/lib/serializers.d.ts.map +0 -1
  912. package/build/lib/serializers.js +0 -107
  913. package/build/lib/serializers.js.map +0 -1
  914. package/build/lib/utils.d.ts +0 -17
  915. package/build/lib/utils.d.ts.map +0 -1
  916. package/build/lib/utils.js +0 -860
  917. package/build/lib/utils.js.map +0 -1
  918. /package/build/{lib → cjs/lib}/ICommandClassContainer.d.ts +0 -0
  919. /package/build/{lib → cjs/lib}/Security2/Extension.d.ts +0 -0
  920. /package/build/{lib → cjs/lib}/Security2/shared.d.ts +0 -0
  921. /package/build/{lib → cjs/lib}/SetValueResult.d.ts +0 -0
  922. /package/build/{lib → cjs/lib}/_Types.d.ts +0 -0
@@ -0,0 +1,1826 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var ScheduleEntryLockCCEnableSet_1, ScheduleEntryLockCCEnableAllSet_1, ScheduleEntryLockCCSupportedReport_1, ScheduleEntryLockCCWeekDayScheduleSet_1, ScheduleEntryLockCCWeekDayScheduleReport_1, ScheduleEntryLockCCWeekDayScheduleGet_1, ScheduleEntryLockCCYearDayScheduleSet_1, ScheduleEntryLockCCYearDayScheduleReport_1, ScheduleEntryLockCCYearDayScheduleGet_1, ScheduleEntryLockCCTimeOffsetSet_1, ScheduleEntryLockCCTimeOffsetReport_1, ScheduleEntryLockCCDailyRepeatingScheduleSet_1, ScheduleEntryLockCCDailyRepeatingScheduleReport_1, ScheduleEntryLockCCDailyRepeatingScheduleGet_1;
8
+ function __assertType(argName, typeName, boundHasError) {
9
+ const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
10
+ if (boundHasError()) {
11
+ throw new ZWaveError(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes.Argument_Invalid);
12
+ }
13
+ }
14
+ const __assertType__boolean = $o => {
15
+ function _boolean($o) {
16
+ return typeof $o !== "boolean" ? {} : null;
17
+ }
18
+ return _boolean($o);
19
+ };
20
+ const __assertType__optional_number = $o => {
21
+ function _number($o) {
22
+ return typeof $o !== "number" ? {} : null;
23
+ }
24
+ function optional__number($o) {
25
+ if ($o !== undefined) {
26
+ const error = _number($o);
27
+ if (error)
28
+ return error;
29
+ }
30
+ return null;
31
+ }
32
+ return optional__number($o);
33
+ };
34
+ const __assertType__ScheduleEntryLockSlotId = $o => {
35
+ function _number($o) {
36
+ return typeof $o !== "number" ? {} : null;
37
+ }
38
+ function _0($o) {
39
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
40
+ return {};
41
+ if ("userId" in $o && $o["userId"] !== undefined) {
42
+ const error = _number($o["userId"]);
43
+ if (error)
44
+ return error;
45
+ }
46
+ else
47
+ return {};
48
+ if ("slotId" in $o && $o["slotId"] !== undefined) {
49
+ const error = _number($o["slotId"]);
50
+ if (error)
51
+ return error;
52
+ }
53
+ else
54
+ return {};
55
+ return null;
56
+ }
57
+ return _0($o);
58
+ };
59
+ const __assertType__optional_ScheduleEntryLockWeekDaySchedule = $o => {
60
+ function su__2__3__4__5__6__7__8_eu($o) {
61
+ return ![0, 1, 2, 3, 4, 5, 6].includes($o) ? {} : null;
62
+ }
63
+ function _number($o) {
64
+ return typeof $o !== "number" ? {} : null;
65
+ }
66
+ function _0($o) {
67
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
68
+ return {};
69
+ if ("weekday" in $o && $o["weekday"] !== undefined) {
70
+ const error = su__2__3__4__5__6__7__8_eu($o["weekday"]);
71
+ if (error)
72
+ return error;
73
+ }
74
+ else
75
+ return {};
76
+ if ("startHour" in $o && $o["startHour"] !== undefined) {
77
+ const error = _number($o["startHour"]);
78
+ if (error)
79
+ return error;
80
+ }
81
+ else
82
+ return {};
83
+ if ("startMinute" in $o && $o["startMinute"] !== undefined) {
84
+ const error = _number($o["startMinute"]);
85
+ if (error)
86
+ return error;
87
+ }
88
+ else
89
+ return {};
90
+ if ("stopHour" in $o && $o["stopHour"] !== undefined) {
91
+ const error = _number($o["stopHour"]);
92
+ if (error)
93
+ return error;
94
+ }
95
+ else
96
+ return {};
97
+ if ("stopMinute" in $o && $o["stopMinute"] !== undefined) {
98
+ const error = _number($o["stopMinute"]);
99
+ if (error)
100
+ return error;
101
+ }
102
+ else
103
+ return {};
104
+ return null;
105
+ }
106
+ function optional__0($o) {
107
+ if ($o !== undefined) {
108
+ const error = _0($o);
109
+ if (error)
110
+ return error;
111
+ }
112
+ return null;
113
+ }
114
+ return optional__0($o);
115
+ };
116
+ const __assertType__optional_ScheduleEntryLockYearDaySchedule = $o => {
117
+ function _number($o) {
118
+ return typeof $o !== "number" ? {} : null;
119
+ }
120
+ function _0($o) {
121
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
122
+ return {};
123
+ if ("startYear" in $o && $o["startYear"] !== undefined) {
124
+ const error = _number($o["startYear"]);
125
+ if (error)
126
+ return error;
127
+ }
128
+ else
129
+ return {};
130
+ if ("startMonth" in $o && $o["startMonth"] !== undefined) {
131
+ const error = _number($o["startMonth"]);
132
+ if (error)
133
+ return error;
134
+ }
135
+ else
136
+ return {};
137
+ if ("startDay" in $o && $o["startDay"] !== undefined) {
138
+ const error = _number($o["startDay"]);
139
+ if (error)
140
+ return error;
141
+ }
142
+ else
143
+ return {};
144
+ if ("startHour" in $o && $o["startHour"] !== undefined) {
145
+ const error = _number($o["startHour"]);
146
+ if (error)
147
+ return error;
148
+ }
149
+ else
150
+ return {};
151
+ if ("startMinute" in $o && $o["startMinute"] !== undefined) {
152
+ const error = _number($o["startMinute"]);
153
+ if (error)
154
+ return error;
155
+ }
156
+ else
157
+ return {};
158
+ if ("stopYear" in $o && $o["stopYear"] !== undefined) {
159
+ const error = _number($o["stopYear"]);
160
+ if (error)
161
+ return error;
162
+ }
163
+ else
164
+ return {};
165
+ if ("stopMonth" in $o && $o["stopMonth"] !== undefined) {
166
+ const error = _number($o["stopMonth"]);
167
+ if (error)
168
+ return error;
169
+ }
170
+ else
171
+ return {};
172
+ if ("stopDay" in $o && $o["stopDay"] !== undefined) {
173
+ const error = _number($o["stopDay"]);
174
+ if (error)
175
+ return error;
176
+ }
177
+ else
178
+ return {};
179
+ if ("stopHour" in $o && $o["stopHour"] !== undefined) {
180
+ const error = _number($o["stopHour"]);
181
+ if (error)
182
+ return error;
183
+ }
184
+ else
185
+ return {};
186
+ if ("stopMinute" in $o && $o["stopMinute"] !== undefined) {
187
+ const error = _number($o["stopMinute"]);
188
+ if (error)
189
+ return error;
190
+ }
191
+ else
192
+ return {};
193
+ return null;
194
+ }
195
+ function optional__0($o) {
196
+ if ($o !== undefined) {
197
+ const error = _0($o);
198
+ if (error)
199
+ return error;
200
+ }
201
+ return null;
202
+ }
203
+ return optional__0($o);
204
+ };
205
+ const __assertType__optional_ScheduleEntryLockDailyRepeatingSchedule = $o => {
206
+ function su__4__5__6__7__8__9__10_eu($o) {
207
+ return ![0, 1, 2, 3, 4, 5, 6].includes($o) ? {} : null;
208
+ }
209
+ function sa_su__4__5__6__7__8__9__10_eu_ea_3($o) {
210
+ if (!Array.isArray($o))
211
+ return {};
212
+ for (let i = 0; i < $o.length; i++) {
213
+ const error = su__4__5__6__7__8__9__10_eu($o[i]);
214
+ if (error)
215
+ return error;
216
+ }
217
+ return null;
218
+ }
219
+ function _number($o) {
220
+ return typeof $o !== "number" ? {} : null;
221
+ }
222
+ function _0($o) {
223
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
224
+ return {};
225
+ if ("weekdays" in $o && $o["weekdays"] !== undefined) {
226
+ const error = sa_su__4__5__6__7__8__9__10_eu_ea_3($o["weekdays"]);
227
+ if (error)
228
+ return error;
229
+ }
230
+ else
231
+ return {};
232
+ if ("startHour" in $o && $o["startHour"] !== undefined) {
233
+ const error = _number($o["startHour"]);
234
+ if (error)
235
+ return error;
236
+ }
237
+ else
238
+ return {};
239
+ if ("startMinute" in $o && $o["startMinute"] !== undefined) {
240
+ const error = _number($o["startMinute"]);
241
+ if (error)
242
+ return error;
243
+ }
244
+ else
245
+ return {};
246
+ if ("durationHour" in $o && $o["durationHour"] !== undefined) {
247
+ const error = _number($o["durationHour"]);
248
+ if (error)
249
+ return error;
250
+ }
251
+ else
252
+ return {};
253
+ if ("durationMinute" in $o && $o["durationMinute"] !== undefined) {
254
+ const error = _number($o["durationMinute"]);
255
+ if (error)
256
+ return error;
257
+ }
258
+ else
259
+ return {};
260
+ return null;
261
+ }
262
+ function optional__0($o) {
263
+ if ($o !== undefined) {
264
+ const error = _0($o);
265
+ if (error)
266
+ return error;
267
+ }
268
+ return null;
269
+ }
270
+ return optional__0($o);
271
+ };
272
+ const __assertType__Timezone = $o => {
273
+ function _number($o) {
274
+ return typeof $o !== "number" ? {} : null;
275
+ }
276
+ function _0($o) {
277
+ if (typeof $o !== "object" || $o === null || Array.isArray($o))
278
+ return {};
279
+ if ("standardOffset" in $o && $o["standardOffset"] !== undefined) {
280
+ const error = _number($o["standardOffset"]);
281
+ if (error)
282
+ return error;
283
+ }
284
+ else
285
+ return {};
286
+ if ("dstOffset" in $o && $o["dstOffset"] !== undefined) {
287
+ const error = _number($o["dstOffset"]);
288
+ if (error)
289
+ return error;
290
+ }
291
+ else
292
+ return {};
293
+ return null;
294
+ }
295
+ return _0($o);
296
+ };
297
+ import { CommandClasses, MessagePriority, ZWaveError, ZWaveErrorCodes, encodeBitMask, getDSTInfo, isUnsupervisedOrSucceeded, parseBitMask, validatePayload, } from "@zwave-js/core";
298
+ import { Bytes, formatDate, formatTime, getEnumMemberName, pick, } from "@zwave-js/shared";
299
+ import { CCAPI } from "../lib/API.js";
300
+ import { CommandClass, } from "../lib/CommandClass.js";
301
+ import { API, CCCommand, ccValue, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from "../lib/CommandClassDecorators.js";
302
+ import { V } from "../lib/Values.js";
303
+ import { ScheduleEntryLockCommand, ScheduleEntryLockScheduleKind, ScheduleEntryLockSetAction, ScheduleEntryLockWeekday, } from "../lib/_Types.js";
304
+ import { encodeTimezone, parseTimezone } from "../lib/serializers.js";
305
+ import { UserCodeCC } from "./UserCodeCC.js";
306
+ export const ScheduleEntryLockCCValues = Object.freeze({
307
+ ...V.defineStaticCCValues(CommandClasses["Schedule Entry Lock"], {
308
+ ...V.staticProperty("numWeekDaySlots", undefined, { internal: true }),
309
+ ...V.staticProperty("numYearDaySlots", undefined, { internal: true }),
310
+ ...V.staticProperty("numDailyRepeatingSlots", undefined, {
311
+ internal: true,
312
+ }),
313
+ }),
314
+ ...V.defineDynamicCCValues(CommandClasses["Schedule Entry Lock"], {
315
+ ...V.dynamicPropertyAndKeyWithName("userEnabled", "userEnabled", (userId) => userId, ({ property, propertyKey }) => property === "userEnabled" && typeof propertyKey === "number", undefined, { internal: true }),
316
+ ...V.dynamicPropertyAndKeyWithName("scheduleKind", "scheduleKind", (userId) => userId, ({ property, propertyKey }) => property === "scheduleKind" && typeof propertyKey === "number", undefined, { internal: true }),
317
+ ...V.dynamicPropertyAndKeyWithName("schedule", "schedule", (scheduleKind, userId, slotId) => toPropertyKey(scheduleKind, userId, slotId), ({ property, propertyKey }) => property === "schedule" && typeof propertyKey === "number", undefined, { internal: true }),
318
+ }),
319
+ });
320
+ function toPropertyKey(scheduleKind, userId, slotId) {
321
+ return (scheduleKind << 16) | (userId << 8) | slotId;
322
+ }
323
+ /** Caches information about a schedule */
324
+ function persistSchedule(ctx, scheduleKind, userId, slotId, schedule) {
325
+ const scheduleValue = ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId);
326
+ if (schedule != undefined) {
327
+ this.setValue(ctx, scheduleValue, schedule);
328
+ }
329
+ else {
330
+ this.removeValue(ctx, scheduleValue);
331
+ }
332
+ }
333
+ /** Updates the schedule kind assumed to be active for user in the cache */
334
+ function setUserCodeScheduleKindCached(ctx, endpoint, userId, scheduleKind) {
335
+ ctx
336
+ .getValueDB(endpoint.nodeId)
337
+ .setValue(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index), scheduleKind);
338
+ }
339
+ /** Updates whether scheduling is active for one or all user(s) in the cache */
340
+ function setUserCodeScheduleEnabledCached(ctx, endpoint, userId, enabled) {
341
+ const setEnabled = (userId) => {
342
+ ctx
343
+ .getValueDB(endpoint.nodeId)
344
+ .setValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index), enabled);
345
+ };
346
+ if (userId == undefined) {
347
+ // Enable/disable all users
348
+ const numUsers = UserCodeCC.getSupportedUsersCached(ctx, endpoint)
349
+ ?? 0;
350
+ for (let userId = 1; userId <= numUsers; userId++) {
351
+ setEnabled(userId);
352
+ }
353
+ }
354
+ else {
355
+ setEnabled(userId);
356
+ }
357
+ }
358
+ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends CCAPI {
359
+ supportsCommand(cmd) {
360
+ switch (cmd) {
361
+ case ScheduleEntryLockCommand.EnableSet:
362
+ case ScheduleEntryLockCommand.EnableAllSet:
363
+ case ScheduleEntryLockCommand.WeekDayScheduleSet:
364
+ case ScheduleEntryLockCommand.WeekDayScheduleGet:
365
+ case ScheduleEntryLockCommand.YearDayScheduleSet:
366
+ case ScheduleEntryLockCommand.YearDayScheduleGet:
367
+ case ScheduleEntryLockCommand.SupportedGet:
368
+ return true; // V1
369
+ case ScheduleEntryLockCommand.TimeOffsetSet:
370
+ case ScheduleEntryLockCommand.TimeOffsetGet:
371
+ return this.version >= 2;
372
+ case ScheduleEntryLockCommand.DailyRepeatingScheduleSet:
373
+ case ScheduleEntryLockCommand.DailyRepeatingScheduleGet:
374
+ return this.version >= 3;
375
+ }
376
+ return super.supportsCommand(cmd);
377
+ }
378
+ /**
379
+ * Enables or disables schedules. If a user ID is given, that user's
380
+ * schedules will be enabled or disabled. If no user ID is given, all schedules
381
+ * will be affected.
382
+ */
383
+ async setEnabled(enabled, userId) {
384
+ __assertType("enabled", "boolean", __assertType__boolean.bind(void 0, enabled));
385
+ __assertType("userId", "(optional) number", __assertType__optional_number.bind(void 0, userId));
386
+ let result;
387
+ if (userId != undefined) {
388
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableSet);
389
+ const cc = new ScheduleEntryLockCCEnableSet({
390
+ nodeId: this.endpoint.nodeId,
391
+ endpointIndex: this.endpoint.index,
392
+ userId,
393
+ enabled,
394
+ });
395
+ result = await this.host.sendCommand(cc, this.commandOptions);
396
+ }
397
+ else {
398
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableAllSet);
399
+ const cc = new ScheduleEntryLockCCEnableAllSet({
400
+ nodeId: this.endpoint.nodeId,
401
+ endpointIndex: this.endpoint.index,
402
+ enabled,
403
+ });
404
+ result = await this.host.sendCommand(cc, this.commandOptions);
405
+ }
406
+ if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
407
+ // Remember the new state in the cache
408
+ setUserCodeScheduleEnabledCached(this.host, this.endpoint, userId, enabled);
409
+ }
410
+ return result;
411
+ }
412
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
413
+ async getNumSlots() {
414
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.SupportedGet);
415
+ const cc = new ScheduleEntryLockCCSupportedGet({
416
+ nodeId: this.endpoint.nodeId,
417
+ endpointIndex: this.endpoint.index,
418
+ });
419
+ const result = await this.host.sendCommand(cc, this.commandOptions);
420
+ if (result) {
421
+ return pick(result, [
422
+ "numWeekDaySlots",
423
+ "numYearDaySlots",
424
+ "numDailyRepeatingSlots",
425
+ ]);
426
+ }
427
+ }
428
+ async setWeekDaySchedule(slot, schedule) {
429
+ __assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
430
+ __assertType("schedule", "(optional) ScheduleEntryLockWeekDaySchedule", __assertType__optional_ScheduleEntryLockWeekDaySchedule.bind(void 0, schedule));
431
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);
432
+ if (this.isSinglecast()) {
433
+ const numSlots = ScheduleEntryLockCC.getNumWeekDaySlotsCached(this.host, this.endpoint);
434
+ if (slot.slotId < 1 || slot.slotId > numSlots) {
435
+ throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-week slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);
436
+ }
437
+ }
438
+ if (schedule) {
439
+ if (schedule.stopHour < schedule.startHour
440
+ || schedule.stopHour === schedule.startHour
441
+ && schedule.stopMinute <= schedule.startMinute) {
442
+ throw new ZWaveError(`The stop time must be after the start time.`, ZWaveErrorCodes.Argument_Invalid);
443
+ }
444
+ }
445
+ const cc = new ScheduleEntryLockCCWeekDayScheduleSet({
446
+ nodeId: this.endpoint.nodeId,
447
+ endpointIndex: this.endpoint.index,
448
+ ...slot,
449
+ ...(schedule
450
+ ? {
451
+ action: ScheduleEntryLockSetAction.Set,
452
+ ...schedule,
453
+ }
454
+ : {
455
+ action: ScheduleEntryLockSetAction.Erase,
456
+ }),
457
+ });
458
+ const result = await this.host.sendCommand(cc, this.commandOptions);
459
+ if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
460
+ // Editing (but not erasing) a schedule will enable scheduling for that user
461
+ // and switch it to the current scheduling kind
462
+ if (!!schedule) {
463
+ setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
464
+ setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.WeekDay);
465
+ }
466
+ // And cache the schedule
467
+ persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.WeekDay, slot.userId, slot.slotId, schedule ?? false);
468
+ }
469
+ return result;
470
+ }
471
+ async getWeekDaySchedule(slot) {
472
+ __assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
473
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);
474
+ const cc = new ScheduleEntryLockCCWeekDayScheduleGet({
475
+ nodeId: this.endpoint.nodeId,
476
+ endpointIndex: this.endpoint.index,
477
+ ...slot,
478
+ });
479
+ const result = await this.host.sendCommand(cc, this.commandOptions);
480
+ if (result?.weekday != undefined) {
481
+ return {
482
+ weekday: result.weekday,
483
+ startHour: result.startHour,
484
+ startMinute: result.startMinute,
485
+ stopHour: result.stopHour,
486
+ stopMinute: result.stopMinute,
487
+ };
488
+ }
489
+ }
490
+ async setYearDaySchedule(slot, schedule) {
491
+ __assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
492
+ __assertType("schedule", "(optional) ScheduleEntryLockYearDaySchedule", __assertType__optional_ScheduleEntryLockYearDaySchedule.bind(void 0, schedule));
493
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);
494
+ if (this.isSinglecast()) {
495
+ const numSlots = ScheduleEntryLockCC.getNumYearDaySlotsCached(this.host, this.endpoint);
496
+ if (slot.slotId < 1 || slot.slotId > numSlots) {
497
+ throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-year slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);
498
+ }
499
+ }
500
+ if (schedule) {
501
+ const startDate = new Date(schedule.startYear, schedule.startMonth - 1, schedule.startDay, schedule.startHour, schedule.startMinute);
502
+ const stopDate = new Date(schedule.stopYear, schedule.stopMonth - 1, schedule.stopDay, schedule.stopHour, schedule.stopMinute);
503
+ if (stopDate <= startDate) {
504
+ throw new ZWaveError(`The stop date must be after the start date.`, ZWaveErrorCodes.Argument_Invalid);
505
+ }
506
+ }
507
+ const cc = new ScheduleEntryLockCCYearDayScheduleSet({
508
+ nodeId: this.endpoint.nodeId,
509
+ endpointIndex: this.endpoint.index,
510
+ ...slot,
511
+ ...(schedule
512
+ ? {
513
+ action: ScheduleEntryLockSetAction.Set,
514
+ ...schedule,
515
+ }
516
+ : {
517
+ action: ScheduleEntryLockSetAction.Erase,
518
+ }),
519
+ });
520
+ const result = await this.host.sendCommand(cc, this.commandOptions);
521
+ if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
522
+ // Editing (but not erasing) a schedule will enable scheduling for that user
523
+ // and switch it to the current scheduling kind
524
+ if (!!schedule) {
525
+ setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
526
+ setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.YearDay);
527
+ }
528
+ // And cache the schedule
529
+ persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.YearDay, slot.userId, slot.slotId, schedule ?? false);
530
+ }
531
+ return result;
532
+ }
533
+ async getYearDaySchedule(slot) {
534
+ __assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
535
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);
536
+ const cc = new ScheduleEntryLockCCYearDayScheduleGet({
537
+ nodeId: this.endpoint.nodeId,
538
+ endpointIndex: this.endpoint.index,
539
+ ...slot,
540
+ });
541
+ const result = await this.host.sendCommand(cc, this.commandOptions);
542
+ if (result?.startYear != undefined) {
543
+ return {
544
+ startYear: result.startYear,
545
+ startMonth: result.startMonth,
546
+ startDay: result.startDay,
547
+ startHour: result.startHour,
548
+ startMinute: result.startMinute,
549
+ stopYear: result.stopYear,
550
+ stopMonth: result.stopMonth,
551
+ stopDay: result.stopDay,
552
+ stopHour: result.stopHour,
553
+ stopMinute: result.stopMinute,
554
+ };
555
+ }
556
+ }
557
+ async setDailyRepeatingSchedule(slot, schedule) {
558
+ __assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
559
+ __assertType("schedule", "(optional) ScheduleEntryLockDailyRepeatingSchedule", __assertType__optional_ScheduleEntryLockDailyRepeatingSchedule.bind(void 0, schedule));
560
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);
561
+ if (this.isSinglecast()) {
562
+ const numSlots = ScheduleEntryLockCC
563
+ .getNumDailyRepeatingSlotsCached(this.host, this.endpoint);
564
+ if (slot.slotId < 1 || slot.slotId > numSlots) {
565
+ throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported daily repeating slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);
566
+ }
567
+ }
568
+ const cc = new ScheduleEntryLockCCDailyRepeatingScheduleSet({
569
+ nodeId: this.endpoint.nodeId,
570
+ endpointIndex: this.endpoint.index,
571
+ ...slot,
572
+ ...(schedule
573
+ ? {
574
+ action: ScheduleEntryLockSetAction.Set,
575
+ ...schedule,
576
+ }
577
+ : {
578
+ action: ScheduleEntryLockSetAction.Erase,
579
+ }),
580
+ });
581
+ const result = await this.host.sendCommand(cc, this.commandOptions);
582
+ if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {
583
+ // Editing (but not erasing) a schedule will enable scheduling for that user
584
+ // and switch it to the current scheduling kind
585
+ if (!!schedule) {
586
+ setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
587
+ setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.DailyRepeating);
588
+ }
589
+ // And cache the schedule
590
+ persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.DailyRepeating, slot.userId, slot.slotId, schedule ?? false);
591
+ }
592
+ return result;
593
+ }
594
+ async getDailyRepeatingSchedule(slot) {
595
+ __assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
596
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);
597
+ const cc = new ScheduleEntryLockCCDailyRepeatingScheduleGet({
598
+ nodeId: this.endpoint.nodeId,
599
+ endpointIndex: this.endpoint.index,
600
+ ...slot,
601
+ });
602
+ const result = await this.host.sendCommand(cc, this.commandOptions);
603
+ if (result?.weekdays != undefined) {
604
+ return {
605
+ weekdays: result.weekdays,
606
+ startHour: result.startHour,
607
+ startMinute: result.startMinute,
608
+ durationHour: result.durationHour,
609
+ durationMinute: result.durationMinute,
610
+ };
611
+ }
612
+ }
613
+ async getTimezone() {
614
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetGet);
615
+ const cc = new ScheduleEntryLockCCTimeOffsetGet({
616
+ nodeId: this.endpoint.nodeId,
617
+ endpointIndex: this.endpoint.index,
618
+ });
619
+ const result = await this.host.sendCommand(cc, this.commandOptions);
620
+ if (result) {
621
+ return pick(result, ["standardOffset", "dstOffset"]);
622
+ }
623
+ }
624
+ async setTimezone(timezone) {
625
+ __assertType("timezone", "Timezone", __assertType__Timezone.bind(void 0, timezone));
626
+ this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetSet);
627
+ const cc = new ScheduleEntryLockCCTimeOffsetSet({
628
+ nodeId: this.endpoint.nodeId,
629
+ endpointIndex: this.endpoint.index,
630
+ ...timezone,
631
+ });
632
+ return this.host.sendCommand(cc, this.commandOptions);
633
+ }
634
+ };
635
+ ScheduleEntryLockCCAPI = __decorate([
636
+ API(CommandClasses["Schedule Entry Lock"])
637
+ ], ScheduleEntryLockCCAPI);
638
+ export { ScheduleEntryLockCCAPI };
639
+ let ScheduleEntryLockCC = class ScheduleEntryLockCC extends CommandClass {
640
+ async interview(ctx) {
641
+ const node = this.getNode(ctx);
642
+ const endpoint = this.getEndpoint(ctx);
643
+ const api = CCAPI.create(CommandClasses["Schedule Entry Lock"], ctx, endpoint).withOptions({
644
+ priority: MessagePriority.NodeQuery,
645
+ });
646
+ ctx.logNode(node.id, {
647
+ endpoint: this.endpointIndex,
648
+ message: `Interviewing ${this.ccName}...`,
649
+ direction: "none",
650
+ });
651
+ ctx.logNode(node.id, {
652
+ endpoint: this.endpointIndex,
653
+ message: "Querying supported number of schedule slots...",
654
+ direction: "outbound",
655
+ });
656
+ const slotsResp = await api.getNumSlots();
657
+ if (slotsResp) {
658
+ let logMessage = `received supported number of schedule slots:
659
+ day of week: ${slotsResp.numWeekDaySlots}
660
+ day of year: ${slotsResp.numYearDaySlots}`;
661
+ if (slotsResp.numDailyRepeatingSlots != undefined) {
662
+ logMessage += `
663
+ daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
664
+ }
665
+ ctx.logNode(node.id, {
666
+ endpoint: this.endpointIndex,
667
+ message: logMessage,
668
+ direction: "inbound",
669
+ });
670
+ }
671
+ // If the timezone is not configured with the Time CC, do it here
672
+ if (api.supportsCommand(ScheduleEntryLockCommand.TimeOffsetSet)
673
+ && (!endpoint.supportsCC(CommandClasses.Time)
674
+ || endpoint.getCCVersion(CommandClasses.Time) < 2)) {
675
+ ctx.logNode(node.id, {
676
+ endpoint: this.endpointIndex,
677
+ message: "setting timezone information...",
678
+ direction: "outbound",
679
+ });
680
+ // Set the correct timezone on this node
681
+ const timezone = getDSTInfo();
682
+ await api.setTimezone(timezone);
683
+ }
684
+ // Remember that the interview is complete
685
+ this.setInterviewComplete(ctx, true);
686
+ }
687
+ /**
688
+ * Returns the number of supported day-of-week slots.
689
+ * This only works AFTER the interview process
690
+ */
691
+ static getNumWeekDaySlotsCached(ctx, endpoint) {
692
+ return ctx
693
+ .getValueDB(endpoint.nodeId)
694
+ .getValue(ScheduleEntryLockCCValues.numWeekDaySlots.endpoint(endpoint.index)) || 0;
695
+ }
696
+ /**
697
+ * Returns the number of supported day-of-year slots.
698
+ * This only works AFTER the interview process
699
+ */
700
+ static getNumYearDaySlotsCached(ctx, endpoint) {
701
+ return ctx
702
+ .getValueDB(endpoint.nodeId)
703
+ .getValue(ScheduleEntryLockCCValues.numYearDaySlots.endpoint(endpoint.index)) || 0;
704
+ }
705
+ /**
706
+ * Returns the number of supported daily-repeating slots.
707
+ * This only works AFTER the interview process
708
+ */
709
+ static getNumDailyRepeatingSlotsCached(ctx, endpoint) {
710
+ return ctx
711
+ .getValueDB(endpoint.nodeId)
712
+ .getValue(ScheduleEntryLockCCValues.numDailyRepeatingSlots.endpoint(endpoint.index)) || 0;
713
+ }
714
+ /**
715
+ * Returns whether scheduling for a given user ID (most likely) enabled. Since the Schedule Entry Lock CC
716
+ * provides no way to query the enabled state, Z-Wave JS tracks this in its own cache.
717
+ *
718
+ * This only works AFTER the interview process and is likely to be wrong if a device
719
+ * with existing schedules is queried. To be sure, disable scheduling for all users and enable
720
+ * only the desired ones.
721
+ */
722
+ static getUserCodeScheduleEnabledCached(ctx, endpoint, userId) {
723
+ return !!ctx
724
+ .getValueDB(endpoint.nodeId)
725
+ .getValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index));
726
+ }
727
+ /**
728
+ * Returns which scheduling kind is (most likely) enabled for a given user ID . Since the Schedule Entry Lock CC
729
+ * provides no way to query the current state, Z-Wave JS tracks this in its own cache.
730
+ *
731
+ * This only works AFTER the interview process and is likely to be wrong if a device
732
+ * with existing schedules is queried. To be sure, edit a schedule of the desired kind
733
+ * which will automatically switch the user to that scheduling kind.
734
+ */
735
+ static getUserCodeScheduleKindCached(ctx, endpoint, userId) {
736
+ return ctx
737
+ .getValueDB(endpoint.nodeId)
738
+ .getValue(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index));
739
+ }
740
+ /**
741
+ * Returns the assumed state of a schedule. Since the Schedule Entry Lock CC
742
+ * provides no way to query the current state, Z-Wave JS tracks this in its own cache.
743
+ *
744
+ * A return value of `false` means the slot is empty, a return value of `undefined` means the information is not cached yet.
745
+ *
746
+ * This only works AFTER the interview process.
747
+ */
748
+ static getScheduleCached(ctx, endpoint, scheduleKind, userId, slotId) {
749
+ return ctx
750
+ .getValueDB(endpoint.nodeId)
751
+ .getValue(ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId).endpoint(endpoint.index));
752
+ }
753
+ };
754
+ ScheduleEntryLockCC = __decorate([
755
+ commandClass(CommandClasses["Schedule Entry Lock"]),
756
+ implementedVersion(3),
757
+ ccValues(ScheduleEntryLockCCValues)
758
+ ], ScheduleEntryLockCC);
759
+ export { ScheduleEntryLockCC };
760
+ let ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet_1 = class ScheduleEntryLockCCEnableSet extends ScheduleEntryLockCC {
761
+ constructor(options) {
762
+ super(options);
763
+ this.userId = options.userId;
764
+ this.enabled = options.enabled;
765
+ }
766
+ static from(raw, ctx) {
767
+ validatePayload(raw.payload.length >= 2);
768
+ const userId = raw.payload[0];
769
+ const enabled = raw.payload[1] === 0x01;
770
+ return new ScheduleEntryLockCCEnableSet_1({
771
+ nodeId: ctx.sourceNodeId,
772
+ userId,
773
+ enabled,
774
+ });
775
+ }
776
+ userId;
777
+ enabled;
778
+ serialize(ctx) {
779
+ this.payload = Bytes.from([this.userId, this.enabled ? 0x01 : 0x00]);
780
+ return super.serialize(ctx);
781
+ }
782
+ toLogEntry(ctx) {
783
+ return {
784
+ ...super.toLogEntry(ctx),
785
+ message: {
786
+ "user ID": this.userId,
787
+ action: this.enabled ? "enable" : "disable",
788
+ },
789
+ };
790
+ }
791
+ };
792
+ ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet_1 = __decorate([
793
+ CCCommand(ScheduleEntryLockCommand.EnableSet),
794
+ useSupervision()
795
+ ], ScheduleEntryLockCCEnableSet);
796
+ export { ScheduleEntryLockCCEnableSet };
797
+ let ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet_1 = class ScheduleEntryLockCCEnableAllSet extends ScheduleEntryLockCC {
798
+ constructor(options) {
799
+ super(options);
800
+ this.enabled = options.enabled;
801
+ }
802
+ static from(raw, ctx) {
803
+ validatePayload(raw.payload.length >= 1);
804
+ const enabled = raw.payload[0] === 0x01;
805
+ return new ScheduleEntryLockCCEnableAllSet_1({
806
+ nodeId: ctx.sourceNodeId,
807
+ enabled,
808
+ });
809
+ }
810
+ enabled;
811
+ serialize(ctx) {
812
+ this.payload = Bytes.from([this.enabled ? 0x01 : 0x00]);
813
+ return super.serialize(ctx);
814
+ }
815
+ toLogEntry(ctx) {
816
+ return {
817
+ ...super.toLogEntry(ctx),
818
+ message: {
819
+ action: this.enabled ? "enable all" : "disable all",
820
+ },
821
+ };
822
+ }
823
+ };
824
+ ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet_1 = __decorate([
825
+ CCCommand(ScheduleEntryLockCommand.EnableAllSet),
826
+ useSupervision()
827
+ ], ScheduleEntryLockCCEnableAllSet);
828
+ export { ScheduleEntryLockCCEnableAllSet };
829
+ let ScheduleEntryLockCCSupportedReport = ScheduleEntryLockCCSupportedReport_1 = class ScheduleEntryLockCCSupportedReport extends ScheduleEntryLockCC {
830
+ constructor(options) {
831
+ super(options);
832
+ this.numWeekDaySlots = options.numWeekDaySlots;
833
+ this.numYearDaySlots = options.numYearDaySlots;
834
+ this.numDailyRepeatingSlots = options.numDailyRepeatingSlots;
835
+ }
836
+ static from(raw, ctx) {
837
+ validatePayload(raw.payload.length >= 2);
838
+ const numWeekDaySlots = raw.payload[0];
839
+ const numYearDaySlots = raw.payload[1];
840
+ let numDailyRepeatingSlots;
841
+ if (raw.payload.length >= 3) {
842
+ numDailyRepeatingSlots = raw.payload[2];
843
+ }
844
+ return new ScheduleEntryLockCCSupportedReport_1({
845
+ nodeId: ctx.sourceNodeId,
846
+ numWeekDaySlots,
847
+ numYearDaySlots,
848
+ numDailyRepeatingSlots,
849
+ });
850
+ }
851
+ numWeekDaySlots;
852
+ numYearDaySlots;
853
+ numDailyRepeatingSlots;
854
+ serialize(ctx) {
855
+ this.payload = Bytes.from([
856
+ this.numWeekDaySlots,
857
+ this.numYearDaySlots,
858
+ this.numDailyRepeatingSlots ?? 0,
859
+ ]);
860
+ return super.serialize(ctx);
861
+ }
862
+ toLogEntry(ctx) {
863
+ const message = {
864
+ "no. of weekday schedule slots": this.numWeekDaySlots,
865
+ "no. of day-of-year schedule slots": this.numYearDaySlots,
866
+ };
867
+ if (this.numDailyRepeatingSlots != undefined) {
868
+ message["no. of daily repeating schedule slots"] =
869
+ this.numDailyRepeatingSlots;
870
+ }
871
+ return {
872
+ ...super.toLogEntry(ctx),
873
+ message,
874
+ };
875
+ }
876
+ };
877
+ __decorate([
878
+ ccValue(ScheduleEntryLockCCValues.numWeekDaySlots)
879
+ ], ScheduleEntryLockCCSupportedReport.prototype, "numWeekDaySlots", void 0);
880
+ __decorate([
881
+ ccValue(ScheduleEntryLockCCValues.numYearDaySlots)
882
+ ], ScheduleEntryLockCCSupportedReport.prototype, "numYearDaySlots", void 0);
883
+ __decorate([
884
+ ccValue(ScheduleEntryLockCCValues.numDailyRepeatingSlots)
885
+ ], ScheduleEntryLockCCSupportedReport.prototype, "numDailyRepeatingSlots", void 0);
886
+ ScheduleEntryLockCCSupportedReport = ScheduleEntryLockCCSupportedReport_1 = __decorate([
887
+ CCCommand(ScheduleEntryLockCommand.SupportedReport)
888
+ ], ScheduleEntryLockCCSupportedReport);
889
+ export { ScheduleEntryLockCCSupportedReport };
890
+ let ScheduleEntryLockCCSupportedGet = class ScheduleEntryLockCCSupportedGet extends ScheduleEntryLockCC {
891
+ };
892
+ ScheduleEntryLockCCSupportedGet = __decorate([
893
+ CCCommand(ScheduleEntryLockCommand.SupportedGet),
894
+ expectedCCResponse(ScheduleEntryLockCCSupportedReport)
895
+ ], ScheduleEntryLockCCSupportedGet);
896
+ export { ScheduleEntryLockCCSupportedGet };
897
+ let ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet_1 = class ScheduleEntryLockCCWeekDayScheduleSet extends ScheduleEntryLockCC {
898
+ constructor(options) {
899
+ super(options);
900
+ this.userId = options.userId;
901
+ this.slotId = options.slotId;
902
+ this.action = options.action;
903
+ if (options.action === ScheduleEntryLockSetAction.Set) {
904
+ this.weekday = options.weekday;
905
+ this.startHour = options.startHour;
906
+ this.startMinute = options.startMinute;
907
+ this.stopHour = options.stopHour;
908
+ this.stopMinute = options.stopMinute;
909
+ }
910
+ }
911
+ static from(raw, ctx) {
912
+ validatePayload(raw.payload.length >= 3);
913
+ const action = raw.payload[0];
914
+ validatePayload(action === ScheduleEntryLockSetAction.Set
915
+ || action === ScheduleEntryLockSetAction.Erase);
916
+ const userId = raw.payload[1];
917
+ const slotId = raw.payload[2];
918
+ if (action !== ScheduleEntryLockSetAction.Set) {
919
+ return new ScheduleEntryLockCCWeekDayScheduleSet_1({
920
+ nodeId: ctx.sourceNodeId,
921
+ action,
922
+ userId,
923
+ slotId,
924
+ });
925
+ }
926
+ validatePayload(raw.payload.length >= 8);
927
+ const weekday = raw.payload[3];
928
+ const startHour = raw.payload[4];
929
+ const startMinute = raw.payload[5];
930
+ const stopHour = raw.payload[6];
931
+ const stopMinute = raw.payload[7];
932
+ return new ScheduleEntryLockCCWeekDayScheduleSet_1({
933
+ nodeId: ctx.sourceNodeId,
934
+ action,
935
+ userId,
936
+ slotId,
937
+ weekday,
938
+ startHour,
939
+ startMinute,
940
+ stopHour,
941
+ stopMinute,
942
+ });
943
+ }
944
+ userId;
945
+ slotId;
946
+ action;
947
+ weekday;
948
+ startHour;
949
+ startMinute;
950
+ stopHour;
951
+ stopMinute;
952
+ serialize(ctx) {
953
+ this.payload = Bytes.from([
954
+ this.action,
955
+ this.userId,
956
+ this.slotId,
957
+ // The report should have these fields set to 0xff
958
+ // if the slot is erased. The specs don't mention anything
959
+ // for the Set command, so we just assume the same is okay
960
+ this.weekday ?? 0xff,
961
+ this.startHour ?? 0xff,
962
+ this.startMinute ?? 0xff,
963
+ this.stopHour ?? 0xff,
964
+ this.stopMinute ?? 0xff,
965
+ ]);
966
+ return super.serialize(ctx);
967
+ }
968
+ toLogEntry(ctx) {
969
+ let message;
970
+ if (this.action === ScheduleEntryLockSetAction.Erase) {
971
+ message = {
972
+ "user ID": this.userId,
973
+ "slot #": this.slotId,
974
+ action: "erase",
975
+ };
976
+ }
977
+ else {
978
+ message = {
979
+ "user ID": this.userId,
980
+ "slot #": this.slotId,
981
+ action: "set",
982
+ weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday),
983
+ "start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
984
+ "end time": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),
985
+ };
986
+ }
987
+ return {
988
+ ...super.toLogEntry(ctx),
989
+ message,
990
+ };
991
+ }
992
+ };
993
+ ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet_1 = __decorate([
994
+ CCCommand(ScheduleEntryLockCommand.WeekDayScheduleSet),
995
+ useSupervision()
996
+ ], ScheduleEntryLockCCWeekDayScheduleSet);
997
+ export { ScheduleEntryLockCCWeekDayScheduleSet };
998
+ let ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport_1 = class ScheduleEntryLockCCWeekDayScheduleReport extends ScheduleEntryLockCC {
999
+ constructor(options) {
1000
+ super(options);
1001
+ this.userId = options.userId;
1002
+ this.slotId = options.slotId;
1003
+ this.weekday = options.weekday;
1004
+ this.startHour = options.startHour;
1005
+ this.startMinute = options.startMinute;
1006
+ this.stopHour = options.stopHour;
1007
+ this.stopMinute = options.stopMinute;
1008
+ }
1009
+ static from(raw, ctx) {
1010
+ validatePayload(raw.payload.length >= 2);
1011
+ const userId = raw.payload[0];
1012
+ const slotId = raw.payload[1];
1013
+ let ccOptions = {
1014
+ userId,
1015
+ slotId,
1016
+ };
1017
+ let weekday;
1018
+ let startHour;
1019
+ let startMinute;
1020
+ let stopHour;
1021
+ let stopMinute;
1022
+ if (raw.payload.length >= 7) {
1023
+ if (raw.payload[2] !== 0xff) {
1024
+ weekday = raw.payload[2];
1025
+ }
1026
+ if (raw.payload[3] !== 0xff) {
1027
+ startHour = raw.payload[3];
1028
+ }
1029
+ if (raw.payload[4] !== 0xff) {
1030
+ startMinute = raw.payload[4];
1031
+ }
1032
+ if (raw.payload[5] !== 0xff) {
1033
+ stopHour = raw.payload[5];
1034
+ }
1035
+ if (raw.payload[6] !== 0xff) {
1036
+ stopMinute = raw.payload[6];
1037
+ }
1038
+ }
1039
+ if (weekday != undefined
1040
+ && startHour != undefined
1041
+ && startMinute != undefined
1042
+ && stopHour != undefined
1043
+ && stopMinute != undefined) {
1044
+ ccOptions = {
1045
+ ...ccOptions,
1046
+ weekday,
1047
+ startHour,
1048
+ startMinute,
1049
+ stopHour,
1050
+ stopMinute,
1051
+ };
1052
+ }
1053
+ return new ScheduleEntryLockCCWeekDayScheduleReport_1({
1054
+ nodeId: ctx.sourceNodeId,
1055
+ ...ccOptions,
1056
+ });
1057
+ }
1058
+ userId;
1059
+ slotId;
1060
+ weekday;
1061
+ startHour;
1062
+ startMinute;
1063
+ stopHour;
1064
+ stopMinute;
1065
+ persistValues(ctx) {
1066
+ if (!super.persistValues(ctx))
1067
+ return false;
1068
+ persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.WeekDay, this.userId, this.slotId, this.weekday != undefined
1069
+ ? {
1070
+ weekday: this.weekday,
1071
+ startHour: this.startHour,
1072
+ startMinute: this.startMinute,
1073
+ stopHour: this.stopHour,
1074
+ stopMinute: this.stopMinute,
1075
+ }
1076
+ : false);
1077
+ return true;
1078
+ }
1079
+ serialize(ctx) {
1080
+ this.payload = Bytes.from([
1081
+ this.userId,
1082
+ this.slotId,
1083
+ this.weekday ?? 0xff,
1084
+ this.startHour ?? 0xff,
1085
+ this.startMinute ?? 0xff,
1086
+ this.stopHour ?? 0xff,
1087
+ this.stopMinute ?? 0xff,
1088
+ ]);
1089
+ return super.serialize(ctx);
1090
+ }
1091
+ toLogEntry(ctx) {
1092
+ let message;
1093
+ if (this.weekday == undefined) {
1094
+ message = {
1095
+ "user ID": this.userId,
1096
+ "slot #": this.slotId,
1097
+ schedule: "(empty)",
1098
+ };
1099
+ }
1100
+ else {
1101
+ message = {
1102
+ "user ID": this.userId,
1103
+ "slot #": this.slotId,
1104
+ weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday),
1105
+ "start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
1106
+ "end time": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),
1107
+ };
1108
+ }
1109
+ return {
1110
+ ...super.toLogEntry(ctx),
1111
+ message,
1112
+ };
1113
+ }
1114
+ };
1115
+ ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport_1 = __decorate([
1116
+ CCCommand(ScheduleEntryLockCommand.WeekDayScheduleReport)
1117
+ ], ScheduleEntryLockCCWeekDayScheduleReport);
1118
+ export { ScheduleEntryLockCCWeekDayScheduleReport };
1119
+ let ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet_1 = class ScheduleEntryLockCCWeekDayScheduleGet extends ScheduleEntryLockCC {
1120
+ constructor(options) {
1121
+ super(options);
1122
+ this.userId = options.userId;
1123
+ this.slotId = options.slotId;
1124
+ }
1125
+ static from(raw, ctx) {
1126
+ validatePayload(raw.payload.length >= 2);
1127
+ const userId = raw.payload[0];
1128
+ const slotId = raw.payload[1];
1129
+ return new ScheduleEntryLockCCWeekDayScheduleGet_1({
1130
+ nodeId: ctx.sourceNodeId,
1131
+ userId,
1132
+ slotId,
1133
+ });
1134
+ }
1135
+ userId;
1136
+ slotId;
1137
+ serialize(ctx) {
1138
+ this.payload = Bytes.from([this.userId, this.slotId]);
1139
+ return super.serialize(ctx);
1140
+ }
1141
+ toLogEntry(ctx) {
1142
+ return {
1143
+ ...super.toLogEntry(ctx),
1144
+ message: {
1145
+ "user ID": this.userId,
1146
+ "slot #": this.slotId,
1147
+ },
1148
+ };
1149
+ }
1150
+ };
1151
+ ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet_1 = __decorate([
1152
+ CCCommand(ScheduleEntryLockCommand.WeekDayScheduleGet),
1153
+ expectedCCResponse(ScheduleEntryLockCCWeekDayScheduleReport)
1154
+ ], ScheduleEntryLockCCWeekDayScheduleGet);
1155
+ export { ScheduleEntryLockCCWeekDayScheduleGet };
1156
+ let ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet_1 = class ScheduleEntryLockCCYearDayScheduleSet extends ScheduleEntryLockCC {
1157
+ constructor(options) {
1158
+ super(options);
1159
+ this.userId = options.userId;
1160
+ this.slotId = options.slotId;
1161
+ this.action = options.action;
1162
+ if (options.action === ScheduleEntryLockSetAction.Set) {
1163
+ this.startYear = options.startYear;
1164
+ this.startMonth = options.startMonth;
1165
+ this.startDay = options.startDay;
1166
+ this.startHour = options.startHour;
1167
+ this.startMinute = options.startMinute;
1168
+ this.stopYear = options.stopYear;
1169
+ this.stopMonth = options.stopMonth;
1170
+ this.stopDay = options.stopDay;
1171
+ this.stopHour = options.stopHour;
1172
+ this.stopMinute = options.stopMinute;
1173
+ }
1174
+ }
1175
+ static from(raw, ctx) {
1176
+ validatePayload(raw.payload.length >= 3);
1177
+ const action = raw.payload[0];
1178
+ validatePayload(action === ScheduleEntryLockSetAction.Set
1179
+ || action === ScheduleEntryLockSetAction.Erase);
1180
+ const userId = raw.payload[1];
1181
+ const slotId = raw.payload[2];
1182
+ if (action !== ScheduleEntryLockSetAction.Set) {
1183
+ return new ScheduleEntryLockCCYearDayScheduleSet_1({
1184
+ nodeId: ctx.sourceNodeId,
1185
+ action,
1186
+ userId,
1187
+ slotId,
1188
+ });
1189
+ }
1190
+ validatePayload(raw.payload.length >= 13);
1191
+ const startYear = raw.payload[3];
1192
+ const startMonth = raw.payload[4];
1193
+ const startDay = raw.payload[5];
1194
+ const startHour = raw.payload[6];
1195
+ const startMinute = raw.payload[7];
1196
+ const stopYear = raw.payload[8];
1197
+ const stopMonth = raw.payload[9];
1198
+ const stopDay = raw.payload[10];
1199
+ const stopHour = raw.payload[11];
1200
+ const stopMinute = raw.payload[12];
1201
+ return new ScheduleEntryLockCCYearDayScheduleSet_1({
1202
+ nodeId: ctx.sourceNodeId,
1203
+ action,
1204
+ userId,
1205
+ slotId,
1206
+ startYear,
1207
+ startMonth,
1208
+ startDay,
1209
+ startHour,
1210
+ startMinute,
1211
+ stopYear,
1212
+ stopMonth,
1213
+ stopDay,
1214
+ stopHour,
1215
+ stopMinute,
1216
+ });
1217
+ }
1218
+ userId;
1219
+ slotId;
1220
+ action;
1221
+ startYear;
1222
+ startMonth;
1223
+ startDay;
1224
+ startHour;
1225
+ startMinute;
1226
+ stopYear;
1227
+ stopMonth;
1228
+ stopDay;
1229
+ stopHour;
1230
+ stopMinute;
1231
+ serialize(ctx) {
1232
+ this.payload = Bytes.from([
1233
+ this.action,
1234
+ this.userId,
1235
+ this.slotId,
1236
+ // The report should have these fields set to 0xff
1237
+ // if the slot is erased. The specs don't mention anything
1238
+ // for the Set command, so we just assume the same is okay
1239
+ this.startYear ?? 0xff,
1240
+ this.startMonth ?? 0xff,
1241
+ this.startDay ?? 0xff,
1242
+ this.startHour ?? 0xff,
1243
+ this.startMinute ?? 0xff,
1244
+ this.stopYear ?? 0xff,
1245
+ this.stopMonth ?? 0xff,
1246
+ this.stopDay ?? 0xff,
1247
+ this.stopHour ?? 0xff,
1248
+ this.stopMinute ?? 0xff,
1249
+ ]);
1250
+ return super.serialize(ctx);
1251
+ }
1252
+ toLogEntry(ctx) {
1253
+ let message;
1254
+ if (this.action === ScheduleEntryLockSetAction.Erase) {
1255
+ message = {
1256
+ "user ID": this.userId,
1257
+ "slot #": this.slotId,
1258
+ action: "erase",
1259
+ };
1260
+ }
1261
+ else {
1262
+ message = {
1263
+ "user ID": this.userId,
1264
+ "slot #": this.slotId,
1265
+ action: "set",
1266
+ "start date": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,
1267
+ "end date": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,
1268
+ };
1269
+ }
1270
+ return {
1271
+ ...super.toLogEntry(ctx),
1272
+ message,
1273
+ };
1274
+ }
1275
+ };
1276
+ ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet_1 = __decorate([
1277
+ CCCommand(ScheduleEntryLockCommand.YearDayScheduleSet),
1278
+ useSupervision()
1279
+ ], ScheduleEntryLockCCYearDayScheduleSet);
1280
+ export { ScheduleEntryLockCCYearDayScheduleSet };
1281
+ let ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport_1 = class ScheduleEntryLockCCYearDayScheduleReport extends ScheduleEntryLockCC {
1282
+ constructor(options) {
1283
+ super(options);
1284
+ this.userId = options.userId;
1285
+ this.slotId = options.slotId;
1286
+ this.startYear = options.startYear;
1287
+ this.startMonth = options.startMonth;
1288
+ this.startDay = options.startDay;
1289
+ this.startHour = options.startHour;
1290
+ this.startMinute = options.startMinute;
1291
+ this.stopYear = options.stopYear;
1292
+ this.stopMonth = options.stopMonth;
1293
+ this.stopDay = options.stopDay;
1294
+ this.stopHour = options.stopHour;
1295
+ this.stopMinute = options.stopMinute;
1296
+ }
1297
+ static from(raw, ctx) {
1298
+ validatePayload(raw.payload.length >= 2);
1299
+ const userId = raw.payload[0];
1300
+ const slotId = raw.payload[1];
1301
+ let ccOptions = {
1302
+ userId,
1303
+ slotId,
1304
+ };
1305
+ let startYear;
1306
+ let startMonth;
1307
+ let startDay;
1308
+ let startHour;
1309
+ let startMinute;
1310
+ let stopYear;
1311
+ let stopMonth;
1312
+ let stopDay;
1313
+ let stopHour;
1314
+ let stopMinute;
1315
+ if (raw.payload.length >= 12) {
1316
+ if (raw.payload[2] !== 0xff) {
1317
+ startYear = raw.payload[2];
1318
+ }
1319
+ if (raw.payload[3] !== 0xff) {
1320
+ startMonth = raw.payload[3];
1321
+ }
1322
+ if (raw.payload[4] !== 0xff) {
1323
+ startDay = raw.payload[4];
1324
+ }
1325
+ if (raw.payload[5] !== 0xff) {
1326
+ startHour = raw.payload[5];
1327
+ }
1328
+ if (raw.payload[6] !== 0xff) {
1329
+ startMinute = raw.payload[6];
1330
+ }
1331
+ if (raw.payload[7] !== 0xff) {
1332
+ stopYear = raw.payload[7];
1333
+ }
1334
+ if (raw.payload[8] !== 0xff) {
1335
+ stopMonth = raw.payload[8];
1336
+ }
1337
+ if (raw.payload[9] !== 0xff) {
1338
+ stopDay = raw.payload[9];
1339
+ }
1340
+ if (raw.payload[10] !== 0xff) {
1341
+ stopHour = raw.payload[10];
1342
+ }
1343
+ if (raw.payload[11] !== 0xff) {
1344
+ stopMinute = raw.payload[11];
1345
+ }
1346
+ }
1347
+ if (startYear != undefined
1348
+ && startMonth != undefined
1349
+ && startDay != undefined
1350
+ && startHour != undefined
1351
+ && startMinute != undefined
1352
+ && stopYear != undefined
1353
+ && stopMonth != undefined
1354
+ && stopDay != undefined
1355
+ && stopHour != undefined
1356
+ && stopMinute != undefined) {
1357
+ ccOptions = {
1358
+ ...ccOptions,
1359
+ startYear,
1360
+ startMonth,
1361
+ startDay,
1362
+ startHour,
1363
+ startMinute,
1364
+ stopYear,
1365
+ stopMonth,
1366
+ stopDay,
1367
+ stopHour,
1368
+ stopMinute,
1369
+ };
1370
+ }
1371
+ return new ScheduleEntryLockCCYearDayScheduleReport_1({
1372
+ nodeId: ctx.sourceNodeId,
1373
+ ...ccOptions,
1374
+ });
1375
+ }
1376
+ userId;
1377
+ slotId;
1378
+ startYear;
1379
+ startMonth;
1380
+ startDay;
1381
+ startHour;
1382
+ startMinute;
1383
+ stopYear;
1384
+ stopMonth;
1385
+ stopDay;
1386
+ stopHour;
1387
+ stopMinute;
1388
+ persistValues(ctx) {
1389
+ if (!super.persistValues(ctx))
1390
+ return false;
1391
+ persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.YearDay, this.userId, this.slotId, this.startYear != undefined
1392
+ ? {
1393
+ startYear: this.startYear,
1394
+ startMonth: this.startMonth,
1395
+ startDay: this.startDay,
1396
+ startHour: this.startHour,
1397
+ startMinute: this.startMinute,
1398
+ stopYear: this.stopYear,
1399
+ stopMonth: this.stopMonth,
1400
+ stopDay: this.stopDay,
1401
+ stopHour: this.stopHour,
1402
+ stopMinute: this.stopMinute,
1403
+ }
1404
+ : false);
1405
+ return true;
1406
+ }
1407
+ serialize(ctx) {
1408
+ this.payload = Bytes.from([
1409
+ this.userId,
1410
+ this.slotId,
1411
+ this.startYear ?? 0xff,
1412
+ this.startMonth ?? 0xff,
1413
+ this.startDay ?? 0xff,
1414
+ this.startHour ?? 0xff,
1415
+ this.startMinute ?? 0xff,
1416
+ this.stopYear ?? 0xff,
1417
+ this.stopMonth ?? 0xff,
1418
+ this.stopDay ?? 0xff,
1419
+ this.stopHour ?? 0xff,
1420
+ this.stopMinute ?? 0xff,
1421
+ ]);
1422
+ return super.serialize(ctx);
1423
+ }
1424
+ toLogEntry(ctx) {
1425
+ let message;
1426
+ if (this.startYear !== undefined) {
1427
+ message = {
1428
+ "user ID": this.userId,
1429
+ "slot #": this.slotId,
1430
+ schedule: "(empty)",
1431
+ };
1432
+ }
1433
+ else {
1434
+ message = {
1435
+ "user ID": this.userId,
1436
+ "slot #": this.slotId,
1437
+ action: "set",
1438
+ "start date": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,
1439
+ "end date": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,
1440
+ };
1441
+ }
1442
+ return {
1443
+ ...super.toLogEntry(ctx),
1444
+ message,
1445
+ };
1446
+ }
1447
+ };
1448
+ ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport_1 = __decorate([
1449
+ CCCommand(ScheduleEntryLockCommand.YearDayScheduleReport)
1450
+ ], ScheduleEntryLockCCYearDayScheduleReport);
1451
+ export { ScheduleEntryLockCCYearDayScheduleReport };
1452
+ let ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet_1 = class ScheduleEntryLockCCYearDayScheduleGet extends ScheduleEntryLockCC {
1453
+ constructor(options) {
1454
+ super(options);
1455
+ this.userId = options.userId;
1456
+ this.slotId = options.slotId;
1457
+ }
1458
+ static from(raw, ctx) {
1459
+ validatePayload(raw.payload.length >= 2);
1460
+ const userId = raw.payload[0];
1461
+ const slotId = raw.payload[1];
1462
+ return new ScheduleEntryLockCCYearDayScheduleGet_1({
1463
+ nodeId: ctx.sourceNodeId,
1464
+ userId,
1465
+ slotId,
1466
+ });
1467
+ }
1468
+ userId;
1469
+ slotId;
1470
+ serialize(ctx) {
1471
+ this.payload = Bytes.from([this.userId, this.slotId]);
1472
+ return super.serialize(ctx);
1473
+ }
1474
+ toLogEntry(ctx) {
1475
+ return {
1476
+ ...super.toLogEntry(ctx),
1477
+ message: {
1478
+ "user ID": this.userId,
1479
+ "slot #": this.slotId,
1480
+ },
1481
+ };
1482
+ }
1483
+ };
1484
+ ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet_1 = __decorate([
1485
+ CCCommand(ScheduleEntryLockCommand.YearDayScheduleGet),
1486
+ expectedCCResponse(ScheduleEntryLockCCYearDayScheduleReport)
1487
+ ], ScheduleEntryLockCCYearDayScheduleGet);
1488
+ export { ScheduleEntryLockCCYearDayScheduleGet };
1489
+ let ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet_1 = class ScheduleEntryLockCCTimeOffsetSet extends ScheduleEntryLockCC {
1490
+ constructor(options) {
1491
+ super(options);
1492
+ this.standardOffset = options.standardOffset;
1493
+ this.dstOffset = options.dstOffset;
1494
+ }
1495
+ static from(raw, ctx) {
1496
+ const { standardOffset, dstOffset } = parseTimezone(raw.payload);
1497
+ return new ScheduleEntryLockCCTimeOffsetSet_1({
1498
+ nodeId: ctx.sourceNodeId,
1499
+ standardOffset,
1500
+ dstOffset,
1501
+ });
1502
+ }
1503
+ standardOffset;
1504
+ dstOffset;
1505
+ serialize(ctx) {
1506
+ this.payload = encodeTimezone({
1507
+ standardOffset: this.standardOffset,
1508
+ dstOffset: this.dstOffset,
1509
+ });
1510
+ return super.serialize(ctx);
1511
+ }
1512
+ toLogEntry(ctx) {
1513
+ return {
1514
+ ...super.toLogEntry(ctx),
1515
+ message: {
1516
+ "standard time offset": `${this.standardOffset} minutes`,
1517
+ "DST offset": `${this.dstOffset} minutes`,
1518
+ },
1519
+ };
1520
+ }
1521
+ };
1522
+ ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet_1 = __decorate([
1523
+ CCCommand(ScheduleEntryLockCommand.TimeOffsetSet),
1524
+ useSupervision()
1525
+ ], ScheduleEntryLockCCTimeOffsetSet);
1526
+ export { ScheduleEntryLockCCTimeOffsetSet };
1527
+ let ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport_1 = class ScheduleEntryLockCCTimeOffsetReport extends ScheduleEntryLockCC {
1528
+ constructor(options) {
1529
+ super(options);
1530
+ this.standardOffset = options.standardOffset;
1531
+ this.dstOffset = options.dstOffset;
1532
+ }
1533
+ static from(raw, ctx) {
1534
+ const { standardOffset, dstOffset } = parseTimezone(raw.payload);
1535
+ return new ScheduleEntryLockCCTimeOffsetReport_1({
1536
+ nodeId: ctx.sourceNodeId,
1537
+ standardOffset,
1538
+ dstOffset,
1539
+ });
1540
+ }
1541
+ standardOffset;
1542
+ dstOffset;
1543
+ serialize(ctx) {
1544
+ this.payload = encodeTimezone({
1545
+ standardOffset: this.standardOffset,
1546
+ dstOffset: this.dstOffset,
1547
+ });
1548
+ return super.serialize(ctx);
1549
+ }
1550
+ toLogEntry(ctx) {
1551
+ return {
1552
+ ...super.toLogEntry(ctx),
1553
+ message: {
1554
+ "standard time offset": `${this.standardOffset} minutes`,
1555
+ "DST offset": `${this.dstOffset} minutes`,
1556
+ },
1557
+ };
1558
+ }
1559
+ };
1560
+ ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport_1 = __decorate([
1561
+ CCCommand(ScheduleEntryLockCommand.TimeOffsetReport)
1562
+ ], ScheduleEntryLockCCTimeOffsetReport);
1563
+ export { ScheduleEntryLockCCTimeOffsetReport };
1564
+ let ScheduleEntryLockCCTimeOffsetGet = class ScheduleEntryLockCCTimeOffsetGet extends ScheduleEntryLockCC {
1565
+ };
1566
+ ScheduleEntryLockCCTimeOffsetGet = __decorate([
1567
+ CCCommand(ScheduleEntryLockCommand.TimeOffsetGet),
1568
+ expectedCCResponse(ScheduleEntryLockCCTimeOffsetReport)
1569
+ ], ScheduleEntryLockCCTimeOffsetGet);
1570
+ export { ScheduleEntryLockCCTimeOffsetGet };
1571
+ let ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet_1 = class ScheduleEntryLockCCDailyRepeatingScheduleSet extends ScheduleEntryLockCC {
1572
+ constructor(options) {
1573
+ super(options);
1574
+ this.userId = options.userId;
1575
+ this.slotId = options.slotId;
1576
+ this.action = options.action;
1577
+ if (options.action === ScheduleEntryLockSetAction.Set) {
1578
+ this.weekdays = options.weekdays;
1579
+ this.startHour = options.startHour;
1580
+ this.startMinute = options.startMinute;
1581
+ this.durationHour = options.durationHour;
1582
+ this.durationMinute = options.durationMinute;
1583
+ }
1584
+ }
1585
+ static from(raw, ctx) {
1586
+ validatePayload(raw.payload.length >= 3);
1587
+ const action = raw.payload[0];
1588
+ validatePayload(action === ScheduleEntryLockSetAction.Set
1589
+ || action === ScheduleEntryLockSetAction.Erase);
1590
+ const userId = raw.payload[1];
1591
+ const slotId = raw.payload[2];
1592
+ if (action !== ScheduleEntryLockSetAction.Set) {
1593
+ return new ScheduleEntryLockCCDailyRepeatingScheduleSet_1({
1594
+ nodeId: ctx.sourceNodeId,
1595
+ action,
1596
+ userId,
1597
+ slotId,
1598
+ });
1599
+ }
1600
+ validatePayload(raw.payload.length >= 8);
1601
+ const weekdays = parseBitMask(raw.payload.subarray(3, 4), ScheduleEntryLockWeekday.Sunday);
1602
+ const startHour = raw.payload[4];
1603
+ const startMinute = raw.payload[5];
1604
+ const durationHour = raw.payload[6];
1605
+ const durationMinute = raw.payload[7];
1606
+ return new ScheduleEntryLockCCDailyRepeatingScheduleSet_1({
1607
+ nodeId: ctx.sourceNodeId,
1608
+ action,
1609
+ userId,
1610
+ slotId,
1611
+ weekdays,
1612
+ startHour,
1613
+ startMinute,
1614
+ durationHour,
1615
+ durationMinute,
1616
+ });
1617
+ }
1618
+ userId;
1619
+ slotId;
1620
+ action;
1621
+ weekdays;
1622
+ startHour;
1623
+ startMinute;
1624
+ durationHour;
1625
+ durationMinute;
1626
+ serialize(ctx) {
1627
+ this.payload = Bytes.from([this.action, this.userId, this.slotId]);
1628
+ if (this.action === ScheduleEntryLockSetAction.Set) {
1629
+ this.payload = Bytes.concat([
1630
+ this.payload,
1631
+ encodeBitMask(this.weekdays, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),
1632
+ Bytes.from([
1633
+ this.startHour,
1634
+ this.startMinute,
1635
+ this.durationHour,
1636
+ this.durationMinute,
1637
+ ]),
1638
+ ]);
1639
+ }
1640
+ else {
1641
+ // Not sure if this is correct
1642
+ this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0xff)]);
1643
+ }
1644
+ return super.serialize(ctx);
1645
+ }
1646
+ toLogEntry(ctx) {
1647
+ let message;
1648
+ if (this.action === ScheduleEntryLockSetAction.Erase) {
1649
+ message = {
1650
+ "user ID": this.userId,
1651
+ "slot #": this.slotId,
1652
+ action: "erase",
1653
+ };
1654
+ }
1655
+ else {
1656
+ message = {
1657
+ "user ID": this.userId,
1658
+ "slot #": this.slotId,
1659
+ action: "set",
1660
+ weekdays: this.weekdays.map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w)).join(", "),
1661
+ "start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
1662
+ duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),
1663
+ };
1664
+ }
1665
+ return {
1666
+ ...super.toLogEntry(ctx),
1667
+ message,
1668
+ };
1669
+ }
1670
+ };
1671
+ ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet_1 = __decorate([
1672
+ CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleSet),
1673
+ useSupervision()
1674
+ ], ScheduleEntryLockCCDailyRepeatingScheduleSet);
1675
+ export { ScheduleEntryLockCCDailyRepeatingScheduleSet };
1676
+ let ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport_1 = class ScheduleEntryLockCCDailyRepeatingScheduleReport extends ScheduleEntryLockCC {
1677
+ constructor(options) {
1678
+ super(options);
1679
+ this.userId = options.userId;
1680
+ this.slotId = options.slotId;
1681
+ this.weekdays = options.weekdays;
1682
+ this.startHour = options.startHour;
1683
+ this.startMinute = options.startMinute;
1684
+ this.durationHour = options.durationHour;
1685
+ this.durationMinute = options.durationMinute;
1686
+ }
1687
+ static from(raw, ctx) {
1688
+ validatePayload(raw.payload.length >= 2);
1689
+ const userId = raw.payload[0];
1690
+ const slotId = raw.payload[1];
1691
+ if (raw.payload.length >= 7 && raw.payload[2] !== 0) {
1692
+ // Only parse the schedule if it is present and some weekday is selected
1693
+ const weekdays = parseBitMask(raw.payload.subarray(2, 3), ScheduleEntryLockWeekday.Sunday);
1694
+ const startHour = raw.payload[3];
1695
+ const startMinute = raw.payload[4];
1696
+ const durationHour = raw.payload[5];
1697
+ const durationMinute = raw.payload[6];
1698
+ return new ScheduleEntryLockCCDailyRepeatingScheduleReport_1({
1699
+ nodeId: ctx.sourceNodeId,
1700
+ userId,
1701
+ slotId,
1702
+ weekdays,
1703
+ startHour,
1704
+ startMinute,
1705
+ durationHour,
1706
+ durationMinute,
1707
+ });
1708
+ }
1709
+ else {
1710
+ return new ScheduleEntryLockCCDailyRepeatingScheduleReport_1({
1711
+ nodeId: ctx.sourceNodeId,
1712
+ userId,
1713
+ slotId,
1714
+ });
1715
+ }
1716
+ }
1717
+ userId;
1718
+ slotId;
1719
+ weekdays;
1720
+ startHour;
1721
+ startMinute;
1722
+ durationHour;
1723
+ durationMinute;
1724
+ persistValues(ctx) {
1725
+ if (!super.persistValues(ctx))
1726
+ return false;
1727
+ persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.DailyRepeating, this.userId, this.slotId, this.weekdays?.length
1728
+ ? {
1729
+ weekdays: this.weekdays,
1730
+ startHour: this.startHour,
1731
+ startMinute: this.startMinute,
1732
+ durationHour: this.durationHour,
1733
+ durationMinute: this.durationMinute,
1734
+ }
1735
+ : false);
1736
+ return true;
1737
+ }
1738
+ serialize(ctx) {
1739
+ this.payload = Bytes.from([this.userId, this.slotId]);
1740
+ if (this.weekdays) {
1741
+ this.payload = Bytes.concat([
1742
+ this.payload,
1743
+ encodeBitMask(this.weekdays, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),
1744
+ Bytes.from([
1745
+ this.startHour,
1746
+ this.startMinute,
1747
+ this.durationHour,
1748
+ this.durationMinute,
1749
+ ]),
1750
+ ]);
1751
+ }
1752
+ else {
1753
+ // Not sure if this is correct, but at least we won't parse it incorrectly ourselves when setting everything to 0
1754
+ this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0)]);
1755
+ }
1756
+ return super.serialize(ctx);
1757
+ }
1758
+ toLogEntry(ctx) {
1759
+ let message;
1760
+ if (!this.weekdays) {
1761
+ message = {
1762
+ "user ID": this.userId,
1763
+ "slot #": this.slotId,
1764
+ schedule: "(empty)",
1765
+ };
1766
+ }
1767
+ else {
1768
+ message = {
1769
+ "user ID": this.userId,
1770
+ "slot #": this.slotId,
1771
+ action: "set",
1772
+ weekdays: this.weekdays
1773
+ .map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w))
1774
+ .join(", "),
1775
+ "start time": formatTime(this.startHour ?? 0, this.startMinute ?? 0),
1776
+ duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),
1777
+ };
1778
+ }
1779
+ return {
1780
+ ...super.toLogEntry(ctx),
1781
+ message,
1782
+ };
1783
+ }
1784
+ };
1785
+ ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport_1 = __decorate([
1786
+ CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleReport)
1787
+ ], ScheduleEntryLockCCDailyRepeatingScheduleReport);
1788
+ export { ScheduleEntryLockCCDailyRepeatingScheduleReport };
1789
+ let ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet_1 = class ScheduleEntryLockCCDailyRepeatingScheduleGet extends ScheduleEntryLockCC {
1790
+ constructor(options) {
1791
+ super(options);
1792
+ this.userId = options.userId;
1793
+ this.slotId = options.slotId;
1794
+ }
1795
+ static from(raw, ctx) {
1796
+ validatePayload(raw.payload.length >= 2);
1797
+ const userId = raw.payload[0];
1798
+ const slotId = raw.payload[1];
1799
+ return new ScheduleEntryLockCCDailyRepeatingScheduleGet_1({
1800
+ nodeId: ctx.sourceNodeId,
1801
+ userId,
1802
+ slotId,
1803
+ });
1804
+ }
1805
+ userId;
1806
+ slotId;
1807
+ serialize(ctx) {
1808
+ this.payload = Bytes.from([this.userId, this.slotId]);
1809
+ return super.serialize(ctx);
1810
+ }
1811
+ toLogEntry(ctx) {
1812
+ return {
1813
+ ...super.toLogEntry(ctx),
1814
+ message: {
1815
+ "user ID": this.userId,
1816
+ "slot #": this.slotId,
1817
+ },
1818
+ };
1819
+ }
1820
+ };
1821
+ ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet_1 = __decorate([
1822
+ CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleGet),
1823
+ expectedCCResponse(ScheduleEntryLockCCDailyRepeatingScheduleReport)
1824
+ ], ScheduleEntryLockCCDailyRepeatingScheduleGet);
1825
+ export { ScheduleEntryLockCCDailyRepeatingScheduleGet };
1826
+ //# sourceMappingURL=ScheduleEntryLockCC.js.map