Read and write BACnet schedules in Home Assistant
A BACnet Schedule object tells a controller which value to command at which time. It combines a weekly schedule, exceptions for special days, a default value and an effective period.
Schedule sensor
A Schedule object is imported as a sensor that shows the value the schedule currently commands. The schedule itself is read and changed with two actions that target that sensor.
| Action | What it does |
|---|---|
bacnet.read_schedule | Returns the schedule as response data: weekly_schedule, exception_schedule, calendars (the dates of calendars the exceptions refer to), schedule_default, effective_period, controlled_objects, value_type and priority_for_writing. |
bacnet.write_schedule | Changes weekly_schedule, exception_schedule, schedule_default and/or effective_period, in the same shape read_schedule returns. Fields you leave out are not touched. |
Field details are in Actions. A first step is always to run bacnet.read_schedule once in Developer tools → Actions, to see what your controller returns.
Write a schedule
action: bacnet.write_schedule
target:
entity_id: sensor.ddc_heating_schedule
data:
weekly_schedule:
monday:
- { time: "06:30:00", value: 21.5 }
- { time: "22:00:00", value: null } # null = back to the default
exception_schedule:
- period: { date: "2026-12-25" }
priority: 10
time_values:
- { time: "00:00:00", value: 16 }
response_variable: schedule
The schedule is read back after every write. The action fails if the device rejected the change or stored something different.
Weekly schedule
Only the weekdays you pass are changed, with one write per day. Pass all seven days to send the week as a single write, which some devices require.
Exception schedule
Step by step: Holiday in a schedule.
An exception schedule lists special periods, such as holidays or meetings, that override the weekly schedule. Each exception has a period, a priority (1 to 16, lower wins) and time_values.
The exception schedule is always replaced as a whole. To protect the controller, the action fails, and lists them, if the write would remove exceptions the device currently has. Pass the full list, including the ones to keep, or set allow_removal: true if removing them is what you want.
A period is one of:
date: a single date.date_range: withstartandend.week_n_day: withmonth,week_of_monthandweekday.calendar_reference: the instance of a Calendar object on the device.
Dates and values
- Dates: write
"YYYY-MM-DD", or{year, month, day, weekday}wherenullmeans any. Dates are always returned in the second form, with raw BACnet numbers: month 13 and 14 mean odd and even months, day 32 means the last day of the month, weekday 1 is Monday. - Values are written in the datatype of the schedule itself (
value_type), taken from its default value. Anullvalue hands control back to the default.
Automate it
The calendar events as schedule exceptions example adds each calendar event to a Schedule object, so the controller knows about it in advance.