@zwave-js/cc 15.27.1 → 15.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  2. package/build/cjs/cc/AssociationCC.js +6 -5
  3. package/build/cjs/cc/AssociationCC.js.map +2 -2
  4. package/build/cjs/cc/AssociationGroupInfoCC.js +5 -5
  5. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  6. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  7. package/build/cjs/cc/BasicCC.d.ts +4 -1
  8. package/build/cjs/cc/BasicCC.js +18 -0
  9. package/build/cjs/cc/BasicCC.js.map +3 -3
  10. package/build/cjs/cc/BasicWindowCoveringCC.js.map +2 -2
  11. package/build/cjs/cc/BatteryCC.js +18 -4
  12. package/build/cjs/cc/BatteryCC.js.map +2 -2
  13. package/build/cjs/cc/BinarySensorCC.js +5 -1
  14. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  15. package/build/cjs/cc/BinarySwitchCC.d.ts +4 -1
  16. package/build/cjs/cc/BinarySwitchCC.js +18 -0
  17. package/build/cjs/cc/BinarySwitchCC.js.map +3 -3
  18. package/build/cjs/cc/CRC16CC.d.ts +3 -2
  19. package/build/cjs/cc/CRC16CC.js +7 -1
  20. package/build/cjs/cc/CRC16CC.js.map +3 -3
  21. package/build/cjs/cc/CentralSceneCC.js.map +2 -2
  22. package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
  23. package/build/cjs/cc/ClockCC.js.map +2 -2
  24. package/build/cjs/cc/ColorSwitchCC.js +1 -4
  25. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  26. package/build/cjs/cc/ConfigurationCC.js +16 -8
  27. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  28. package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
  29. package/build/cjs/cc/DoorLockCC.js +1 -1
  30. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  31. package/build/cjs/cc/EntryControlCC.js.map +2 -2
  32. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +4 -16
  33. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
  34. package/build/cjs/cc/HumidityControlSetpointCC.js +10 -4
  35. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  36. package/build/cjs/cc/IndicatorCC.js +5 -8
  37. package/build/cjs/cc/IndicatorCC.js.map +2 -2
  38. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  39. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  40. package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.d.ts +1 -0
  41. package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.js +13 -0
  42. package/build/cjs/cc/ManufacturerSpecificCC._validateArgs.js.map +2 -2
  43. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +6 -4
  44. package/build/cjs/cc/ManufacturerSpecificCC.js +41 -8
  45. package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
  46. package/build/cjs/cc/MeterCC.js +18 -29
  47. package/build/cjs/cc/MeterCC.js.map +2 -2
  48. package/build/cjs/cc/MultiChannelAssociationCC.js +11 -7
  49. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  50. package/build/cjs/cc/MultiChannelCC.d.ts +3 -1
  51. package/build/cjs/cc/MultiChannelCC.js +21 -10
  52. package/build/cjs/cc/MultiChannelCC.js.map +3 -3
  53. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  54. package/build/cjs/cc/MultilevelSwitchCC.d.ts +5 -1
  55. package/build/cjs/cc/MultilevelSwitchCC.js +30 -0
  56. package/build/cjs/cc/MultilevelSwitchCC.js.map +3 -3
  57. package/build/cjs/cc/NotificationCC.js +29 -11
  58. package/build/cjs/cc/NotificationCC.js.map +2 -2
  59. package/build/cjs/cc/PowerlevelCC.js.map +1 -1
  60. package/build/cjs/cc/ProtectionCC.js +2 -0
  61. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  62. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
  63. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
  64. package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
  65. package/build/cjs/cc/Security2CC.d.ts +2 -1
  66. package/build/cjs/cc/Security2CC.js +31 -3
  67. package/build/cjs/cc/Security2CC.js.map +2 -2
  68. package/build/cjs/cc/SecurityCC.d.ts +3 -2
  69. package/build/cjs/cc/SecurityCC.js +7 -6
  70. package/build/cjs/cc/SecurityCC.js.map +2 -2
  71. package/build/cjs/cc/SoundSwitchCC.js +6 -6
  72. package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
  73. package/build/cjs/cc/SupervisionCC.d.ts +2 -1
  74. package/build/cjs/cc/SupervisionCC.js +6 -0
  75. package/build/cjs/cc/SupervisionCC.js.map +3 -3
  76. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  77. package/build/cjs/cc/ThermostatModeCC.js +1 -3
  78. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  79. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  80. package/build/cjs/cc/ThermostatSetpointCC.d.ts +4 -1
  81. package/build/cjs/cc/ThermostatSetpointCC.js +18 -0
  82. package/build/cjs/cc/ThermostatSetpointCC.js.map +3 -3
  83. package/build/cjs/cc/TimeCC.js.map +2 -2
  84. package/build/cjs/cc/TransportServiceCC.js.map +2 -2
  85. package/build/cjs/cc/UserCodeCC.js +3 -6
  86. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  87. package/build/cjs/cc/UserCredentialCC.js +8 -6
  88. package/build/cjs/cc/UserCredentialCC.js.map +2 -2
  89. package/build/cjs/cc/VersionCC.js.map +2 -2
  90. package/build/cjs/cc/WindowCoveringCC.js +5 -1
  91. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  92. package/build/cjs/cc/ZWaveProtocolCC.js +3 -11
  93. package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
  94. package/build/cjs/cc/_CCValues.generated.d.ts +4 -4
  95. package/build/cjs/cc/_CCValues.generated.js +1 -1
  96. package/build/cjs/cc/_CCValues.generated.js.map +2 -2
  97. package/build/cjs/cc/index.d.ts +179 -179
  98. package/build/cjs/cc/index.js.map +1 -1
  99. package/build/cjs/cc/manufacturerProprietary/Decorators.js.map +2 -2
  100. package/build/cjs/lib/API.d.ts +3 -2
  101. package/build/cjs/lib/API.js.map +2 -2
  102. package/build/cjs/lib/CommandClass.d.ts +23 -1
  103. package/build/cjs/lib/CommandClass.js +63 -15
  104. package/build/cjs/lib/CommandClass.js.map +3 -3
  105. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  106. package/build/cjs/lib/EncapsulatingCommandClass.js.map +2 -2
  107. package/build/cjs/lib/NotificationEventPayload.js.map +2 -2
  108. package/build/cjs/lib/Security2/Extension.js +1 -4
  109. package/build/cjs/lib/Security2/Extension.js.map +2 -2
  110. package/build/cjs/lib/Security2/shared.js.map +2 -2
  111. package/build/cjs/lib/SetValueResult.js.map +1 -1
  112. package/build/cjs/lib/Values.d.ts +1 -1
  113. package/build/cjs/lib/Values.js.map +2 -2
  114. package/build/cjs/lib/_CCAPI.generated.js.map +1 -1
  115. package/build/cjs/lib/_Types.d.ts +34 -30
  116. package/build/cjs/lib/_Types.js +7 -0
  117. package/build/cjs/lib/_Types.js.map +3 -3
  118. package/build/cjs/lib/serializers.js +1 -4
  119. package/build/cjs/lib/serializers.js.map +2 -2
  120. package/build/cjs/lib/utils.js.map +2 -2
  121. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  122. package/build/esm/cc/AlarmSensorCC.js +1 -2
  123. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  124. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  125. package/build/esm/cc/AssociationCC.js +8 -7
  126. package/build/esm/cc/AssociationCC.js.map +1 -1
  127. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  128. package/build/esm/cc/AssociationGroupInfoCC.js +11 -12
  129. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  130. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  131. package/build/esm/cc/BarrierOperatorCC.js +10 -9
  132. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  133. package/build/esm/cc/BasicCC.d.ts +4 -1
  134. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  135. package/build/esm/cc/BasicCC.js +30 -7
  136. package/build/esm/cc/BasicCC.js.map +1 -1
  137. package/build/esm/cc/BasicWindowCoveringCC.d.ts.map +1 -1
  138. package/build/esm/cc/BasicWindowCoveringCC.js +2 -5
  139. package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
  140. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  141. package/build/esm/cc/BatteryCC.js +17 -14
  142. package/build/esm/cc/BatteryCC.js.map +1 -1
  143. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  144. package/build/esm/cc/BinarySensorCC.js +12 -7
  145. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  146. package/build/esm/cc/BinarySwitchCC.d.ts +4 -1
  147. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  148. package/build/esm/cc/BinarySwitchCC.js +31 -6
  149. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  150. package/build/esm/cc/CRC16CC.d.ts +3 -2
  151. package/build/esm/cc/CRC16CC.d.ts.map +1 -1
  152. package/build/esm/cc/CRC16CC.js +10 -4
  153. package/build/esm/cc/CRC16CC.js.map +1 -1
  154. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  155. package/build/esm/cc/CentralSceneCC.js +2 -1
  156. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  157. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  158. package/build/esm/cc/ClimateControlScheduleCC.js +6 -2
  159. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  160. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  161. package/build/esm/cc/ClockCC.js +6 -2
  162. package/build/esm/cc/ClockCC.js.map +1 -1
  163. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  164. package/build/esm/cc/ColorSwitchCC.js +17 -20
  165. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  166. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  167. package/build/esm/cc/ConfigurationCC.js +37 -33
  168. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  169. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  170. package/build/esm/cc/DeviceResetLocallyCC.js +1 -2
  171. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  172. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  173. package/build/esm/cc/DoorLockCC.js +26 -30
  174. package/build/esm/cc/DoorLockCC.js.map +1 -1
  175. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  176. package/build/esm/cc/EntryControlCC.js +10 -7
  177. package/build/esm/cc/EntryControlCC.js.map +1 -1
  178. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  179. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +15 -27
  180. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  181. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  182. package/build/esm/cc/HumidityControlSetpointCC.js +8 -9
  183. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  184. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  185. package/build/esm/cc/IndicatorCC.js +27 -42
  186. package/build/esm/cc/IndicatorCC.js.map +1 -1
  187. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  188. package/build/esm/cc/IrrigationCC.js +8 -6
  189. package/build/esm/cc/IrrigationCC.js.map +1 -1
  190. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  191. package/build/esm/cc/ManufacturerProprietaryCC.js +1 -2
  192. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  193. package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts +1 -0
  194. package/build/esm/cc/ManufacturerSpecificCC._validateArgs.d.ts.map +1 -1
  195. package/build/esm/cc/ManufacturerSpecificCC._validateArgs.js +10 -0
  196. package/build/esm/cc/ManufacturerSpecificCC._validateArgs.js.map +1 -1
  197. package/build/esm/cc/ManufacturerSpecificCC.d.ts +6 -4
  198. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  199. package/build/esm/cc/ManufacturerSpecificCC.js +54 -17
  200. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  201. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  202. package/build/esm/cc/MeterCC.js +28 -38
  203. package/build/esm/cc/MeterCC.js.map +1 -1
  204. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  205. package/build/esm/cc/MultiChannelAssociationCC.js +15 -20
  206. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  207. package/build/esm/cc/MultiChannelCC.d.ts +3 -1
  208. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  209. package/build/esm/cc/MultiChannelCC.js +28 -22
  210. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  211. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  212. package/build/esm/cc/MultilevelSensorCC.js +11 -11
  213. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  214. package/build/esm/cc/MultilevelSwitchCC.d.ts +5 -1
  215. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  216. package/build/esm/cc/MultilevelSwitchCC.js +56 -16
  217. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  218. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  219. package/build/esm/cc/NotificationCC.js +66 -55
  220. package/build/esm/cc/NotificationCC.js.map +1 -1
  221. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
  222. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  223. package/build/esm/cc/ProtectionCC.js +13 -9
  224. package/build/esm/cc/ProtectionCC.js.map +1 -1
  225. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  226. package/build/esm/cc/SceneActuatorConfigurationCC.js +5 -8
  227. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  228. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  229. package/build/esm/cc/SceneControllerConfigurationCC.js +10 -16
  230. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  231. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  232. package/build/esm/cc/ScheduleEntryLockCC.js +13 -20
  233. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  234. package/build/esm/cc/Security2CC.d.ts +2 -1
  235. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  236. package/build/esm/cc/Security2CC.js +68 -32
  237. package/build/esm/cc/Security2CC.js.map +1 -1
  238. package/build/esm/cc/SecurityCC.d.ts +3 -2
  239. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  240. package/build/esm/cc/SecurityCC.js +16 -11
  241. package/build/esm/cc/SecurityCC.js.map +1 -1
  242. package/build/esm/cc/SoundSwitchCC.js +2 -2
  243. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  244. package/build/esm/cc/SupervisionCC.d.ts +2 -1
  245. package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
  246. package/build/esm/cc/SupervisionCC.js +13 -6
  247. package/build/esm/cc/SupervisionCC.js.map +1 -1
  248. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  249. package/build/esm/cc/ThermostatFanModeCC.js +1 -2
  250. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  251. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  252. package/build/esm/cc/ThermostatModeCC.js +1 -3
  253. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  254. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  255. package/build/esm/cc/ThermostatOperatingStateCC.js +1 -2
  256. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  257. package/build/esm/cc/ThermostatSetpointCC.d.ts +4 -1
  258. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  259. package/build/esm/cc/ThermostatSetpointCC.js +31 -19
  260. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  261. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  262. package/build/esm/cc/TimeCC.js +6 -2
  263. package/build/esm/cc/TimeCC.js.map +1 -1
  264. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  265. package/build/esm/cc/TransportServiceCC.js +8 -8
  266. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  267. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  268. package/build/esm/cc/UserCodeCC.js +23 -30
  269. package/build/esm/cc/UserCodeCC.js.map +1 -1
  270. package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
  271. package/build/esm/cc/UserCredentialCC.js +49 -60
  272. package/build/esm/cc/UserCredentialCC.js.map +1 -1
  273. package/build/esm/cc/VersionCC.js +3 -3
  274. package/build/esm/cc/VersionCC.js.map +1 -1
  275. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  276. package/build/esm/cc/WindowCoveringCC.js +10 -9
  277. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  278. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  279. package/build/esm/cc/ZWaveProtocolCC.js +5 -26
  280. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  281. package/build/esm/cc/_CCValues.generated.d.ts +4 -4
  282. package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
  283. package/build/esm/cc/_CCValues.generated.js +638 -679
  284. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  285. package/build/esm/cc/index.d.ts +179 -179
  286. package/build/esm/cc/index.d.ts.map +1 -1
  287. package/build/esm/cc/index.js +124 -124
  288. package/build/esm/cc/index.js.map +1 -1
  289. package/build/esm/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  290. package/build/esm/cc/manufacturerProprietary/Decorators.js.map +1 -1
  291. package/build/esm/lib/API.d.ts +3 -2
  292. package/build/esm/lib/API.d.ts.map +1 -1
  293. package/build/esm/lib/API.js +1 -1
  294. package/build/esm/lib/API.js.map +1 -1
  295. package/build/esm/lib/CommandClass.d.ts +23 -1
  296. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  297. package/build/esm/lib/CommandClass.js +61 -20
  298. package/build/esm/lib/CommandClass.js.map +1 -1
  299. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  300. package/build/esm/lib/CommandClassDecorators.js +1 -2
  301. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  302. package/build/esm/lib/EncapsulatingCommandClass.d.ts.map +1 -1
  303. package/build/esm/lib/EncapsulatingCommandClass.js.map +1 -1
  304. package/build/esm/lib/NotificationEventPayload.d.ts.map +1 -1
  305. package/build/esm/lib/NotificationEventPayload.js.map +1 -1
  306. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  307. package/build/esm/lib/Security2/Extension.js +2 -6
  308. package/build/esm/lib/Security2/Extension.js.map +1 -1
  309. package/build/esm/lib/Security2/shared.d.ts.map +1 -1
  310. package/build/esm/lib/Security2/shared.js.map +1 -1
  311. package/build/esm/lib/SetValueResult.d.ts.map +1 -1
  312. package/build/esm/lib/Values.d.ts +1 -1
  313. package/build/esm/lib/Values.d.ts.map +1 -1
  314. package/build/esm/lib/Values.js.map +1 -1
  315. package/build/esm/lib/_CCAPI.generated.d.ts.map +1 -1
  316. package/build/esm/lib/_Types.d.ts +34 -30
  317. package/build/esm/lib/_Types.d.ts.map +1 -1
  318. package/build/esm/lib/_Types.js +5 -0
  319. package/build/esm/lib/_Types.js.map +1 -1
  320. package/build/esm/lib/serializers.d.ts.map +1 -1
  321. package/build/esm/lib/serializers.js +1 -4
  322. package/build/esm/lib/serializers.js.map +1 -1
  323. package/build/esm/lib/traits.d.ts.map +1 -1
  324. package/build/esm/lib/utils.d.ts.map +1 -1
  325. package/build/esm/lib/utils.js +25 -31
  326. package/build/esm/lib/utils.js.map +1 -1
  327. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/cc/ScheduleEntryLockCC.ts"],
