diff --git a/controller/State.ts b/controller/State.ts index ec9b0833..4e5b5dd6 100644 --- a/controller/State.ts +++ b/controller/State.ts @@ -1089,8 +1089,9 @@ export class ScheduleStateCollection extends EqStateCollection { let ssched = this.getItemByIndex(i); let st = ssched.scheduleTime; let sched = sys.schedules.getItemById(ssched.id); - // rsg st.startTime is null when the schedule has No Days - if (!sched.isActive || ssched.disabled || st.startTime === null) { + // rsg st.startTime is null when the schedule has No Days <-- WRONG. ssched.scheduleDays should be checked. + // original fix #879; updated fix #1033 + if (!sched.isActive || ssched.disabled || ssched.scheduleDays === 0) { continue; } st.calcSchedule(state.time, sys.schedules.getItemById(ssched.id)); diff --git a/controller/boards/SystemBoard.ts b/controller/boards/SystemBoard.ts index 34a022e2..2486be35 100644 --- a/controller/boards/SystemBoard.ts +++ b/controller/boards/SystemBoard.ts @@ -3631,7 +3631,7 @@ export class ScheduleCommands extends BoardCommands { if (heatSetpoint < 0 || heatSetpoint > 104) return Promise.reject(new InvalidEquipmentDataError(`Invalid heat setpoint: ${heatSetpoint}`, 'Schedule', heatSetpoint)); if (sys.board.circuits.getCircuitReferences(true, true, false, true).find(elem => elem.id === circuit) === undefined) return Promise.reject(new InvalidEquipmentDataError(`Invalid circuit reference: ${circuit}`, 'Schedule', circuit)); - if (schedType === 128 && schedDays === 0) return Promise.reject(new InvalidEquipmentDataError(`Invalid schedule days: ${schedDays}. You must supply days that the schedule is to run.`, 'Schedule', schedDays)); + if (schedType === 128 && schedDays === 0) return Promise.reject(new InvalidEquipmentDataError(`Invalid schedule days: ${schedDays}. You must supply days that the schedule is to run.`, 'Schedule', schedDays)); // rsg 2024.11.22 - some controllers allow no days. // If we made it to here we are valid and the schedula and it state should exist. sched = sys.schedules.getItemById(id, true);