@zwave-js/cc 15.24.0 → 15.24.3

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 (97) hide show
  1. package/build/cjs/cc/AssociationGroupInfoCC.js +1 -0
  2. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  3. package/build/cjs/cc/BarrierOperatorCC.js +1 -0
  4. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  5. package/build/cjs/cc/BinarySensorCC.js +1 -0
  6. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  7. package/build/cjs/cc/ColorSwitchCC.js +1 -0
  8. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  9. package/build/cjs/cc/LanguageCC.js +2 -0
  10. package/build/cjs/cc/LanguageCC.js.map +2 -2
  11. package/build/cjs/cc/MultiChannelAssociationCC.js +1 -1
  12. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  13. package/build/cjs/cc/NodeNamingCC.js +3 -20
  14. package/build/cjs/cc/NodeNamingCC.js.map +2 -2
  15. package/build/cjs/cc/NotificationCC.js +1 -0
  16. package/build/cjs/cc/NotificationCC.js.map +2 -2
  17. package/build/cjs/cc/ProtectionCC.d.ts +11 -5
  18. package/build/cjs/cc/ProtectionCC.js +63 -18
  19. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  20. package/build/cjs/cc/ScheduleEntryLockCC.js +3 -0
  21. package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
  22. package/build/cjs/cc/TimeCC.js +1 -0
  23. package/build/cjs/cc/TimeCC.js.map +2 -2
  24. package/build/cjs/cc/TimeParametersCC.js +1 -0
  25. package/build/cjs/cc/TimeParametersCC.js.map +2 -2
  26. package/build/cjs/cc/UserCodeCC.d.ts +2 -1
  27. package/build/cjs/cc/UserCodeCC.js +35 -0
  28. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  29. package/build/cjs/cc/UserCredentialCC.js +12 -0
  30. package/build/cjs/cc/UserCredentialCC.js.map +2 -2
  31. package/build/cjs/cc/VersionCC.js +5 -0
  32. package/build/cjs/cc/VersionCC.js.map +2 -2
  33. package/build/cjs/cc/WindowCoveringCC.js +2 -0
  34. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  35. package/build/cjs/cc/ZWaveProtocolCC.d.ts +2 -0
  36. package/build/cjs/cc/ZWaveProtocolCC.js +4 -0
  37. package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
  38. package/build/cjs/lib/serializers.js +1 -0
  39. package/build/cjs/lib/serializers.js.map +2 -2
  40. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  41. package/build/esm/cc/AssociationGroupInfoCC.js +2 -0
  42. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  43. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  44. package/build/esm/cc/BarrierOperatorCC.js +1 -0
  45. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  46. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  47. package/build/esm/cc/BinarySensorCC.js +1 -0
  48. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  49. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  50. package/build/esm/cc/ColorSwitchCC.js +1 -0
  51. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  52. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  53. package/build/esm/cc/LanguageCC.js +4 -0
  54. package/build/esm/cc/LanguageCC.js.map +1 -1
  55. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  56. package/build/esm/cc/MultiChannelAssociationCC.js +3 -1
  57. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  58. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  59. package/build/esm/cc/NodeNamingCC.js +3 -22
  60. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  61. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  62. package/build/esm/cc/NotificationCC.js +5 -0
  63. package/build/esm/cc/NotificationCC.js.map +1 -1
  64. package/build/esm/cc/ProtectionCC.d.ts +11 -5
  65. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  66. package/build/esm/cc/ProtectionCC.js +72 -42
  67. package/build/esm/cc/ProtectionCC.js.map +1 -1
  68. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  69. package/build/esm/cc/ScheduleEntryLockCC.js +5 -0
  70. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  71. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  72. package/build/esm/cc/TimeCC.js +1 -0
  73. package/build/esm/cc/TimeCC.js.map +1 -1
  74. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  75. package/build/esm/cc/TimeParametersCC.js +1 -0
  76. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  77. package/build/esm/cc/UserCodeCC.d.ts +2 -1
  78. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  79. package/build/esm/cc/UserCodeCC.js +44 -0
  80. package/build/esm/cc/UserCodeCC.js.map +1 -1
  81. package/build/esm/cc/UserCredentialCC.d.ts.map +1 -1
  82. package/build/esm/cc/UserCredentialCC.js +20 -0
  83. package/build/esm/cc/UserCredentialCC.js.map +1 -1
  84. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  85. package/build/esm/cc/VersionCC.js +9 -0
  86. package/build/esm/cc/VersionCC.js.map +1 -1
  87. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  88. package/build/esm/cc/WindowCoveringCC.js +3 -1
  89. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  90. package/build/esm/cc/ZWaveProtocolCC.d.ts +2 -0
  91. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  92. package/build/esm/cc/ZWaveProtocolCC.js +4 -0
  93. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  94. package/build/esm/lib/serializers.d.ts.map +1 -1
  95. package/build/esm/lib/serializers.js +3 -1
  96. package/build/esm/lib/serializers.js.map +1 -1
  97. 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 });\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 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 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 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,yB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AK;UACf,QAAQ;UACR,UAAU,KAAK,SACV,IAAI,CAAC,UAAM,iCAAkB,uCAA0B,CAAC,CAAC,EACzD,KAAK,IAAI;UACd,kBAAc,0BAAW,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\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 });\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": ";;;;;;;;;;;;;;;;;;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AS,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;;;;",