4
- "sourcesContent": ["import * as __validateArgs from \"./ScheduleEntryLockCC._validateArgs.js\";\nconst { validateArgs_ScheduleEntryLockCCAPI_setEnabled, validateArgs_ScheduleEntryLockCCAPI_setWeekDaySchedule, validateArgs_ScheduleEntryLockCCAPI_getWeekDaySchedule, validateArgs_ScheduleEntryLockCCAPI_setYearDaySchedule, validateArgs_ScheduleEntryLockCCAPI_getYearDaySchedule, validateArgs_ScheduleEntryLockCCAPI_setDailyRepeatingSchedule, validateArgs_ScheduleEntryLockCCAPI_getDailyRepeatingSchedule, validateArgs_ScheduleEntryLockCCAPI_setTimezone } = __validateArgs;\nimport { CommandClasses, type EndpointId, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeBitMask, getDSTInfo, isUnsupervisedOrSucceeded, parseBitMask, validatePayload, } from \"@zwave-js/core\";\nimport { type AllOrNone, Bytes, formatDate, formatTime, getEnumMemberName, pick, } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ScheduleEntryLockCommand, type ScheduleEntryLockDailyRepeatingSchedule, ScheduleEntryLockScheduleKind, ScheduleEntryLockSetAction, type ScheduleEntryLockSlotId, type ScheduleEntryLockWeekDaySchedule, ScheduleEntryLockWeekday, type ScheduleEntryLockYearDaySchedule, type Timezone, } from \"../lib/_Types.js\";\nimport { encodeTimezone, parseTimezone } from \"../lib/serializers.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { UserCodeCC } from \"./UserCodeCC.js\";\nimport { ScheduleEntryLockCCValues } from \"./_CCValues.generated.js\";\nexport { ScheduleEntryLockCCValues };\n/** Caches information about a schedule */\nfunction persistSchedule(this: ScheduleEntryLockCC, ctx: GetValueDB, scheduleKind: ScheduleEntryLockScheduleKind, userId: number, slotId: number, schedule: ScheduleEntryLockWeekDaySchedule | ScheduleEntryLockYearDaySchedule | ScheduleEntryLockDailyRepeatingSchedule | false | undefined): void {\n const scheduleValue = ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId);\n if (schedule != undefined) {\n this.setValue(ctx, scheduleValue, schedule);\n }\n else {\n this.removeValue(ctx, scheduleValue);\n }\n}\n/** Updates the schedule kind assumed to be active for user in the cache */\nfunction setUserCodeScheduleKindCached(ctx: GetValueDB, endpoint: EndpointId, userId: number, scheduleKind: ScheduleEntryLockScheduleKind): void {\n ctx\n .getValueDB(endpoint.nodeId)\n .setValue(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index), scheduleKind);\n}\n/** Updates whether scheduling is active for one or all user(s) in the cache */\nfunction setUserCodeScheduleEnabledCached(ctx: GetValueDB, endpoint: EndpointId, userId: number | undefined, enabled: boolean): void {\n const setEnabled = (userId: number) => {\n ctx\n .getValueDB(endpoint.nodeId)\n .setValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index), enabled);\n };\n if (userId == undefined) {\n // Enable/disable all users\n const numUsers = UserCodeCC.getSupportedUsersCached(ctx, endpoint)\n ?? 0;\n for (let userId = 1; userId <= numUsers; userId++) {\n setEnabled(userId);\n }\n }\n else {\n setEnabled(userId);\n }\n}\n@API(CommandClasses[\"Schedule Entry Lock\"])\nexport class ScheduleEntryLockCCAPI extends CCAPI {\n public supportsCommand(cmd: ScheduleEntryLockCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ScheduleEntryLockCommand.EnableSet:\n case ScheduleEntryLockCommand.EnableAllSet:\n case ScheduleEntryLockCommand.WeekDayScheduleSet:\n case ScheduleEntryLockCommand.WeekDayScheduleGet:\n case ScheduleEntryLockCommand.YearDayScheduleSet:\n case ScheduleEntryLockCommand.YearDayScheduleGet:\n case ScheduleEntryLockCommand.SupportedGet:\n return true; // V1\n case ScheduleEntryLockCommand.TimeOffsetSet:\n case ScheduleEntryLockCommand.TimeOffsetGet:\n return this.version >= 2;\n case ScheduleEntryLockCommand.DailyRepeatingScheduleSet:\n case ScheduleEntryLockCommand.DailyRepeatingScheduleGet:\n return this.version >= 3;\n }\n return super.supportsCommand(cmd);\n }\n /**\n * Enables or disables schedules. If a user ID is given, that user's\n * schedules will be enabled or disabled. If no user ID is given, all schedules\n * will be affected.\n */\n @validateArgs_ScheduleEntryLockCCAPI_setEnabled()\n public async setEnabled(enabled: boolean, userId?: number): Promise<SupervisionResult | undefined> {\n let result: SupervisionResult | undefined;\n if (userId != undefined) {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableSet);\n const cc = new ScheduleEntryLockCCEnableSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n userId,\n enabled,\n });\n result = await this.host.sendCommand(cc, this.commandOptions);\n }\n else {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableAllSet);\n const cc = new ScheduleEntryLockCCEnableAllSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n enabled,\n });\n result = await this.host.sendCommand(cc, this.commandOptions);\n }\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Remember the new state in the cache\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, userId, enabled);\n }\n return result;\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getNumSlots() {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.SupportedGet);\n const cc = new ScheduleEntryLockCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCSupportedReport>(cc, this.commandOptions);\n if (result) {\n return pick(result, [\n \"numWeekDaySlots\",\n \"numYearDaySlots\",\n \"numDailyRepeatingSlots\",\n ]);\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setWeekDaySchedule()\n public async setWeekDaySchedule(slot: ScheduleEntryLockSlotId, schedule?: ScheduleEntryLockWeekDaySchedule): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);\n if (this.isSinglecast()) {\n const numSlots = ScheduleEntryLockCC.getNumWeekDaySlotsCached(this.host, this.endpoint);\n if (slot.slotId < 1 || slot.slotId > numSlots) {\n throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-week slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n if (schedule) {\n if (schedule.stopHour < schedule.startHour\n || schedule.stopHour === schedule.startHour\n && schedule.stopMinute <= schedule.startMinute) {\n throw new ZWaveError(`The stop time must be after the start time.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n const cc = new ScheduleEntryLockCCWeekDayScheduleSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n ...(schedule\n ? {\n action: ScheduleEntryLockSetAction.Set,\n ...schedule,\n }\n : {\n action: ScheduleEntryLockSetAction.Erase,\n }),\n });\n const result = await this.host.sendCommand(cc, this.commandOptions);\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Editing (but not erasing) a schedule will enable scheduling for that user\n // and switch it to the current scheduling kind\n if (!!schedule) {\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);\n setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.WeekDay);\n }\n // And cache the schedule\n persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.WeekDay, slot.userId, slot.slotId, schedule ?? false);\n }\n return result;\n }\n @validateArgs_ScheduleEntryLockCCAPI_getWeekDaySchedule()\n public async getWeekDaySchedule(slot: ScheduleEntryLockSlotId): Promise<MaybeNotKnown<ScheduleEntryLockWeekDaySchedule>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);\n const cc = new ScheduleEntryLockCCWeekDayScheduleGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCWeekDayScheduleReport>(cc, this.commandOptions);\n if (result?.weekday != undefined) {\n return {\n weekday: result.weekday,\n startHour: result.startHour!,\n startMinute: result.startMinute!,\n stopHour: result.stopHour!,\n stopMinute: result.stopMinute!,\n };\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setYearDaySchedule()\n public async setYearDaySchedule(slot: ScheduleEntryLockSlotId, schedule?: ScheduleEntryLockYearDaySchedule): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);\n if (this.isSinglecast()) {\n const numSlots = ScheduleEntryLockCC.getNumYearDaySlotsCached(this.host, this.endpoint);\n if (slot.slotId < 1 || slot.slotId > numSlots) {\n throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-year slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n if (schedule) {\n const startDate = new Date(schedule.startYear, schedule.startMonth - 1, schedule.startDay, schedule.startHour, schedule.startMinute);\n const stopDate = new Date(schedule.stopYear, schedule.stopMonth - 1, schedule.stopDay, schedule.stopHour, schedule.stopMinute);\n if (stopDate <= startDate) {\n throw new ZWaveError(`The stop date must be after the start date.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n const cc = new ScheduleEntryLockCCYearDayScheduleSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n ...(schedule\n ? {\n action: ScheduleEntryLockSetAction.Set,\n ...schedule,\n }\n : {\n action: ScheduleEntryLockSetAction.Erase,\n }),\n });\n const result = await this.host.sendCommand(cc, this.commandOptions);\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Editing (but not erasing) a schedule will enable scheduling for that user\n // and switch it to the current scheduling kind\n if (!!schedule) {\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);\n setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.YearDay);\n }\n // And cache the schedule\n persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.YearDay, slot.userId, slot.slotId, schedule ?? false);\n }\n return result;\n }\n @validateArgs_ScheduleEntryLockCCAPI_getYearDaySchedule()\n public async getYearDaySchedule(slot: ScheduleEntryLockSlotId): Promise<MaybeNotKnown<ScheduleEntryLockYearDaySchedule>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);\n const cc = new ScheduleEntryLockCCYearDayScheduleGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCYearDayScheduleReport>(cc, this.commandOptions);\n if (result?.startYear != undefined) {\n return {\n startYear: result.startYear,\n startMonth: result.startMonth!,\n startDay: result.startDay!,\n startHour: result.startHour!,\n startMinute: result.startMinute!,\n stopYear: result.stopYear!,\n stopMonth: result.stopMonth!,\n stopDay: result.stopDay!,\n stopHour: result.stopHour!,\n stopMinute: result.stopMinute!,\n };\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setDailyRepeatingSchedule()\n public async setDailyRepeatingSchedule(slot: ScheduleEntryLockSlotId, schedule?: ScheduleEntryLockDailyRepeatingSchedule): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);\n if (this.isSinglecast()) {\n const numSlots = ScheduleEntryLockCC\n .getNumDailyRepeatingSlotsCached(this.host, this.endpoint);\n if (slot.slotId < 1 || slot.slotId > numSlots) {\n throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported daily repeating slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n const cc = new ScheduleEntryLockCCDailyRepeatingScheduleSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n ...(schedule\n ? {\n action: ScheduleEntryLockSetAction.Set,\n ...schedule,\n }\n : {\n action: ScheduleEntryLockSetAction.Erase,\n }),\n });\n const result = await this.host.sendCommand(cc, this.commandOptions);\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Editing (but not erasing) a schedule will enable scheduling for that user\n // and switch it to the current scheduling kind\n if (!!schedule) {\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);\n setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.DailyRepeating);\n }\n // And cache the schedule\n persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.DailyRepeating, slot.userId, slot.slotId, schedule ?? false);\n }\n return result;\n }\n @validateArgs_ScheduleEntryLockCCAPI_getDailyRepeatingSchedule()\n public async getDailyRepeatingSchedule(slot: ScheduleEntryLockSlotId): Promise<MaybeNotKnown<ScheduleEntryLockDailyRepeatingSchedule>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);\n const cc = new ScheduleEntryLockCCDailyRepeatingScheduleGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCDailyRepeatingScheduleReport>(cc, this.commandOptions);\n if (result?.weekdays != undefined) {\n return {\n weekdays: result.weekdays,\n startHour: result.startHour!,\n startMinute: result.startMinute!,\n durationHour: result.durationHour!,\n durationMinute: result.durationMinute!,\n };\n }\n }\n public async getTimezone(): Promise<MaybeNotKnown<Timezone>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetGet);\n const cc = new ScheduleEntryLockCCTimeOffsetGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCTimeOffsetReport>(cc, this.commandOptions);\n if (result) {\n return pick(result, [\"standardOffset\", \"dstOffset\"]);\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setTimezone()\n public async setTimezone(timezone: Timezone): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetSet);\n const cc = new ScheduleEntryLockCCTimeOffsetSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...timezone,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Schedule Entry Lock\"])\n@implementedVersion(3)\n@ccValues(ScheduleEntryLockCCValues)\nexport class ScheduleEntryLockCC extends CommandClass {\n declare ccCommand: ScheduleEntryLockCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Schedule Entry Lock\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported number of schedule slots...\",\n direction: \"outbound\",\n });\n const slotsResp = await api.getNumSlots();\n if (slotsResp) {\n let logMessage = `received supported number of schedule slots:\nday of week: ${slotsResp.numWeekDaySlots}\nday of year: ${slotsResp.numYearDaySlots}`;\n if (slotsResp.numDailyRepeatingSlots != undefined) {\n logMessage += `\ndaily repeating: ${slotsResp.numDailyRepeatingSlots}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n // If the timezone is not configured with the Time CC, do it here\n if (api.supportsCommand(ScheduleEntryLockCommand.TimeOffsetSet)\n && (!endpoint.supportsCC(CommandClasses.Time)\n || endpoint.getCCVersion(CommandClasses.Time) < 2)) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"setting timezone information...\",\n direction: \"outbound\",\n });\n // Set the correct timezone on this node\n const timezone = getDSTInfo();\n await api.setTimezone(timezone);\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n /**\n * Returns the number of supported day-of-week slots.\n * This only works AFTER the interview process\n */\n public static getNumWeekDaySlotsCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.numWeekDaySlots.endpoint(endpoint.index)) || 0;\n }\n /**\n * Returns the number of supported day-of-year slots.\n * This only works AFTER the interview process\n */\n public static getNumYearDaySlotsCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.numYearDaySlots.endpoint(endpoint.index)) || 0;\n }\n /**\n * Returns the number of supported daily-repeating slots.\n * This only works AFTER the interview process\n */\n public static getNumDailyRepeatingSlotsCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.numDailyRepeatingSlots.endpoint(endpoint.index)) || 0;\n }\n /**\n * Returns whether scheduling for a given user ID (most likely) enabled. Since the Schedule Entry Lock CC\n * provides no way to query the enabled state, Z-Wave JS tracks this in its own cache.\n *\n * This only works AFTER the interview process and is likely to be wrong if a device\n * with existing schedules is queried. To be sure, disable scheduling for all users and enable\n * only the desired ones.\n */\n public static getUserCodeScheduleEnabledCached(ctx: GetValueDB, endpoint: EndpointId, userId: number): boolean {\n return !!ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index));\n }\n /**\n * Returns which scheduling kind is (most likely) enabled for a given user ID . Since the Schedule Entry Lock CC\n * provides no way to query the current state, Z-Wave JS tracks this in its own cache.\n *\n * This only works AFTER the interview process and is likely to be wrong if a device\n * with existing schedules is queried. To be sure, edit a schedule of the desired kind\n * which will automatically switch the user to that scheduling kind.\n */\n public static getUserCodeScheduleKindCached(ctx: GetValueDB, endpoint: EndpointId, userId: number): MaybeNotKnown<ScheduleEntryLockScheduleKind> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue<ScheduleEntryLockScheduleKind>(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index));\n }\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind.WeekDay, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockWeekDaySchedule | false>;\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind.YearDay, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockYearDaySchedule | false>;\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind.DailyRepeating, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockDailyRepeatingSchedule | false>;\n // Catch-all overload for applications which haven't narrowed `scheduleKind`\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockWeekDaySchedule | ScheduleEntryLockYearDaySchedule | ScheduleEntryLockDailyRepeatingSchedule | false>;\n /**\n * Returns the assumed state of a schedule. Since the Schedule Entry Lock CC\n * provides no way to query the current state, Z-Wave JS tracks this in its own cache.\n *\n * A return value of `false` means the slot is empty, a return value of `undefined` means the information is not cached yet.\n *\n * This only works AFTER the interview process.\n */\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockWeekDaySchedule | ScheduleEntryLockYearDaySchedule | ScheduleEntryLockDailyRepeatingSchedule | false> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId).endpoint(endpoint.index));\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCEnableSetOptions {\n userId: number;\n enabled: boolean;\n}\n@CCCommand(ScheduleEntryLockCommand.EnableSet)\n@useSupervision()\nexport class ScheduleEntryLockCCEnableSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCEnableSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.enabled = options.enabled;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCEnableSet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const enabled: boolean = raw.payload[1] === 0x01;\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n enabled,\n });\n }\n public userId: number;\n public enabled: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.enabled ? 0x01 : 0x00]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n action: this.enabled ? \"enable\" : \"disable\",\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCEnableAllSetOptions {\n enabled: boolean;\n}\n@CCCommand(ScheduleEntryLockCommand.EnableAllSet)\n@useSupervision()\nexport class ScheduleEntryLockCCEnableAllSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCEnableAllSetOptions>) {\n super(options);\n this.enabled = options.enabled;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCEnableAllSet {\n validatePayload(raw.payload.length >= 1);\n const enabled: boolean = raw.payload[0] === 0x01;\n return new this({\n nodeId: ctx.sourceNodeId,\n enabled,\n });\n }\n public enabled: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.enabled ? 0x01 : 0x00]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n action: this.enabled ? \"enable all\" : \"disable all\",\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCSupportedReportOptions {\n numWeekDaySlots: number;\n numYearDaySlots: number;\n numDailyRepeatingSlots?: number;\n}\n@CCCommand(ScheduleEntryLockCommand.SupportedReport)\n@ccValueProperty(\"numWeekDaySlots\", ScheduleEntryLockCCValues.numWeekDaySlots)\n@ccValueProperty(\"numYearDaySlots\", ScheduleEntryLockCCValues.numYearDaySlots)\n@ccValueProperty(\"numDailyRepeatingSlots\", ScheduleEntryLockCCValues.numDailyRepeatingSlots)\nexport class ScheduleEntryLockCCSupportedReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCSupportedReportOptions>) {\n super(options);\n this.numWeekDaySlots = options.numWeekDaySlots;\n this.numYearDaySlots = options.numYearDaySlots;\n this.numDailyRepeatingSlots = options.numDailyRepeatingSlots;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCSupportedReport {\n validatePayload(raw.payload.length >= 2);\n const numWeekDaySlots = raw.payload[0];\n const numYearDaySlots = raw.payload[1];\n let numDailyRepeatingSlots: number | undefined;\n if (raw.payload.length >= 3) {\n numDailyRepeatingSlots = raw.payload[2];\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n numWeekDaySlots,\n numYearDaySlots,\n numDailyRepeatingSlots,\n });\n }\n public numWeekDaySlots: number;\n public numYearDaySlots: number;\n public numDailyRepeatingSlots: number | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.numWeekDaySlots,\n this.numYearDaySlots,\n this.numDailyRepeatingSlots ?? 0,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"no. of weekday schedule slots\": this.numWeekDaySlots,\n \"no. of day-of-year schedule slots\": this.numYearDaySlots,\n };\n if (this.numDailyRepeatingSlots != undefined) {\n message[\"no. of daily repeating schedule slots\"] =\n this.numDailyRepeatingSlots;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ScheduleEntryLockCommand.SupportedGet)\n@expectedCCResponse(ScheduleEntryLockCCSupportedReport)\nexport class ScheduleEntryLockCCSupportedGet extends ScheduleEntryLockCC {\n}\n/** @publicAPI */\nexport type ScheduleEntryLockCCWeekDayScheduleSetOptions = ScheduleEntryLockSlotId & ({\n action: ScheduleEntryLockSetAction.Erase;\n} | ({\n action: ScheduleEntryLockSetAction.Set;\n} & ScheduleEntryLockWeekDaySchedule));\n@CCCommand(ScheduleEntryLockCommand.WeekDayScheduleSet)\n@useSupervision()\nexport class ScheduleEntryLockCCWeekDayScheduleSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCWeekDayScheduleSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.action = options.action;\n if (options.action === ScheduleEntryLockSetAction.Set) {\n this.weekday = options.weekday;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCWeekDayScheduleSet {\n validatePayload(raw.payload.length >= 3);\n const action: ScheduleEntryLockSetAction = raw.payload[0];\n validatePayload(action === ScheduleEntryLockSetAction.Set\n || action === ScheduleEntryLockSetAction.Erase);\n const userId = raw.payload[1];\n const slotId = raw.payload[2];\n if (action !== ScheduleEntryLockSetAction.Set) {\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n });\n }\n validatePayload(raw.payload.length >= 8);\n const weekday: ScheduleEntryLockWeekday = raw.payload[3];\n const startHour = raw.payload[4];\n const startMinute = raw.payload[5];\n const stopHour = raw.payload[6];\n const stopMinute = raw.payload[7];\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n weekday,\n startHour,\n startMinute,\n stopHour,\n stopMinute,\n });\n }\n public userId: number;\n public slotId: number;\n public action: ScheduleEntryLockSetAction;\n public weekday?: ScheduleEntryLockWeekday;\n public startHour?: number;\n public startMinute?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.action,\n this.userId,\n this.slotId,\n // The report should have these fields set to 0xff\n // if the slot is erased. The specs don't mention anything\n // for the Set command, so we just assume the same is okay\n this.weekday ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.action === ScheduleEntryLockSetAction.Erase) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"erase\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday!),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n \"end time\": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCWeekDayScheduleReportOptions = ScheduleEntryLockSlotId & AllOrNone<ScheduleEntryLockWeekDaySchedule>;\n@CCCommand(ScheduleEntryLockCommand.WeekDayScheduleReport)\nexport class ScheduleEntryLockCCWeekDayScheduleReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCWeekDayScheduleReportOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.weekday = options.weekday;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCWeekDayScheduleReport {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n let ccOptions: ScheduleEntryLockCCWeekDayScheduleReportOptions = {\n userId,\n slotId,\n };\n let weekday: ScheduleEntryLockWeekday | undefined;\n let startHour: number | undefined;\n let startMinute: number | undefined;\n let stopHour: number | undefined;\n let stopMinute: number | undefined;\n if (raw.payload.length >= 7) {\n if (raw.payload[2] !== 0xff) {\n weekday = raw.payload[2];\n }\n if (raw.payload[3] !== 0xff) {\n startHour = raw.payload[3];\n }\n if (raw.payload[4] !== 0xff) {\n startMinute = raw.payload[4];\n }\n if (raw.payload[5] !== 0xff) {\n stopHour = raw.payload[5];\n }\n if (raw.payload[6] !== 0xff) {\n stopMinute = raw.payload[6];\n }\n }\n validatePayload(weekday == undefined\n || weekday <= ScheduleEntryLockWeekday.Saturday, startHour == undefined || startHour <= 23, startMinute == undefined || startMinute <= 59, stopHour == undefined || stopHour <= 23, stopMinute == undefined || stopMinute <= 59);\n if (weekday != undefined\n && startHour != undefined\n && startMinute != undefined\n && stopHour != undefined\n && stopMinute != undefined) {\n ccOptions = {\n ...ccOptions,\n weekday,\n startHour,\n startMinute,\n stopHour,\n stopMinute,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n ...ccOptions,\n });\n }\n public userId: number;\n public slotId: number;\n public weekday?: ScheduleEntryLockWeekday;\n public startHour?: number;\n public startMinute?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.WeekDay, this.userId, this.slotId, this.weekday != undefined\n ? {\n weekday: this.weekday,\n startHour: this.startHour!,\n startMinute: this.startMinute!,\n stopHour: this.stopHour!,\n stopMinute: this.stopMinute!,\n }\n : false);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.userId,\n this.slotId,\n this.weekday ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.weekday == undefined) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n schedule: \"(empty)\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n \"end time\": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCWeekDayScheduleGetOptions = ScheduleEntryLockSlotId;\n@CCCommand(ScheduleEntryLockCommand.WeekDayScheduleGet)\n@expectedCCResponse(ScheduleEntryLockCCWeekDayScheduleReport)\nexport class ScheduleEntryLockCCWeekDayScheduleGet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCWeekDayScheduleGetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCWeekDayScheduleGet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n public userId: number;\n public slotId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n },\n };\n }\n}\n/** @publicAPI */\nexport type ScheduleEntryLockCCYearDayScheduleSetOptions = ScheduleEntryLockSlotId & ({\n action: ScheduleEntryLockSetAction.Erase;\n} | ({\n action: ScheduleEntryLockSetAction.Set;\n} & ScheduleEntryLockYearDaySchedule));\n@CCCommand(ScheduleEntryLockCommand.YearDayScheduleSet)\n@useSupervision()\nexport class ScheduleEntryLockCCYearDayScheduleSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCYearDayScheduleSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.action = options.action;\n if (options.action === ScheduleEntryLockSetAction.Set) {\n this.startYear = options.startYear;\n this.startMonth = options.startMonth;\n this.startDay = options.startDay;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopYear = options.stopYear;\n this.stopMonth = options.stopMonth;\n this.stopDay = options.stopDay;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCYearDayScheduleSet {\n validatePayload(raw.payload.length >= 3);\n const action: ScheduleEntryLockSetAction = raw.payload[0];\n validatePayload(action === ScheduleEntryLockSetAction.Set\n || action === ScheduleEntryLockSetAction.Erase);\n const userId = raw.payload[1];\n const slotId = raw.payload[2];\n if (action !== ScheduleEntryLockSetAction.Set) {\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n });\n }\n validatePayload(raw.payload.length >= 13);\n const startYear = raw.payload[3];\n const startMonth = raw.payload[4];\n const startDay = raw.payload[5];\n const startHour = raw.payload[6];\n const startMinute = raw.payload[7];\n const stopYear = raw.payload[8];\n const stopMonth = raw.payload[9];\n const stopDay = raw.payload[10];\n const stopHour = raw.payload[11];\n const stopMinute = raw.payload[12];\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n startYear,\n startMonth,\n startDay,\n startHour,\n startMinute,\n stopYear,\n stopMonth,\n stopDay,\n stopHour,\n stopMinute,\n });\n }\n public userId: number;\n public slotId: number;\n public action: ScheduleEntryLockSetAction;\n public startYear?: number;\n public startMonth?: number;\n public startDay?: number;\n public startHour?: number;\n public startMinute?: number;\n public stopYear?: number;\n public stopMonth?: number;\n public stopDay?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.action,\n this.userId,\n this.slotId,\n // The report should have these fields set to 0xff\n // if the slot is erased. The specs don't mention anything\n // for the Set command, so we just assume the same is okay\n this.startYear ?? 0xff,\n this.startMonth ?? 0xff,\n this.startDay ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopYear ?? 0xff,\n this.stopMonth ?? 0xff,\n this.stopDay ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.action === ScheduleEntryLockSetAction.Erase) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"erase\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n \"start date\": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,\n \"end date\": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCYearDayScheduleReportOptions = ScheduleEntryLockSlotId & AllOrNone<ScheduleEntryLockYearDaySchedule>;\n@CCCommand(ScheduleEntryLockCommand.YearDayScheduleReport)\nexport class ScheduleEntryLockCCYearDayScheduleReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCYearDayScheduleReportOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.startYear = options.startYear;\n this.startMonth = options.startMonth;\n this.startDay = options.startDay;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopYear = options.stopYear;\n this.stopMonth = options.stopMonth;\n this.stopDay = options.stopDay;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCYearDayScheduleReport {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n let ccOptions: ScheduleEntryLockCCYearDayScheduleReportOptions = {\n userId,\n slotId,\n };\n let startYear: number | undefined;\n let startMonth: number | undefined;\n let startDay: number | undefined;\n let startHour: number | undefined;\n let startMinute: number | undefined;\n let stopYear: number | undefined;\n let stopMonth: number | undefined;\n let stopDay: number | undefined;\n let stopHour: number | undefined;\n let stopMinute: number | undefined;\n if (raw.payload.length >= 12) {\n if (raw.payload[2] !== 0xff) {\n startYear = raw.payload[2];\n }\n if (raw.payload[3] !== 0xff) {\n startMonth = raw.payload[3];\n }\n if (raw.payload[4] !== 0xff) {\n startDay = raw.payload[4];\n }\n if (raw.payload[5] !== 0xff) {\n startHour = raw.payload[5];\n }\n if (raw.payload[6] !== 0xff) {\n startMinute = raw.payload[6];\n }\n if (raw.payload[7] !== 0xff) {\n stopYear = raw.payload[7];\n }\n if (raw.payload[8] !== 0xff) {\n stopMonth = raw.payload[8];\n }\n if (raw.payload[9] !== 0xff) {\n stopDay = raw.payload[9];\n }\n if (raw.payload[10] !== 0xff) {\n stopHour = raw.payload[10];\n }\n if (raw.payload[11] !== 0xff) {\n stopMinute = raw.payload[11];\n }\n }\n validatePayload(startMonth == undefined\n || (startMonth >= 1 && startMonth <= 12), startDay == undefined || (startDay >= 1 && startDay <= 31), startHour == undefined || startHour <= 23, startMinute == undefined || startMinute <= 59, stopMonth == undefined || (stopMonth >= 1 && stopMonth <= 12), stopDay == undefined || (stopDay >= 1 && stopDay <= 31), stopHour == undefined || stopHour <= 23, stopMinute == undefined || stopMinute <= 59);\n if (startYear != undefined\n && startMonth != undefined\n && startDay != undefined\n && startHour != undefined\n && startMinute != undefined\n && stopYear != undefined\n && stopMonth != undefined\n && stopDay != undefined\n && stopHour != undefined\n && stopMinute != undefined) {\n ccOptions = {\n ...ccOptions,\n startYear,\n startMonth,\n startDay,\n startHour,\n startMinute,\n stopYear,\n stopMonth,\n stopDay,\n stopHour,\n stopMinute,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n ...ccOptions,\n });\n }\n public userId: number;\n public slotId: number;\n public startYear?: number;\n public startMonth?: number;\n public startDay?: number;\n public startHour?: number;\n public startMinute?: number;\n public stopYear?: number;\n public stopMonth?: number;\n public stopDay?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.YearDay, this.userId, this.slotId, this.startYear != undefined\n ? {\n startYear: this.startYear,\n startMonth: this.startMonth!,\n startDay: this.startDay!,\n startHour: this.startHour!,\n startMinute: this.startMinute!,\n stopYear: this.stopYear!,\n stopMonth: this.stopMonth!,\n stopDay: this.stopDay!,\n stopHour: this.stopHour!,\n stopMinute: this.stopMinute!,\n }\n : false);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.userId,\n this.slotId,\n this.startYear ?? 0xff,\n this.startMonth ?? 0xff,\n this.startDay ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopYear ?? 0xff,\n this.stopMonth ?? 0xff,\n this.stopDay ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.startYear !== undefined) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n schedule: \"(empty)\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n \"start date\": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,\n \"end date\": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCYearDayScheduleGetOptions = ScheduleEntryLockSlotId;\n@CCCommand(ScheduleEntryLockCommand.YearDayScheduleGet)\n@expectedCCResponse(ScheduleEntryLockCCYearDayScheduleReport)\nexport class ScheduleEntryLockCCYearDayScheduleGet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCYearDayScheduleGetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCYearDayScheduleGet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n public userId: number;\n public slotId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCTimeOffsetSetOptions {\n standardOffset: number;\n dstOffset: number;\n}\n@CCCommand(ScheduleEntryLockCommand.TimeOffsetSet)\n@useSupervision()\nexport class ScheduleEntryLockCCTimeOffsetSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCTimeOffsetSetOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCTimeOffsetSet {\n const { standardOffset, dstOffset } = parseTimezone(raw.payload);\n return new this({\n nodeId: ctx.sourceNodeId,\n standardOffset,\n dstOffset,\n });\n }\n public standardOffset: number;\n public dstOffset: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n });\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"standard time offset\": `${this.standardOffset} minutes`,\n \"DST offset\": `${this.dstOffset} minutes`,\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCTimeOffsetReportOptions {\n standardOffset: number;\n dstOffset: number;\n}\n@CCCommand(ScheduleEntryLockCommand.TimeOffsetReport)\nexport class ScheduleEntryLockCCTimeOffsetReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCTimeOffsetReportOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCTimeOffsetReport {\n const { standardOffset, dstOffset } = parseTimezone(raw.payload);\n return new this({\n nodeId: ctx.sourceNodeId,\n standardOffset,\n dstOffset,\n });\n }\n public standardOffset: number;\n public dstOffset: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n });\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"standard time offset\": `${this.standardOffset} minutes`,\n \"DST offset\": `${this.dstOffset} minutes`,\n },\n };\n }\n}\n@CCCommand(ScheduleEntryLockCommand.TimeOffsetGet)\n@expectedCCResponse(ScheduleEntryLockCCTimeOffsetReport)\nexport class ScheduleEntryLockCCTimeOffsetGet extends ScheduleEntryLockCC {\n}\n/** @publicAPI */\nexport type ScheduleEntryLockCCDailyRepeatingScheduleSetOptions = ScheduleEntryLockSlotId & ({\n action: ScheduleEntryLockSetAction.Erase;\n} | ({\n action: ScheduleEntryLockSetAction.Set;\n} & ScheduleEntryLockDailyRepeatingSchedule));\n@CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleSet)\n@useSupervision()\nexport class ScheduleEntryLockCCDailyRepeatingScheduleSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCDailyRepeatingScheduleSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.action = options.action;\n if (options.action === ScheduleEntryLockSetAction.Set) {\n this.weekdays = options.weekdays;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.durationHour = options.durationHour;\n this.durationMinute = options.durationMinute;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCDailyRepeatingScheduleSet {\n validatePayload(raw.payload.length >= 3);\n const action: ScheduleEntryLockSetAction = raw.payload[0];\n validatePayload(action === ScheduleEntryLockSetAction.Set\n || action === ScheduleEntryLockSetAction.Erase);\n const userId = raw.payload[1];\n const slotId = raw.payload[2];\n if (action !== ScheduleEntryLockSetAction.Set) {\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n });\n }\n validatePayload(raw.payload.length >= 8);\n const weekdays: ScheduleEntryLockWeekday[] = parseBitMask(raw.payload.subarray(3, 4), ScheduleEntryLockWeekday.Sunday);\n const startHour = raw.payload[4];\n const startMinute = raw.payload[5];\n const durationHour = raw.payload[6];\n const durationMinute = raw.payload[7];\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n weekdays,\n startHour,\n startMinute,\n durationHour,\n durationMinute,\n });\n }\n public userId: number;\n public slotId: number;\n public action: ScheduleEntryLockSetAction;\n public weekdays?: ScheduleEntryLockWeekday[];\n public startHour?: number;\n public startMinute?: number;\n public durationHour?: number;\n public durationMinute?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.action, this.userId, this.slotId]);\n if (this.action === ScheduleEntryLockSetAction.Set) {\n this.payload = Bytes.concat([\n this.payload,\n encodeBitMask(this.weekdays!, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),\n [\n this.startHour!,\n this.startMinute!,\n this.durationHour!,\n this.durationMinute!,\n ],\n ]);\n }\n else {\n // Not sure if this is correct\n this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0xff)]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.action === ScheduleEntryLockSetAction.Erase) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"erase\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n weekdays: this.weekdays!.map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w)).join(\", \"),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCDailyRepeatingScheduleReportOptions = ScheduleEntryLockSlotId & AllOrNone<ScheduleEntryLockDailyRepeatingSchedule>;\n@CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleReport)\nexport class ScheduleEntryLockCCDailyRepeatingScheduleReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCDailyRepeatingScheduleReportOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.weekdays = options.weekdays;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.durationHour = options.durationHour;\n this.durationMinute = options.durationMinute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCDailyRepeatingScheduleReport {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n if (raw.payload.length >= 7 && raw.payload[2] !== 0) {\n // Only parse the schedule if it is present and some weekday is selected\n const weekdays: ScheduleEntryLockWeekday[] = parseBitMask(raw.payload.subarray(2, 3), ScheduleEntryLockWeekday.Sunday);\n const startHour = raw.payload[3];\n const startMinute = raw.payload[4];\n const durationHour = raw.payload[5];\n const durationMinute = raw.payload[6];\n validatePayload(startHour <= 23, startMinute <= 59, durationHour <= 23, durationMinute <= 59);\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n weekdays,\n startHour,\n startMinute,\n durationHour,\n durationMinute,\n });\n }\n else {\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n }\n public userId: number;\n public slotId: number;\n public weekdays?: ScheduleEntryLockWeekday[];\n public startHour?: number;\n public startMinute?: number;\n public durationHour?: number;\n public durationMinute?: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.DailyRepeating, this.userId, this.slotId, this.weekdays?.length\n ? {\n weekdays: this.weekdays,\n startHour: this.startHour!,\n startMinute: this.startMinute!,\n durationHour: this.durationHour!,\n durationMinute: this.durationMinute!,\n }\n : false);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n if (this.weekdays) {\n this.payload = Bytes.concat([\n this.payload,\n encodeBitMask(this.weekdays, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),\n [\n this.startHour!,\n this.startMinute!,\n this.durationHour!,\n this.durationMinute!,\n ],\n ]);\n }\n else {\n // Not sure if this is correct, but at least we won't parse it incorrectly ourselves when setting everything to 0\n this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0)]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (!this.weekdays) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n schedule: \"(empty)\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n weekdays: this.weekdays\n .map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w))\n .join(\", \"),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCDailyRepeatingScheduleGetOptions = ScheduleEntryLockSlotId;\n@CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleGet)\n@expectedCCResponse(ScheduleEntryLockCCDailyRepeatingScheduleReport)\nexport class ScheduleEntryLockCCDailyRepeatingScheduleGet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCDailyRepeatingScheduleGetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCDailyRepeatingScheduleGet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n public userId: number;\n public slotId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n },\n };\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAiT;AACjT,oBAAwF;AACxF,iBAAsB;AACtB,0BAA4F;AAC5F,oCAAiI;AAEjI,mBAAwS;AACxS,yBAA8C;AAE9C,wBAA2B;AAC3B,gCAA0C;AAX1C,MAAM,EAAE,gDAAgD,wDAAwD,wDAAwD,wDAAwD,wDAAwD,+DAA+D,+DAA+D,gDAA+C,IAAK;AAc1c,SAAS,gBAA2C,KAAiB,cAA6C,QAAgB,QAAgB,UAA2I;AACzR,QAAM,gBAAgB,oDAA0B,SAAS,cAAc,QAAQ,MAAM;AACrF,MAAI,YAAY,QAAW;AACvB,SAAK,SAAS,KAAK,eAAe,QAAQ;EAC9C,OACK;AACD,SAAK,YAAY,KAAK,aAAa;EACvC;AACJ;AARS;AAUT,SAAS,8BAA8B,KAAiB,UAAsB,QAAgB,cAA2C;AACrI,MACK,WAAW,SAAS,MAAM,EAC1B,SAAS,oDAA0B,aAAa,MAAM,EAAE,SAAS,SAAS,KAAK,GAAG,YAAY;AACvG;AAJS;AAMT,SAAS,iCAAiC,KAAiB,UAAsB,QAA4B,SAAgB;AACzH,QAAM,aAAa,wBAACA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BAAW,KAAK,aAAa,GAAG,KAAK,eAAe,CAAC;UACnE,cAAU,0BAAW,KAAK,gBAAgB,GAAG,KAAK,kBAAkB,CAAC;;MAE7E;AACA,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB;;IAER;;;;IAMS,gDAA4C,MAAA;8BAFxD,yCAAU,sCAAyB,yBAAyB,OAC5D,kDAAmB,+CAA+C,CAAC;;;;oBACF;oEAAA,YAAmB;WAAA;;;;;;;;AAArF,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAyE;AACxF,YAAM,OAAO;AACb,WAAK,SAAS,QAAQ;AACtB,WAAK,SAAS,QAAQ;IAC1B;IACO,OAAO,KAAK,KAAY,KAAqB;AAChD,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,SAAS,IAAI,QAAQ,CAAC;AAC5B,YAAM,SAAS,IAAI,QAAQ,CAAC;AAC5B,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;QACA;OACH;IACL;IACO;IACA;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,QAAQ,KAAK,MAAM,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,WAAW,KAAK;UAChB,UAAU,KAAK;;;IAG3B;;;;",
4
+ "sourcesContent": ["import * as __validateArgs from \"./ScheduleEntryLockCC._validateArgs.js\";\nconst { validateArgs_ScheduleEntryLockCCAPI_setEnabled, validateArgs_ScheduleEntryLockCCAPI_setWeekDaySchedule, validateArgs_ScheduleEntryLockCCAPI_getWeekDaySchedule, validateArgs_ScheduleEntryLockCCAPI_setYearDaySchedule, validateArgs_ScheduleEntryLockCCAPI_getYearDaySchedule, validateArgs_ScheduleEntryLockCCAPI_setDailyRepeatingSchedule, validateArgs_ScheduleEntryLockCCAPI_getDailyRepeatingSchedule, validateArgs_ScheduleEntryLockCCAPI_setTimezone } = __validateArgs;\nimport { CommandClasses, type EndpointId, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type MessageRecord, type SupervisionResult, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeBitMask, getDSTInfo, isUnsupervisedOrSucceeded, parseBitMask, validatePayload, } from \"@zwave-js/core\";\nimport { type AllOrNone, Bytes, formatDate, formatTime, getEnumMemberName, pick, } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ScheduleEntryLockCommand, type ScheduleEntryLockDailyRepeatingSchedule, ScheduleEntryLockScheduleKind, ScheduleEntryLockSetAction, type ScheduleEntryLockSlotId, type ScheduleEntryLockWeekDaySchedule, ScheduleEntryLockWeekday, type ScheduleEntryLockYearDaySchedule, type Timezone, } from \"../lib/_Types.js\";\nimport { encodeTimezone, parseTimezone } from \"../lib/serializers.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { UserCodeCC } from \"./UserCodeCC.js\";\nimport { ScheduleEntryLockCCValues } from \"./_CCValues.generated.js\";\nexport { ScheduleEntryLockCCValues };\n/** Caches information about a schedule */\nfunction persistSchedule(this: ScheduleEntryLockCC, ctx: GetValueDB, scheduleKind: ScheduleEntryLockScheduleKind, userId: number, slotId: number, schedule: ScheduleEntryLockWeekDaySchedule | ScheduleEntryLockYearDaySchedule | ScheduleEntryLockDailyRepeatingSchedule | false | undefined): void {\n const scheduleValue = ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId);\n if (schedule != undefined) {\n this.setValue(ctx, scheduleValue, schedule);\n }\n else {\n this.removeValue(ctx, scheduleValue);\n }\n}\n/** Updates the schedule kind assumed to be active for user in the cache */\nfunction setUserCodeScheduleKindCached(ctx: GetValueDB, endpoint: EndpointId, userId: number, scheduleKind: ScheduleEntryLockScheduleKind): void {\n ctx.getValueDB(endpoint.nodeId).setValue(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index), scheduleKind);\n}\n/** Updates whether scheduling is active for one or all user(s) in the cache */\nfunction setUserCodeScheduleEnabledCached(ctx: GetValueDB, endpoint: EndpointId, userId: number | undefined, enabled: boolean): void {\n const setEnabled = (userId: number) => {\n ctx.getValueDB(endpoint.nodeId).setValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index), enabled);\n };\n if (userId == undefined) {\n // Enable/disable all users\n const numUsers = UserCodeCC.getSupportedUsersCached(ctx, endpoint) ?? 0;\n for (let userId = 1; userId <= numUsers; userId++) {\n setEnabled(userId);\n }\n }\n else {\n setEnabled(userId);\n }\n}\n@API(CommandClasses[\"Schedule Entry Lock\"])\nexport class ScheduleEntryLockCCAPI extends CCAPI {\n public supportsCommand(cmd: ScheduleEntryLockCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case ScheduleEntryLockCommand.EnableSet:\n case ScheduleEntryLockCommand.EnableAllSet:\n case ScheduleEntryLockCommand.WeekDayScheduleSet:\n case ScheduleEntryLockCommand.WeekDayScheduleGet:\n case ScheduleEntryLockCommand.YearDayScheduleSet:\n case ScheduleEntryLockCommand.YearDayScheduleGet:\n case ScheduleEntryLockCommand.SupportedGet:\n return true; // V1\n case ScheduleEntryLockCommand.TimeOffsetSet:\n case ScheduleEntryLockCommand.TimeOffsetGet:\n return this.version >= 2;\n case ScheduleEntryLockCommand.DailyRepeatingScheduleSet:\n case ScheduleEntryLockCommand.DailyRepeatingScheduleGet:\n return this.version >= 3;\n }\n return super.supportsCommand(cmd);\n }\n /**\n * Enables or disables schedules. If a user ID is given, that user's\n * schedules will be enabled or disabled. If no user ID is given, all schedules\n * will be affected.\n */\n @validateArgs_ScheduleEntryLockCCAPI_setEnabled()\n public async setEnabled(enabled: boolean, userId?: number): Promise<SupervisionResult | undefined> {\n let result: SupervisionResult | undefined;\n if (userId != undefined) {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableSet);\n const cc = new ScheduleEntryLockCCEnableSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n userId,\n enabled,\n });\n result = await this.host.sendCommand(cc, this.commandOptions);\n }\n else {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.EnableAllSet);\n const cc = new ScheduleEntryLockCCEnableAllSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n enabled,\n });\n result = await this.host.sendCommand(cc, this.commandOptions);\n }\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Remember the new state in the cache\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, userId, enabled);\n }\n return result;\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getNumSlots() {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.SupportedGet);\n const cc = new ScheduleEntryLockCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCSupportedReport>(cc, this.commandOptions);\n if (result) {\n return pick(result, [\n \"numWeekDaySlots\",\n \"numYearDaySlots\",\n \"numDailyRepeatingSlots\",\n ]);\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setWeekDaySchedule()\n public async setWeekDaySchedule(slot: ScheduleEntryLockSlotId, schedule?: ScheduleEntryLockWeekDaySchedule): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);\n if (this.isSinglecast()) {\n const numSlots = ScheduleEntryLockCC.getNumWeekDaySlotsCached(this.host, this.endpoint);\n if (slot.slotId < 1 || slot.slotId > numSlots) {\n throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-week slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n if (schedule) {\n if (schedule.stopHour < schedule.startHour\n || (schedule.stopHour === schedule.startHour\n && schedule.stopMinute <= schedule.startMinute)) {\n throw new ZWaveError(`The stop time must be after the start time.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n const cc = new ScheduleEntryLockCCWeekDayScheduleSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n ...(schedule\n ? {\n action: ScheduleEntryLockSetAction.Set,\n ...schedule,\n }\n : {\n action: ScheduleEntryLockSetAction.Erase,\n }),\n });\n const result = await this.host.sendCommand(cc, this.commandOptions);\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Editing (but not erasing) a schedule will enable scheduling for that user\n // and switch it to the current scheduling kind\n if (!!schedule) {\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);\n setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.WeekDay);\n }\n // And cache the schedule\n persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.WeekDay, slot.userId, slot.slotId, schedule ?? false);\n }\n return result;\n }\n @validateArgs_ScheduleEntryLockCCAPI_getWeekDaySchedule()\n public async getWeekDaySchedule(slot: ScheduleEntryLockSlotId): Promise<MaybeNotKnown<ScheduleEntryLockWeekDaySchedule>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.WeekDayScheduleSet);\n const cc = new ScheduleEntryLockCCWeekDayScheduleGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCWeekDayScheduleReport>(cc, this.commandOptions);\n if (result?.weekday != undefined) {\n return {\n weekday: result.weekday,\n startHour: result.startHour!,\n startMinute: result.startMinute!,\n stopHour: result.stopHour!,\n stopMinute: result.stopMinute!,\n };\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setYearDaySchedule()\n public async setYearDaySchedule(slot: ScheduleEntryLockSlotId, schedule?: ScheduleEntryLockYearDaySchedule): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);\n if (this.isSinglecast()) {\n const numSlots = ScheduleEntryLockCC.getNumYearDaySlotsCached(this.host, this.endpoint);\n if (slot.slotId < 1 || slot.slotId > numSlots) {\n throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-year slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n if (schedule) {\n const startDate = new Date(schedule.startYear, schedule.startMonth - 1, schedule.startDay, schedule.startHour, schedule.startMinute);\n const stopDate = new Date(schedule.stopYear, schedule.stopMonth - 1, schedule.stopDay, schedule.stopHour, schedule.stopMinute);\n if (stopDate <= startDate) {\n throw new ZWaveError(`The stop date must be after the start date.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n const cc = new ScheduleEntryLockCCYearDayScheduleSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n ...(schedule\n ? {\n action: ScheduleEntryLockSetAction.Set,\n ...schedule,\n }\n : {\n action: ScheduleEntryLockSetAction.Erase,\n }),\n });\n const result = await this.host.sendCommand(cc, this.commandOptions);\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Editing (but not erasing) a schedule will enable scheduling for that user\n // and switch it to the current scheduling kind\n if (!!schedule) {\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);\n setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.YearDay);\n }\n // And cache the schedule\n persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.YearDay, slot.userId, slot.slotId, schedule ?? false);\n }\n return result;\n }\n @validateArgs_ScheduleEntryLockCCAPI_getYearDaySchedule()\n public async getYearDaySchedule(slot: ScheduleEntryLockSlotId): Promise<MaybeNotKnown<ScheduleEntryLockYearDaySchedule>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.YearDayScheduleSet);\n const cc = new ScheduleEntryLockCCYearDayScheduleGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCYearDayScheduleReport>(cc, this.commandOptions);\n if (result?.startYear != undefined) {\n return {\n startYear: result.startYear,\n startMonth: result.startMonth!,\n startDay: result.startDay!,\n startHour: result.startHour!,\n startMinute: result.startMinute!,\n stopYear: result.stopYear!,\n stopMonth: result.stopMonth!,\n stopDay: result.stopDay!,\n stopHour: result.stopHour!,\n stopMinute: result.stopMinute!,\n };\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setDailyRepeatingSchedule()\n public async setDailyRepeatingSchedule(slot: ScheduleEntryLockSlotId, schedule?: ScheduleEntryLockDailyRepeatingSchedule): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);\n if (this.isSinglecast()) {\n const numSlots = ScheduleEntryLockCC.getNumDailyRepeatingSlotsCached(this.host, this.endpoint);\n if (slot.slotId < 1 || slot.slotId > numSlots) {\n throw new ZWaveError(`The schedule slot # must be between 1 and the number of supported daily repeating slots ${numSlots}.`, ZWaveErrorCodes.Argument_Invalid);\n }\n }\n const cc = new ScheduleEntryLockCCDailyRepeatingScheduleSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n ...(schedule\n ? {\n action: ScheduleEntryLockSetAction.Set,\n ...schedule,\n }\n : {\n action: ScheduleEntryLockSetAction.Erase,\n }),\n });\n const result = await this.host.sendCommand(cc, this.commandOptions);\n if (this.isSinglecast() && isUnsupervisedOrSucceeded(result)) {\n // Editing (but not erasing) a schedule will enable scheduling for that user\n // and switch it to the current scheduling kind\n if (!!schedule) {\n setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);\n setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, ScheduleEntryLockScheduleKind.DailyRepeating);\n }\n // And cache the schedule\n persistSchedule.call(cc, this.host, ScheduleEntryLockScheduleKind.DailyRepeating, slot.userId, slot.slotId, schedule ?? false);\n }\n return result;\n }\n @validateArgs_ScheduleEntryLockCCAPI_getDailyRepeatingSchedule()\n public async getDailyRepeatingSchedule(slot: ScheduleEntryLockSlotId): Promise<MaybeNotKnown<ScheduleEntryLockDailyRepeatingSchedule>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.DailyRepeatingScheduleSet);\n const cc = new ScheduleEntryLockCCDailyRepeatingScheduleGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...slot,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCDailyRepeatingScheduleReport>(cc, this.commandOptions);\n if (result?.weekdays != undefined) {\n return {\n weekdays: result.weekdays,\n startHour: result.startHour!,\n startMinute: result.startMinute!,\n durationHour: result.durationHour!,\n durationMinute: result.durationMinute!,\n };\n }\n }\n public async getTimezone(): Promise<MaybeNotKnown<Timezone>> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetGet);\n const cc = new ScheduleEntryLockCCTimeOffsetGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const result = await this.host.sendCommand<ScheduleEntryLockCCTimeOffsetReport>(cc, this.commandOptions);\n if (result) {\n return pick(result, [\"standardOffset\", \"dstOffset\"]);\n }\n }\n @validateArgs_ScheduleEntryLockCCAPI_setTimezone()\n public async setTimezone(timezone: Timezone): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(ScheduleEntryLockCommand, ScheduleEntryLockCommand.TimeOffsetSet);\n const cc = new ScheduleEntryLockCCTimeOffsetSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n ...timezone,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses[\"Schedule Entry Lock\"])\n@implementedVersion(3)\n@ccValues(ScheduleEntryLockCCValues)\nexport class ScheduleEntryLockCC extends CommandClass {\n declare ccCommand: ScheduleEntryLockCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Schedule Entry Lock\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported number of schedule slots...\",\n direction: \"outbound\",\n });\n const slotsResp = await api.getNumSlots();\n if (slotsResp) {\n let logMessage = `received supported number of schedule slots:\nday of week: ${slotsResp.numWeekDaySlots}\nday of year: ${slotsResp.numYearDaySlots}`;\n if (slotsResp.numDailyRepeatingSlots != undefined) {\n logMessage += `\ndaily repeating: ${slotsResp.numDailyRepeatingSlots}`;\n }\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n // If the timezone is not configured with the Time CC, do it here\n if (api.supportsCommand(ScheduleEntryLockCommand.TimeOffsetSet)\n && (!endpoint.supportsCC(CommandClasses.Time)\n || endpoint.getCCVersion(CommandClasses.Time) < 2)) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"setting timezone information...\",\n direction: \"outbound\",\n });\n // Set the correct timezone on this node\n const timezone = getDSTInfo();\n await api.setTimezone(timezone);\n }\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n /**\n * Returns the number of supported day-of-week slots.\n * This only works AFTER the interview process\n */\n public static getNumWeekDaySlotsCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return (ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.numWeekDaySlots.endpoint(endpoint.index)) || 0);\n }\n /**\n * Returns the number of supported day-of-year slots.\n * This only works AFTER the interview process\n */\n public static getNumYearDaySlotsCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return (ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.numYearDaySlots.endpoint(endpoint.index)) || 0);\n }\n /**\n * Returns the number of supported daily-repeating slots.\n * This only works AFTER the interview process\n */\n public static getNumDailyRepeatingSlotsCached(ctx: GetValueDB, endpoint: EndpointId): number {\n return (ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.numDailyRepeatingSlots.endpoint(endpoint.index)) || 0);\n }\n /**\n * Returns whether scheduling for a given user ID (most likely) enabled. Since the Schedule Entry Lock CC\n * provides no way to query the enabled state, Z-Wave JS tracks this in its own cache.\n *\n * This only works AFTER the interview process and is likely to be wrong if a device\n * with existing schedules is queried. To be sure, disable scheduling for all users and enable\n * only the desired ones.\n */\n public static getUserCodeScheduleEnabledCached(ctx: GetValueDB, endpoint: EndpointId, userId: number): boolean {\n return !!ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index));\n }\n /**\n * Returns which scheduling kind is (most likely) enabled for a given user ID . Since the Schedule Entry Lock CC\n * provides no way to query the current state, Z-Wave JS tracks this in its own cache.\n *\n * This only works AFTER the interview process and is likely to be wrong if a device\n * with existing schedules is queried. To be sure, edit a schedule of the desired kind\n * which will automatically switch the user to that scheduling kind.\n */\n public static getUserCodeScheduleKindCached(ctx: GetValueDB, endpoint: EndpointId, userId: number): MaybeNotKnown<ScheduleEntryLockScheduleKind> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue<ScheduleEntryLockScheduleKind>(ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index));\n }\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind.WeekDay, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockWeekDaySchedule | false>;\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind.YearDay, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockYearDaySchedule | false>;\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind.DailyRepeating, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockDailyRepeatingSchedule | false>;\n // Catch-all overload for applications which haven't narrowed `scheduleKind`\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockWeekDaySchedule | ScheduleEntryLockYearDaySchedule | ScheduleEntryLockDailyRepeatingSchedule | false>;\n /**\n * Returns the assumed state of a schedule. Since the Schedule Entry Lock CC\n * provides no way to query the current state, Z-Wave JS tracks this in its own cache.\n *\n * A return value of `false` means the slot is empty, a return value of `undefined` means the information is not cached yet.\n *\n * This only works AFTER the interview process.\n */\n public static getScheduleCached(ctx: GetValueDB, endpoint: EndpointId, scheduleKind: ScheduleEntryLockScheduleKind, userId: number, slotId: number): MaybeNotKnown<ScheduleEntryLockWeekDaySchedule | ScheduleEntryLockYearDaySchedule | ScheduleEntryLockDailyRepeatingSchedule | false> {\n return ctx\n .getValueDB(endpoint.nodeId)\n .getValue(ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId).endpoint(endpoint.index));\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCEnableSetOptions {\n userId: number;\n enabled: boolean;\n}\n@CCCommand(ScheduleEntryLockCommand.EnableSet)\n@useSupervision()\nexport class ScheduleEntryLockCCEnableSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCEnableSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.enabled = options.enabled;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCEnableSet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const enabled: boolean = raw.payload[1] === 0x01;\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n enabled,\n });\n }\n public userId: number;\n public enabled: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.enabled ? 0x01 : 0x00]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n action: this.enabled ? \"enable\" : \"disable\",\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCEnableAllSetOptions {\n enabled: boolean;\n}\n@CCCommand(ScheduleEntryLockCommand.EnableAllSet)\n@useSupervision()\nexport class ScheduleEntryLockCCEnableAllSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCEnableAllSetOptions>) {\n super(options);\n this.enabled = options.enabled;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCEnableAllSet {\n validatePayload(raw.payload.length >= 1);\n const enabled: boolean = raw.payload[0] === 0x01;\n return new this({\n nodeId: ctx.sourceNodeId,\n enabled,\n });\n }\n public enabled: boolean;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.enabled ? 0x01 : 0x00]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n action: this.enabled ? \"enable all\" : \"disable all\",\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCSupportedReportOptions {\n numWeekDaySlots: number;\n numYearDaySlots: number;\n numDailyRepeatingSlots?: number;\n}\n@CCCommand(ScheduleEntryLockCommand.SupportedReport)\n@ccValueProperty(\"numWeekDaySlots\", ScheduleEntryLockCCValues.numWeekDaySlots)\n@ccValueProperty(\"numYearDaySlots\", ScheduleEntryLockCCValues.numYearDaySlots)\n@ccValueProperty(\"numDailyRepeatingSlots\", ScheduleEntryLockCCValues.numDailyRepeatingSlots)\nexport class ScheduleEntryLockCCSupportedReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCSupportedReportOptions>) {\n super(options);\n this.numWeekDaySlots = options.numWeekDaySlots;\n this.numYearDaySlots = options.numYearDaySlots;\n this.numDailyRepeatingSlots = options.numDailyRepeatingSlots;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCSupportedReport {\n validatePayload(raw.payload.length >= 2);\n const numWeekDaySlots = raw.payload[0];\n const numYearDaySlots = raw.payload[1];\n let numDailyRepeatingSlots: number | undefined;\n if (raw.payload.length >= 3) {\n numDailyRepeatingSlots = raw.payload[2];\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n numWeekDaySlots,\n numYearDaySlots,\n numDailyRepeatingSlots,\n });\n }\n public numWeekDaySlots: number;\n public numYearDaySlots: number;\n public numDailyRepeatingSlots: number | undefined;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.numWeekDaySlots,\n this.numYearDaySlots,\n this.numDailyRepeatingSlots ?? 0,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const message: MessageRecord = {\n \"no. of weekday schedule slots\": this.numWeekDaySlots,\n \"no. of day-of-year schedule slots\": this.numYearDaySlots,\n };\n if (this.numDailyRepeatingSlots != undefined) {\n message[\"no. of daily repeating schedule slots\"] =\n this.numDailyRepeatingSlots;\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n@CCCommand(ScheduleEntryLockCommand.SupportedGet)\n@expectedCCResponse(ScheduleEntryLockCCSupportedReport)\nexport class ScheduleEntryLockCCSupportedGet extends ScheduleEntryLockCC {\n}\n/** @publicAPI */\nexport type ScheduleEntryLockCCWeekDayScheduleSetOptions = ScheduleEntryLockSlotId & ({\n action: ScheduleEntryLockSetAction.Erase;\n} | ({\n action: ScheduleEntryLockSetAction.Set;\n} & ScheduleEntryLockWeekDaySchedule));\n@CCCommand(ScheduleEntryLockCommand.WeekDayScheduleSet)\n@useSupervision()\nexport class ScheduleEntryLockCCWeekDayScheduleSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCWeekDayScheduleSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.action = options.action;\n if (options.action === ScheduleEntryLockSetAction.Set) {\n this.weekday = options.weekday;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCWeekDayScheduleSet {\n validatePayload(raw.payload.length >= 3);\n const action: ScheduleEntryLockSetAction = raw.payload[0];\n validatePayload(action === ScheduleEntryLockSetAction.Set\n || action === ScheduleEntryLockSetAction.Erase);\n const userId = raw.payload[1];\n const slotId = raw.payload[2];\n if (action !== ScheduleEntryLockSetAction.Set) {\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n });\n }\n validatePayload(raw.payload.length >= 8);\n const weekday: ScheduleEntryLockWeekday = raw.payload[3];\n const startHour = raw.payload[4];\n const startMinute = raw.payload[5];\n const stopHour = raw.payload[6];\n const stopMinute = raw.payload[7];\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n weekday,\n startHour,\n startMinute,\n stopHour,\n stopMinute,\n });\n }\n public userId: number;\n public slotId: number;\n public action: ScheduleEntryLockSetAction;\n public weekday?: ScheduleEntryLockWeekday;\n public startHour?: number;\n public startMinute?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.action,\n this.userId,\n this.slotId,\n // The report should have these fields set to 0xff\n // if the slot is erased. The specs don't mention anything\n // for the Set command, so we just assume the same is okay\n this.weekday ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.action === ScheduleEntryLockSetAction.Erase) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"erase\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday!),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n \"end time\": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCWeekDayScheduleReportOptions = ScheduleEntryLockSlotId & AllOrNone<ScheduleEntryLockWeekDaySchedule>;\n@CCCommand(ScheduleEntryLockCommand.WeekDayScheduleReport)\nexport class ScheduleEntryLockCCWeekDayScheduleReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCWeekDayScheduleReportOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.weekday = options.weekday;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCWeekDayScheduleReport {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n let ccOptions: ScheduleEntryLockCCWeekDayScheduleReportOptions = {\n userId,\n slotId,\n };\n let weekday: ScheduleEntryLockWeekday | undefined;\n let startHour: number | undefined;\n let startMinute: number | undefined;\n let stopHour: number | undefined;\n let stopMinute: number | undefined;\n if (raw.payload.length >= 7) {\n if (raw.payload[2] !== 0xff) {\n weekday = raw.payload[2];\n }\n if (raw.payload[3] !== 0xff) {\n startHour = raw.payload[3];\n }\n if (raw.payload[4] !== 0xff) {\n startMinute = raw.payload[4];\n }\n if (raw.payload[5] !== 0xff) {\n stopHour = raw.payload[5];\n }\n if (raw.payload[6] !== 0xff) {\n stopMinute = raw.payload[6];\n }\n }\n validatePayload(weekday == undefined\n || weekday <= ScheduleEntryLockWeekday.Saturday, startHour == undefined || startHour <= 23, startMinute == undefined || startMinute <= 59, stopHour == undefined || stopHour <= 23, stopMinute == undefined || stopMinute <= 59);\n if (weekday != undefined\n && startHour != undefined\n && startMinute != undefined\n && stopHour != undefined\n && stopMinute != undefined) {\n ccOptions = {\n ...ccOptions,\n weekday,\n startHour,\n startMinute,\n stopHour,\n stopMinute,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n ...ccOptions,\n });\n }\n public userId: number;\n public slotId: number;\n public weekday?: ScheduleEntryLockWeekday;\n public startHour?: number;\n public startMinute?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.WeekDay, this.userId, this.slotId, this.weekday != undefined\n ? {\n weekday: this.weekday,\n startHour: this.startHour!,\n startMinute: this.startMinute!,\n stopHour: this.stopHour!,\n stopMinute: this.stopMinute!,\n }\n : false);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.userId,\n this.slotId,\n this.weekday ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.weekday == undefined) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n schedule: \"(empty)\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n weekday: getEnumMemberName(ScheduleEntryLockWeekday, this.weekday),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n \"end time\": formatTime(this.stopHour ?? 0, this.stopMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCWeekDayScheduleGetOptions = ScheduleEntryLockSlotId;\n@CCCommand(ScheduleEntryLockCommand.WeekDayScheduleGet)\n@expectedCCResponse(ScheduleEntryLockCCWeekDayScheduleReport)\nexport class ScheduleEntryLockCCWeekDayScheduleGet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCWeekDayScheduleGetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCWeekDayScheduleGet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n public userId: number;\n public slotId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n },\n };\n }\n}\n/** @publicAPI */\nexport type ScheduleEntryLockCCYearDayScheduleSetOptions = ScheduleEntryLockSlotId & ({\n action: ScheduleEntryLockSetAction.Erase;\n} | ({\n action: ScheduleEntryLockSetAction.Set;\n} & ScheduleEntryLockYearDaySchedule));\n@CCCommand(ScheduleEntryLockCommand.YearDayScheduleSet)\n@useSupervision()\nexport class ScheduleEntryLockCCYearDayScheduleSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCYearDayScheduleSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.action = options.action;\n if (options.action === ScheduleEntryLockSetAction.Set) {\n this.startYear = options.startYear;\n this.startMonth = options.startMonth;\n this.startDay = options.startDay;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopYear = options.stopYear;\n this.stopMonth = options.stopMonth;\n this.stopDay = options.stopDay;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCYearDayScheduleSet {\n validatePayload(raw.payload.length >= 3);\n const action: ScheduleEntryLockSetAction = raw.payload[0];\n validatePayload(action === ScheduleEntryLockSetAction.Set\n || action === ScheduleEntryLockSetAction.Erase);\n const userId = raw.payload[1];\n const slotId = raw.payload[2];\n if (action !== ScheduleEntryLockSetAction.Set) {\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n });\n }\n validatePayload(raw.payload.length >= 13);\n const startYear = raw.payload[3];\n const startMonth = raw.payload[4];\n const startDay = raw.payload[5];\n const startHour = raw.payload[6];\n const startMinute = raw.payload[7];\n const stopYear = raw.payload[8];\n const stopMonth = raw.payload[9];\n const stopDay = raw.payload[10];\n const stopHour = raw.payload[11];\n const stopMinute = raw.payload[12];\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n startYear,\n startMonth,\n startDay,\n startHour,\n startMinute,\n stopYear,\n stopMonth,\n stopDay,\n stopHour,\n stopMinute,\n });\n }\n public userId: number;\n public slotId: number;\n public action: ScheduleEntryLockSetAction;\n public startYear?: number;\n public startMonth?: number;\n public startDay?: number;\n public startHour?: number;\n public startMinute?: number;\n public stopYear?: number;\n public stopMonth?: number;\n public stopDay?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.action,\n this.userId,\n this.slotId,\n // The report should have these fields set to 0xff\n // if the slot is erased. The specs don't mention anything\n // for the Set command, so we just assume the same is okay\n this.startYear ?? 0xff,\n this.startMonth ?? 0xff,\n this.startDay ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopYear ?? 0xff,\n this.stopMonth ?? 0xff,\n this.stopDay ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.action === ScheduleEntryLockSetAction.Erase) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"erase\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n \"start date\": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,\n \"end date\": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCYearDayScheduleReportOptions = ScheduleEntryLockSlotId & AllOrNone<ScheduleEntryLockYearDaySchedule>;\n@CCCommand(ScheduleEntryLockCommand.YearDayScheduleReport)\nexport class ScheduleEntryLockCCYearDayScheduleReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCYearDayScheduleReportOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.startYear = options.startYear;\n this.startMonth = options.startMonth;\n this.startDay = options.startDay;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.stopYear = options.stopYear;\n this.stopMonth = options.stopMonth;\n this.stopDay = options.stopDay;\n this.stopHour = options.stopHour;\n this.stopMinute = options.stopMinute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCYearDayScheduleReport {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n let ccOptions: ScheduleEntryLockCCYearDayScheduleReportOptions = {\n userId,\n slotId,\n };\n let startYear: number | undefined;\n let startMonth: number | undefined;\n let startDay: number | undefined;\n let startHour: number | undefined;\n let startMinute: number | undefined;\n let stopYear: number | undefined;\n let stopMonth: number | undefined;\n let stopDay: number | undefined;\n let stopHour: number | undefined;\n let stopMinute: number | undefined;\n if (raw.payload.length >= 12) {\n if (raw.payload[2] !== 0xff) {\n startYear = raw.payload[2];\n }\n if (raw.payload[3] !== 0xff) {\n startMonth = raw.payload[3];\n }\n if (raw.payload[4] !== 0xff) {\n startDay = raw.payload[4];\n }\n if (raw.payload[5] !== 0xff) {\n startHour = raw.payload[5];\n }\n if (raw.payload[6] !== 0xff) {\n startMinute = raw.payload[6];\n }\n if (raw.payload[7] !== 0xff) {\n stopYear = raw.payload[7];\n }\n if (raw.payload[8] !== 0xff) {\n stopMonth = raw.payload[8];\n }\n if (raw.payload[9] !== 0xff) {\n stopDay = raw.payload[9];\n }\n if (raw.payload[10] !== 0xff) {\n stopHour = raw.payload[10];\n }\n if (raw.payload[11] !== 0xff) {\n stopMinute = raw.payload[11];\n }\n }\n validatePayload(startMonth == undefined || (startMonth >= 1 && startMonth <= 12), startDay == undefined || (startDay >= 1 && startDay <= 31), startHour == undefined || startHour <= 23, startMinute == undefined || startMinute <= 59, stopMonth == undefined || (stopMonth >= 1 && stopMonth <= 12), stopDay == undefined || (stopDay >= 1 && stopDay <= 31), stopHour == undefined || stopHour <= 23, stopMinute == undefined || stopMinute <= 59);\n if (startYear != undefined\n && startMonth != undefined\n && startDay != undefined\n && startHour != undefined\n && startMinute != undefined\n && stopYear != undefined\n && stopMonth != undefined\n && stopDay != undefined\n && stopHour != undefined\n && stopMinute != undefined) {\n ccOptions = {\n ...ccOptions,\n startYear,\n startMonth,\n startDay,\n startHour,\n startMinute,\n stopYear,\n stopMonth,\n stopDay,\n stopHour,\n stopMinute,\n };\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n ...ccOptions,\n });\n }\n public userId: number;\n public slotId: number;\n public startYear?: number;\n public startMonth?: number;\n public startDay?: number;\n public startHour?: number;\n public startMinute?: number;\n public stopYear?: number;\n public stopMonth?: number;\n public stopDay?: number;\n public stopHour?: number;\n public stopMinute?: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.YearDay, this.userId, this.slotId, this.startYear != undefined\n ? {\n startYear: this.startYear,\n startMonth: this.startMonth!,\n startDay: this.startDay!,\n startHour: this.startHour!,\n startMinute: this.startMinute!,\n stopYear: this.stopYear!,\n stopMonth: this.stopMonth!,\n stopDay: this.stopDay!,\n stopHour: this.stopHour!,\n stopMinute: this.stopMinute!,\n }\n : false);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.userId,\n this.slotId,\n this.startYear ?? 0xff,\n this.startMonth ?? 0xff,\n this.startDay ?? 0xff,\n this.startHour ?? 0xff,\n this.startMinute ?? 0xff,\n this.stopYear ?? 0xff,\n this.stopMonth ?? 0xff,\n this.stopDay ?? 0xff,\n this.stopHour ?? 0xff,\n this.stopMinute ?? 0xff,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.startYear !== undefined) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n schedule: \"(empty)\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n \"start date\": `${formatDate(this.startYear ?? 0, this.startMonth ?? 0, this.startDay ?? 0)} ${formatTime(this.startHour ?? 0, this.startMinute ?? 0)}`,\n \"end date\": `${formatDate(this.stopYear ?? 0, this.stopMonth ?? 0, this.stopDay ?? 0)} ${formatTime(this.stopHour ?? 0, this.stopMinute ?? 0)}`,\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCYearDayScheduleGetOptions = ScheduleEntryLockSlotId;\n@CCCommand(ScheduleEntryLockCommand.YearDayScheduleGet)\n@expectedCCResponse(ScheduleEntryLockCCYearDayScheduleReport)\nexport class ScheduleEntryLockCCYearDayScheduleGet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCYearDayScheduleGetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCYearDayScheduleGet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n public userId: number;\n public slotId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCTimeOffsetSetOptions {\n standardOffset: number;\n dstOffset: number;\n}\n@CCCommand(ScheduleEntryLockCommand.TimeOffsetSet)\n@useSupervision()\nexport class ScheduleEntryLockCCTimeOffsetSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCTimeOffsetSetOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCTimeOffsetSet {\n const { standardOffset, dstOffset } = parseTimezone(raw.payload);\n return new this({\n nodeId: ctx.sourceNodeId,\n standardOffset,\n dstOffset,\n });\n }\n public standardOffset: number;\n public dstOffset: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n });\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"standard time offset\": `${this.standardOffset} minutes`,\n \"DST offset\": `${this.dstOffset} minutes`,\n },\n };\n }\n}\n// @publicAPI\nexport interface ScheduleEntryLockCCTimeOffsetReportOptions {\n standardOffset: number;\n dstOffset: number;\n}\n@CCCommand(ScheduleEntryLockCommand.TimeOffsetReport)\nexport class ScheduleEntryLockCCTimeOffsetReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCTimeOffsetReportOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCTimeOffsetReport {\n const { standardOffset, dstOffset } = parseTimezone(raw.payload);\n return new this({\n nodeId: ctx.sourceNodeId,\n standardOffset,\n dstOffset,\n });\n }\n public standardOffset: number;\n public dstOffset: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n });\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"standard time offset\": `${this.standardOffset} minutes`,\n \"DST offset\": `${this.dstOffset} minutes`,\n },\n };\n }\n}\n@CCCommand(ScheduleEntryLockCommand.TimeOffsetGet)\n@expectedCCResponse(ScheduleEntryLockCCTimeOffsetReport)\nexport class ScheduleEntryLockCCTimeOffsetGet extends ScheduleEntryLockCC {\n}\n/** @publicAPI */\nexport type ScheduleEntryLockCCDailyRepeatingScheduleSetOptions = ScheduleEntryLockSlotId & ({\n action: ScheduleEntryLockSetAction.Erase;\n} | ({\n action: ScheduleEntryLockSetAction.Set;\n} & ScheduleEntryLockDailyRepeatingSchedule));\n@CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleSet)\n@useSupervision()\nexport class ScheduleEntryLockCCDailyRepeatingScheduleSet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCDailyRepeatingScheduleSetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.action = options.action;\n if (options.action === ScheduleEntryLockSetAction.Set) {\n this.weekdays = options.weekdays;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.durationHour = options.durationHour;\n this.durationMinute = options.durationMinute;\n }\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCDailyRepeatingScheduleSet {\n validatePayload(raw.payload.length >= 3);\n const action: ScheduleEntryLockSetAction = raw.payload[0];\n validatePayload(action === ScheduleEntryLockSetAction.Set\n || action === ScheduleEntryLockSetAction.Erase);\n const userId = raw.payload[1];\n const slotId = raw.payload[2];\n if (action !== ScheduleEntryLockSetAction.Set) {\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n });\n }\n validatePayload(raw.payload.length >= 8);\n const weekdays: ScheduleEntryLockWeekday[] = parseBitMask(raw.payload.subarray(3, 4), ScheduleEntryLockWeekday.Sunday);\n const startHour = raw.payload[4];\n const startMinute = raw.payload[5];\n const durationHour = raw.payload[6];\n const durationMinute = raw.payload[7];\n return new this({\n nodeId: ctx.sourceNodeId,\n action,\n userId,\n slotId,\n weekdays,\n startHour,\n startMinute,\n durationHour,\n durationMinute,\n });\n }\n public userId: number;\n public slotId: number;\n public action: ScheduleEntryLockSetAction;\n public weekdays?: ScheduleEntryLockWeekday[];\n public startHour?: number;\n public startMinute?: number;\n public durationHour?: number;\n public durationMinute?: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.action, this.userId, this.slotId]);\n if (this.action === ScheduleEntryLockSetAction.Set) {\n this.payload = Bytes.concat([\n this.payload,\n encodeBitMask(this.weekdays!, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),\n [\n this.startHour!,\n this.startMinute!,\n this.durationHour!,\n this.durationMinute!,\n ],\n ]);\n }\n else {\n // Not sure if this is correct\n this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0xff)]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (this.action === ScheduleEntryLockSetAction.Erase) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"erase\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n weekdays: this.weekdays!.map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w)).join(\", \"),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCDailyRepeatingScheduleReportOptions = ScheduleEntryLockSlotId & AllOrNone<ScheduleEntryLockDailyRepeatingSchedule>;\n@CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleReport)\nexport class ScheduleEntryLockCCDailyRepeatingScheduleReport extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCDailyRepeatingScheduleReportOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n this.weekdays = options.weekdays;\n this.startHour = options.startHour;\n this.startMinute = options.startMinute;\n this.durationHour = options.durationHour;\n this.durationMinute = options.durationMinute;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCDailyRepeatingScheduleReport {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n if (raw.payload.length >= 7 && raw.payload[2] !== 0) {\n // Only parse the schedule if it is present and some weekday is selected\n const weekdays: ScheduleEntryLockWeekday[] = parseBitMask(raw.payload.subarray(2, 3), ScheduleEntryLockWeekday.Sunday);\n const startHour = raw.payload[3];\n const startMinute = raw.payload[4];\n const durationHour = raw.payload[5];\n const durationMinute = raw.payload[6];\n validatePayload(startHour <= 23, startMinute <= 59, durationHour <= 23, durationMinute <= 59);\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n weekdays,\n startHour,\n startMinute,\n durationHour,\n durationMinute,\n });\n }\n else {\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n }\n public userId: number;\n public slotId: number;\n public weekdays?: ScheduleEntryLockWeekday[];\n public startHour?: number;\n public startMinute?: number;\n public durationHour?: number;\n public durationMinute?: number;\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n persistSchedule.call(this, ctx, ScheduleEntryLockScheduleKind.DailyRepeating, this.userId, this.slotId, this.weekdays?.length\n ? {\n weekdays: this.weekdays,\n startHour: this.startHour!,\n startMinute: this.startMinute!,\n durationHour: this.durationHour!,\n durationMinute: this.durationMinute!,\n }\n : false);\n return true;\n }\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n if (this.weekdays) {\n this.payload = Bytes.concat([\n this.payload,\n encodeBitMask(this.weekdays, ScheduleEntryLockWeekday.Saturday, ScheduleEntryLockWeekday.Sunday),\n [\n this.startHour!,\n this.startMinute!,\n this.durationHour!,\n this.durationMinute!,\n ],\n ]);\n }\n else {\n // Not sure if this is correct, but at least we won't parse it incorrectly ourselves when setting everything to 0\n this.payload = Bytes.concat([this.payload, Bytes.alloc(5, 0)]);\n }\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n let message: MessageRecord;\n if (!this.weekdays) {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n schedule: \"(empty)\",\n };\n }\n else {\n message = {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n action: \"set\",\n weekdays: this.weekdays\n .map((w) => getEnumMemberName(ScheduleEntryLockWeekday, w))\n .join(\", \"),\n \"start time\": formatTime(this.startHour ?? 0, this.startMinute ?? 0),\n duration: formatTime(this.durationHour ?? 0, this.durationMinute ?? 0),\n };\n }\n return {\n ...super.toLogEntry(ctx),\n message,\n };\n }\n}\n// @publicAPI\nexport type ScheduleEntryLockCCDailyRepeatingScheduleGetOptions = ScheduleEntryLockSlotId;\n@CCCommand(ScheduleEntryLockCommand.DailyRepeatingScheduleGet)\n@expectedCCResponse(ScheduleEntryLockCCDailyRepeatingScheduleReport)\nexport class ScheduleEntryLockCCDailyRepeatingScheduleGet extends ScheduleEntryLockCC {\n public constructor(options: WithAddress<ScheduleEntryLockCCDailyRepeatingScheduleGetOptions>) {\n super(options);\n this.userId = options.userId;\n this.slotId = options.slotId;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): ScheduleEntryLockCCDailyRepeatingScheduleGet {\n validatePayload(raw.payload.length >= 2);\n const userId = raw.payload[0];\n const slotId = raw.payload[1];\n return new this({\n nodeId: ctx.sourceNodeId,\n userId,\n slotId,\n });\n }\n public userId: number;\n public slotId: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.userId, this.slotId]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"user ID\": this.userId,\n \"slot #\": this.slotId,\n },\n };\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAiT;AACjT,oBAAwF;AACxF,iBAAsB;AACtB,0BAA4F;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AAU,CAAC;AACvC,YAAM,SAAS,IAAI,QAAQ,CAAC;AAC5B,YAAM,SAAS,IAAI,QAAQ,CAAC;AAC5B,aAAO,IAAI,KAAK;QACZ,QAAQ,IAAI;QACZ;QACA;OACH;IACL;IACO;IACA;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,QAAQ,KAAK,MAAM,CAAC;AACpD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,WAAW,KAAK;UAChB,UAAU,KAAK;;;IAG3B;;;;",
6
6
  "names": ["userId"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, SecurityClass, type SecurityManagers, type WithAddress } from "@zwave-js/core";
2
2
  import { Bytes, type BytesView } from "@zwave-js/shared";
3
3
  import { CCAPI } from "../lib/API.js";
4
- import { type CCRaw, CommandClass, type InterviewContext } from "../lib/CommandClass.js";
4
+ import { type CCRaw, CommandClass, CommandRelation, type InterviewContext } from "../lib/CommandClass.js";
5
5
  import { Security2Extension } from "../lib/Security2/Extension.js";
6
6
  import { ECDHProfiles, KEXFailType, KEXSchemes } from "../lib/Security2/shared.js";
7
7
  import { Security2Command } from "../lib/_Types.js";
@@ -91,6 +91,7 @@ export declare class Security2CCMessageEncapsulation extends Security2CC {
91
91
  private ensureSequenceNumber;
92
92
  encapsulated?: CommandClass;
93
93
  extensions: Security2Extension[];
94
+ protected determineRelation(other: CommandClass): CommandRelation;
94
95
  prepareRetransmission(): void;
95
96
  hasMOSExtension(): boolean;
96
97
  /** Returns the Sender's Entropy Input if this command contains an SPAN extension */
@@ -426,7 +426,9 @@ let Security2CCAPI = (() => {
426
426
  const multiChannelCCVersion = this.host.getSupportedCCVersion(import_core.CommandClasses["Multi Channel"], this.endpoint.nodeId);
427
427
  cc = multiChannelCCVersion === 1 ? import_MultiChannelCC.MultiChannelCC.encapsulateV1(cc) : import_MultiChannelCC.MultiChannelCC.encapsulate(cc);
428
428
  }
429
- cc = Security2CC.encapsulate(cc, this.host.ownNodeId, this.host, { securityClass });
429
+ cc = Security2CC.encapsulate(cc, this.host.ownNodeId, this.host, {
430
+ securityClass
431
+ });
430
432
  const response = await this.host.sendCommand(cc, {
431
433
  ...this.commandOptions,
432
434
  autoEncapsulate: false
@@ -920,7 +922,9 @@ let Security2CCMessageEncapsulation = (() => {
920
922
  let decrypt;
921
923
  if (mcctx.isMulticast) {
922
924
  if (mpanState?.type !== import_core.MPANState.MPAN) {
923
- securityManager.storePeerMPAN(ctx.sourceNodeId, mcctx.groupId, { type: import_core.MPANState.OutOfSync });
925
+ securityManager.storePeerMPAN(ctx.sourceNodeId, mcctx.groupId, {
926
+ type: import_core.MPANState.OutOfSync
927
+ });
924
928
  failNoMPAN();
925
929
  }
926
930
  decrypt = /* @__PURE__ */ __name(() => decryptMulticast(ctx.sourceNodeId, securityManager, mcctx.groupId, ciphertext, authData, authTag), "decrypt");
@@ -954,7 +958,9 @@ let Security2CCMessageEncapsulation = (() => {
954
958
  }
955
959
  if (!authOK || !plaintext) {
956
960
  if (mcctx.isMulticast) {
957
- securityManager.storePeerMPAN(ctx.sourceNodeId, mcctx.groupId, { type: import_core.MPANState.OutOfSync });
961
+ securityManager.storePeerMPAN(ctx.sourceNodeId, mcctx.groupId, {
962
+ type: import_core.MPANState.OutOfSync
963
+ });
958
964
  import_core.validatePayload.fail(import_core.ZWaveErrorCodes.Security2CC_CannotDecodeMulticast);
959
965
  } else {
960
966
  import_core.validatePayload.fail(import_core.ZWaveErrorCodes.Security2CC_CannotDecode);
@@ -1028,6 +1034,28 @@ let Security2CCMessageEncapsulation = (() => {
1028
1034
  }
1029
1035
  encapsulated;
1030
1036
  extensions;
1037
+ determineRelation(other) {
1038
+ if (!(other instanceof Security2CCMessageEncapsulation2)) {
1039
+ return import_CommandClass.CommandRelation.Unrelated;
1040
+ }
1041
+ if (this.securityClass !== other.securityClass || this.verifyDelivery !== other.verifyDelivery) {
1042
+ return import_CommandClass.CommandRelation.Unrelated;
1043
+ }
1044
+ if (getMulticastGroupId(this.extensions) !== getMulticastGroupId(other.extensions)) {
1045
+ return import_CommandClass.CommandRelation.Unrelated;
1046
+ }
1047
+ const hasMOSExtension = /* @__PURE__ */ __name((cc) => cc.extensions.some((extension) => extension instanceof import_Extension.MOSExtension), "hasMOSExtension");
1048
+ if (hasMOSExtension(this) !== hasMOSExtension(other)) {
1049
+ return import_CommandClass.CommandRelation.Unrelated;
1050
+ }
1051
+ if (this.extensions.some((extension) => extension instanceof import_Extension.SPANExtension || extension instanceof import_Extension.MPANExtension) || other.extensions.some((extension) => extension instanceof import_Extension.SPANExtension || extension instanceof import_Extension.MPANExtension)) {
1052
+ return import_CommandClass.CommandRelation.Unrelated;
1053
+ }
1054
+ if (!this.encapsulated || !other.encapsulated) {
1055
+ return import_CommandClass.CommandRelation.Unrelated;
1056
+ }
1057
+ return this.encapsulated.getRelationTo(other.encapsulated);
1058
+ }
1031
1059
  prepareRetransmission() {
1032
1060
  super.prepareRetransmission();
1033
1061
  this.sequenceNumber = void 0;