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