You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Baseline SchedulePolicy day/night switches early vs SB1 local comfort window (UTC hod + utcoffset) #201
On SB1, the baseline HVAC schedule in SchedulePolicy does not stay aligned with the building-local comfort window (SetpointSchedule, 06:00–19:00 US/Pacific).
Observation hod_* features are built from the simulator timestamp in UTC, while schedule lookup does: Timedelta(hod) + local_start_time.utcoffset()
Under PDT (UTC−7) that makes day setpoints active only for local 06:00–16:59. From local 17:00–18:59 the schedule has already switched to night setpoints, but comfort mode is still on.
This does not appear intentional: gin uses the same 6 / 19 hours for comfort and for schedule events, and get_radian_time documents the timestamp as local.
So for two hours every evening (5–7 PM Pacific), the zone still wants comfort warmth, but the baseline schedule has already switched to night setpoints.
I can reproduce this by reading the code. get_active_setpoint receives hod plus the UTC offset, which is negative at UTC-7 for UTC hours 0 to 6. No event matches, so it wraps to the last event, which is the 19:00 night setpoint. I have a one line fix that wraps the local time into 0 to 24 hours, with tests. I will open a PR shortly.
Activity
Sidharth1743 commentedon Oct 10, 2026
@s2t2 look into this. i think this bug seems to be serious
burgulvedant commentedon Oct 26, 2026
I can reproduce this by reading the code. get_active_setpoint receives hod plus the UTC offset, which is negative at UTC-7 for UTC hours 0 to 6. No event matches, so it wraps to the last event, which is the 19:00 night setpoint. I have a one line fix that wraps the local time into 0 to 24 hours, with tests. I will open a PR shortly.