6
6
  "names": ["userId"]
7
7
  }
@@ -352,6 +352,7 @@ let TimeCCDateReport = (() => {
352
352
  const year = raw.payload.readUInt16BE(0);
353
353
  const month = raw.payload[2];
354
354
  const day = raw.payload[3];
355
+ (0, import_core.validatePayload)(month >= 1, month <= 12, day >= 1, day <= 31);
355
356
  return new this({
356
357
  nodeId: ctx.sourceNodeId,
357
358
  year,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/cc/TimeCC.ts"],
4
- "sourcesContent": ["import * as __validateArgs from \"./TimeCC._validateArgs.js\";\nconst { validateArgs_TimeCCAPI_reportTime, validateArgs_TimeCCAPI_reportDate, validateArgs_TimeCCAPI_setTimezone, validateArgs_TimeCCAPI_reportTimezone } = __validateArgs;\nimport { CommandClasses, type DSTInfo, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, type WithAddress, ZWaveError, ZWaveErrorCodes, formatDate, getDSTInfo, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, pick } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { TimeCommand } from \"../lib/_Types.js\";\nimport { encodeTimezone, parseTimezone } from \"../lib/serializers.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\n// @noSetValueAPI\n// Only the timezone information can be set and that accepts a non-primitive value\n@API(CommandClasses.Time)\nexport class TimeCCAPI extends CCAPI {\n public supportsCommand(cmd: TimeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case TimeCommand.TimeGet:\n case TimeCommand.TimeReport:\n case TimeCommand.DateGet:\n case TimeCommand.DateReport:\n return this.isSinglecast(); // \"mandatory\"\n case TimeCommand.TimeOffsetGet:\n case TimeCommand.TimeOffsetReport:\n return this.version >= 2 && this.isSinglecast();\n case TimeCommand.TimeOffsetSet:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getTime() {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeGet);\n const cc = new TimeCCTimeGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<TimeCCTimeReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"hour\", \"minute\", \"second\"]);\n }\n }\n @validateArgs_TimeCCAPI_reportTime()\n public async reportTime(hour: number, minute: number, second: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeReport);\n const cc = new TimeCCTimeReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n hour,\n minute,\n second,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getDate() {\n this.assertSupportsCommand(TimeCommand, TimeCommand.DateGet);\n const cc = new TimeCCDateGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<TimeCCDateReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"day\", \"month\", \"year\"]);\n }\n }\n @validateArgs_TimeCCAPI_reportDate()\n public async reportDate(year: number, month: number, day: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.DateReport);\n const cc = new TimeCCDateReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n year,\n month,\n day,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_TimeCCAPI_setTimezone()\n public async setTimezone(timezone: DSTInfo): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetSet);\n const cc = new TimeCCTimeOffsetSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n standardOffset: timezone.standardOffset,\n dstOffset: timezone.dstOffset,\n dstStart: timezone.startDate,\n dstEnd: timezone.endDate,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getTimezone(): Promise<MaybeNotKnown<DSTInfo>> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetGet);\n const cc = new TimeCCTimeOffsetGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<TimeCCTimeOffsetReport>(cc, this.commandOptions);\n if (response) {\n return {\n standardOffset: response.standardOffset,\n dstOffset: response.dstOffset,\n startDate: response.dstStartDate,\n endDate: response.dstEndDate,\n };\n }\n }\n @validateArgs_TimeCCAPI_reportTimezone()\n public async reportTimezone(timezone: DSTInfo): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetReport);\n const cc = new TimeCCTimeOffsetReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n standardOffset: timezone.standardOffset,\n dstOffset: timezone.dstOffset,\n dstStart: timezone.startDate,\n dstEnd: timezone.endDate,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Time)\n@implementedVersion(2)\nexport class TimeCC extends CommandClass {\n declare ccCommand: TimeCommand;\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.Time, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Synchronize the slave's time\n if (api.version >= 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// @publicAPI\nexport interface TimeCCTimeReportOptions {\n hour: number;\n minute: number;\n second: number;\n}\n@CCCommand(TimeCommand.TimeReport)\nexport class TimeCCTimeReport extends TimeCC {\n public constructor(options: WithAddress<TimeCCTimeReportOptions>) {\n super(options);\n this.hour = options.hour;\n this.minute = options.minute;\n this.second = options.second;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): TimeCCTimeReport {\n validatePayload(raw.payload.length >= 3);\n const hour = raw.payload[0] & 0b11111;\n const minute = raw.payload[1];\n const second = raw.payload[2];\n validatePayload(hour >= 0, hour <= 23, minute >= 0, minute <= 59, second >= 0, second <= 59);\n return new this({\n nodeId: ctx.sourceNodeId,\n hour,\n minute,\n second,\n });\n }\n public hour: number;\n public minute: number;\n public second: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.hour & 0b11111,\n this.minute,\n this.second,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n time: `${this.hour.toString().padStart(2, \"0\")}:${this.minute.toString().padStart(2, \"0\")}:${this.second.toString().padStart(2, \"0\")}`,\n },\n };\n }\n}\n@CCCommand(TimeCommand.TimeGet)\n@expectedCCResponse(TimeCCTimeReport)\nexport class TimeCCTimeGet extends TimeCC {\n}\n// @publicAPI\nexport interface TimeCCDateReportOptions {\n year: number;\n month: number;\n day: number;\n}\n@CCCommand(TimeCommand.DateReport)\nexport class TimeCCDateReport extends TimeCC {\n public constructor(options: WithAddress<TimeCCDateReportOptions>) {\n super(options);\n this.year = options.year;\n this.month = options.month;\n this.day = options.day;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): TimeCCDateReport {\n validatePayload(raw.payload.length >= 4);\n const year = raw.payload.readUInt16BE(0);\n const month = raw.payload[2];\n const day = raw.payload[3];\n return new this({\n nodeId: ctx.sourceNodeId,\n year,\n month,\n day,\n });\n }\n public year: number;\n public month: number;\n public day: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n // 2 bytes placeholder for year\n 0,\n 0,\n this.month,\n this.day,\n ]);\n this.payload.writeUInt16BE(this.year, 0);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n date: `${this.year.toString().padStart(4, \"0\")}-${this.month.toString().padStart(2, \"0\")}-${this.day.toString().padStart(2, \"0\")}`,\n },\n };\n }\n}\n@CCCommand(TimeCommand.DateGet)\n@expectedCCResponse(TimeCCDateReport)\nexport class TimeCCDateGet extends TimeCC {\n}\n// @publicAPI\nexport interface TimeCCTimeOffsetSetOptions {\n standardOffset: number;\n dstOffset: number;\n dstStart: Date;\n dstEnd: Date;\n}\n@CCCommand(TimeCommand.TimeOffsetSet)\n@useSupervision()\nexport class TimeCCTimeOffsetSet extends TimeCC {\n public constructor(options: WithAddress<TimeCCTimeOffsetSetOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n this.dstStartDate = options.dstStart;\n this.dstEndDate = options.dstEnd;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): TimeCCTimeOffsetSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new TimeCCTimeOffsetSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public standardOffset: number;\n public dstOffset: number;\n public dstStartDate: Date;\n public dstEndDate: Date;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n }),\n [\n this.dstStartDate.getUTCMonth() + 1,\n this.dstStartDate.getUTCDate(),\n this.dstStartDate.getUTCHours(),\n this.dstEndDate.getUTCMonth() + 1,\n this.dstEndDate.getUTCDate(),\n this.dstEndDate.getUTCHours(),\n ],\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 \"DST start date\": formatDate(this.dstStartDate, \"YYYY-MM-DD\"),\n \"DST end date\": formatDate(this.dstEndDate, \"YYYY-MM-DD\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface TimeCCTimeOffsetReportOptions {\n standardOffset: number;\n dstOffset: number;\n dstStart: Date;\n dstEnd: Date;\n}\n@CCCommand(TimeCommand.TimeOffsetReport)\nexport class TimeCCTimeOffsetReport extends TimeCC {\n public constructor(options: WithAddress<TimeCCTimeOffsetReportOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n this.dstStartDate = options.dstStart;\n this.dstEndDate = options.dstEnd;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): TimeCCTimeOffsetReport {\n validatePayload(raw.payload.length >= 9);\n const { standardOffset, dstOffset } = parseTimezone(raw.payload);\n const currentYear = new Date().getUTCFullYear();\n const dstStartDate: Date = new Date(Date.UTC(currentYear, raw.payload[3] - 1, raw.payload[4], raw.payload[5]));\n const dstEndDate: Date = new Date(Date.UTC(currentYear, raw.payload[6] - 1, raw.payload[7], raw.payload[8]));\n return new this({\n nodeId: ctx.sourceNodeId,\n standardOffset,\n dstOffset,\n dstStart: dstStartDate,\n dstEnd: dstEndDate,\n });\n }\n public standardOffset: number;\n public dstOffset: number;\n public dstStartDate: Date;\n public dstEndDate: Date;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n }),\n [\n this.dstStartDate.getUTCMonth() + 1,\n this.dstStartDate.getUTCDate(),\n this.dstStartDate.getUTCHours(),\n this.dstEndDate.getUTCMonth() + 1,\n this.dstEndDate.getUTCDate(),\n this.dstEndDate.getUTCHours(),\n ],\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 \"DST start date\": formatDate(this.dstStartDate, \"YYYY-MM-DD\"),\n \"DST end date\": formatDate(this.dstEndDate, \"YYYY-MM-DD\"),\n },\n };\n }\n}\n@CCCommand(TimeCommand.TimeOffsetGet)\n@expectedCCResponse(TimeCCTimeOffsetReport)\nexport class TimeCCTimeOffsetGet extends TimeCC {\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA8O;AAC9O,oBAA4B;AAC5B,iBAAsB;AACtB,0BAAiE;AACjE,oCAAsG;AACtG,mBAA4B;AAC5B,yBAA8C;AAP9C,MAAM,EAAE,mCAAmC,mCAAmC,oCAAoC,sCAAqC,IAAK;IAY/I,aAAS,MAAA;8BADrB,mCAAI,2BAAe,IAAI,CA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s_TimeCCAPI_reportTime, validateArgs_TimeCCAPI_reportDate, validateArgs_TimeCCAPI_setTimezone, validateArgs_TimeCCAPI_reportTimezone } = __validateArgs;\nimport { CommandClasses, type DSTInfo, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, type WithAddress, ZWaveError, ZWaveErrorCodes, formatDate, getDSTInfo, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, pick } from \"@zwave-js/shared\";\nimport { CCAPI } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { TimeCommand } from \"../lib/_Types.js\";\nimport { encodeTimezone, parseTimezone } from \"../lib/serializers.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\n// @noSetValueAPI\n// Only the timezone information can be set and that accepts a non-primitive value\n@API(CommandClasses.Time)\nexport class TimeCCAPI extends CCAPI {\n public supportsCommand(cmd: TimeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case TimeCommand.TimeGet:\n case TimeCommand.TimeReport:\n case TimeCommand.DateGet:\n case TimeCommand.DateReport:\n return this.isSinglecast(); // \"mandatory\"\n case TimeCommand.TimeOffsetGet:\n case TimeCommand.TimeOffsetReport:\n return this.version >= 2 && this.isSinglecast();\n case TimeCommand.TimeOffsetSet:\n return this.version >= 2;\n }\n return super.supportsCommand(cmd);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getTime() {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeGet);\n const cc = new TimeCCTimeGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<TimeCCTimeReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"hour\", \"minute\", \"second\"]);\n }\n }\n @validateArgs_TimeCCAPI_reportTime()\n public async reportTime(hour: number, minute: number, second: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeReport);\n const cc = new TimeCCTimeReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n hour,\n minute,\n second,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n // oxlint-disable-next-line typescript/explicit-module-boundary-types\n public async getDate() {\n this.assertSupportsCommand(TimeCommand, TimeCommand.DateGet);\n const cc = new TimeCCDateGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<TimeCCDateReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\"day\", \"month\", \"year\"]);\n }\n }\n @validateArgs_TimeCCAPI_reportDate()\n public async reportDate(year: number, month: number, day: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.DateReport);\n const cc = new TimeCCDateReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n year,\n month,\n day,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_TimeCCAPI_setTimezone()\n public async setTimezone(timezone: DSTInfo): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetSet);\n const cc = new TimeCCTimeOffsetSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n standardOffset: timezone.standardOffset,\n dstOffset: timezone.dstOffset,\n dstStart: timezone.startDate,\n dstEnd: timezone.endDate,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getTimezone(): Promise<MaybeNotKnown<DSTInfo>> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetGet);\n const cc = new TimeCCTimeOffsetGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<TimeCCTimeOffsetReport>(cc, this.commandOptions);\n if (response) {\n return {\n standardOffset: response.standardOffset,\n dstOffset: response.dstOffset,\n startDate: response.dstStartDate,\n endDate: response.dstEndDate,\n };\n }\n }\n @validateArgs_TimeCCAPI_reportTimezone()\n public async reportTimezone(timezone: DSTInfo): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(TimeCommand, TimeCommand.TimeOffsetReport);\n const cc = new TimeCCTimeOffsetReport({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n standardOffset: timezone.standardOffset,\n dstOffset: timezone.dstOffset,\n dstStart: timezone.startDate,\n dstEnd: timezone.endDate,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n}\n@commandClass(CommandClasses.Time)\n@implementedVersion(2)\nexport class TimeCC extends CommandClass {\n declare ccCommand: TimeCommand;\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.Time, ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Synchronize the slave's time\n if (api.version >= 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// @publicAPI\nexport interface TimeCCTimeReportOptions {\n hour: number;\n minute: number;\n second: number;\n}\n@CCCommand(TimeCommand.TimeReport)\nexport class TimeCCTimeReport extends TimeCC {\n public constructor(options: WithAddress<TimeCCTimeReportOptions>) {\n super(options);\n this.hour = options.hour;\n this.minute = options.minute;\n this.second = options.second;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): TimeCCTimeReport {\n validatePayload(raw.payload.length >= 3);\n const hour = raw.payload[0] & 0b11111;\n const minute = raw.payload[1];\n const second = raw.payload[2];\n validatePayload(hour >= 0, hour <= 23, minute >= 0, minute <= 59, second >= 0, second <= 59);\n return new this({\n nodeId: ctx.sourceNodeId,\n hour,\n minute,\n second,\n });\n }\n public hour: number;\n public minute: number;\n public second: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n this.hour & 0b11111,\n this.minute,\n this.second,\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n time: `${this.hour.toString().padStart(2, \"0\")}:${this.minute.toString().padStart(2, \"0\")}:${this.second.toString().padStart(2, \"0\")}`,\n },\n };\n }\n}\n@CCCommand(TimeCommand.TimeGet)\n@expectedCCResponse(TimeCCTimeReport)\nexport class TimeCCTimeGet extends TimeCC {\n}\n// @publicAPI\nexport interface TimeCCDateReportOptions {\n year: number;\n month: number;\n day: number;\n}\n@CCCommand(TimeCommand.DateReport)\nexport class TimeCCDateReport extends TimeCC {\n public constructor(options: WithAddress<TimeCCDateReportOptions>) {\n super(options);\n this.year = options.year;\n this.month = options.month;\n this.day = options.day;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): TimeCCDateReport {\n validatePayload(raw.payload.length >= 4);\n const year = raw.payload.readUInt16BE(0);\n const month = raw.payload[2];\n const day = raw.payload[3];\n validatePayload(month >= 1, month <= 12, day >= 1, day <= 31);\n return new this({\n nodeId: ctx.sourceNodeId,\n year,\n month,\n day,\n });\n }\n public year: number;\n public month: number;\n public day: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([\n // 2 bytes placeholder for year\n 0,\n 0,\n this.month,\n this.day,\n ]);\n this.payload.writeUInt16BE(this.year, 0);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n date: `${this.year.toString().padStart(4, \"0\")}-${this.month.toString().padStart(2, \"0\")}-${this.day.toString().padStart(2, \"0\")}`,\n },\n };\n }\n}\n@CCCommand(TimeCommand.DateGet)\n@expectedCCResponse(TimeCCDateReport)\nexport class TimeCCDateGet extends TimeCC {\n}\n// @publicAPI\nexport interface TimeCCTimeOffsetSetOptions {\n standardOffset: number;\n dstOffset: number;\n dstStart: Date;\n dstEnd: Date;\n}\n@CCCommand(TimeCommand.TimeOffsetSet)\n@useSupervision()\nexport class TimeCCTimeOffsetSet extends TimeCC {\n public constructor(options: WithAddress<TimeCCTimeOffsetSetOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n this.dstStartDate = options.dstStart;\n this.dstEndDate = options.dstEnd;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): TimeCCTimeOffsetSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new TimeCCTimeOffsetSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public standardOffset: number;\n public dstOffset: number;\n public dstStartDate: Date;\n public dstEndDate: Date;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n }),\n [\n this.dstStartDate.getUTCMonth() + 1,\n this.dstStartDate.getUTCDate(),\n this.dstStartDate.getUTCHours(),\n this.dstEndDate.getUTCMonth() + 1,\n this.dstEndDate.getUTCDate(),\n this.dstEndDate.getUTCHours(),\n ],\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 \"DST start date\": formatDate(this.dstStartDate, \"YYYY-MM-DD\"),\n \"DST end date\": formatDate(this.dstEndDate, \"YYYY-MM-DD\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface TimeCCTimeOffsetReportOptions {\n standardOffset: number;\n dstOffset: number;\n dstStart: Date;\n dstEnd: Date;\n}\n@CCCommand(TimeCommand.TimeOffsetReport)\nexport class TimeCCTimeOffsetReport extends TimeCC {\n public constructor(options: WithAddress<TimeCCTimeOffsetReportOptions>) {\n super(options);\n this.standardOffset = options.standardOffset;\n this.dstOffset = options.dstOffset;\n this.dstStartDate = options.dstStart;\n this.dstEndDate = options.dstEnd;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): TimeCCTimeOffsetReport {\n validatePayload(raw.payload.length >= 9);\n const { standardOffset, dstOffset } = parseTimezone(raw.payload);\n const currentYear = new Date().getUTCFullYear();\n const dstStartDate: Date = new Date(Date.UTC(currentYear, raw.payload[3] - 1, raw.payload[4], raw.payload[5]));\n const dstEndDate: Date = new Date(Date.UTC(currentYear, raw.payload[6] - 1, raw.payload[7], raw.payload[8]));\n return new this({\n nodeId: ctx.sourceNodeId,\n standardOffset,\n dstOffset,\n dstStart: dstStartDate,\n dstEnd: dstEndDate,\n });\n }\n public standardOffset: number;\n public dstOffset: number;\n public dstStartDate: Date;\n public dstEndDate: Date;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n encodeTimezone({\n standardOffset: this.standardOffset,\n dstOffset: this.dstOffset,\n }),\n [\n this.dstStartDate.getUTCMonth() + 1,\n this.dstStartDate.getUTCDate(),\n this.dstStartDate.getUTCHours(),\n this.dstEndDate.getUTCMonth() + 1,\n this.dstEndDate.getUTCDate(),\n this.dstEndDate.getUTCHours(),\n ],\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 \"DST start date\": formatDate(this.dstStartDate, \"YYYY-MM-DD\"),\n \"DST end date\": formatDate(this.dstEndDate, \"YYYY-MM-DD\"),\n },\n };\n }\n}\n@CCCommand(TimeC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KAAK,SAAS;UAC/B,sBAAkB,wBAAW,KAAK,cAAc,YAAY;UAC5D,oBAAgB,wBAAW,KAAK,YAAY,YAAY;;;IAGpE;;;;IAIS,uBAAmB,MAAA;8BAF/B,yCAAU,yBAAY,aAAa,OACnC,kDAAmB,sBAAsB,CAAC;;;;oBACF;2CAAA,YAAM;WAAA;;;;;;;;AAA/C,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
6
6
  "names": []
7
7
  }
@@ -238,6 +238,7 @@ let TimeParametersCCReport = (() => {
238
238
  minute: raw.payload[5],
239
239
  second: raw.payload[6]
240
240
  };
241
+ (0, import_core.validatePayload)(dateSegments.month >= 1 && dateSegments.month <= 12, dateSegments.day >= 1 && dateSegments.day <= 31, dateSegments.hour >= 0 && dateSegments.hour <= 23, dateSegments.minute >= 0 && dateSegments.minute <= 59, dateSegments.second >= 0 && dateSegments.second <= 59);
241
242
  const dateAndTime = segmentsToDate(
242
243
  dateSegments,
243
244
  // Assume we can use UTC and correct this assumption in persistValues