Home Automation Schedule Builder
Plan a week of smart-home automation before you type a line of YAML. Add one routine per device —
lights, plugs, the thermostat — and choose when it fires: a fixed clock time, or an offset from
sunrise or sunset so the schedule follows the seasons for free. Pick which weekdays each routine runs on,
and the builder lays out the entire week as a day-by-day timeline with every event in order, flags
conflicts like two actions racing on the same device, and exports the result as Home Assistant YAML you
can paste straight into automations.yaml, a CSV for spreadsheets, or a plain-text plan to
share with everyone else who uses the house. Everything is computed in this tab — nothing is
uploaded and nothing is executed.
100% private. The timeline, the conflict checks and every export are generated with JavaScript in this browser tab. Your device names, times and routines never leave the page — there is no server-side calculation and nothing to send.
1. Daylight for your location
2. Routines
One routine = one device, one action, one trigger, a set of weekdays. Add as many as the house has automatable things.
Weekly timeline
Checks on this schedule
Export
How to use it
Start from the daylight panel: type the approximate sunrise and sunset for your area (any weather
site will do — the defaults are a temperate-climate midyear value). Then add routines. For each
one, name the device, pick its type so the export uses the right Home Assistant service
(light.turn_on for lights, climate.set_temperature for the thermostat),
choose the action, and set the trigger: a fixed time, or sunrise/sunset plus an offset in minutes. A
negative offset fires before the event — sunset −30 means half an hour before the
sun goes down. Toggle the weekday chips for when it runs; the quick-set buttons cover the three
patterns people actually use (every day, weekdays, weekends).
The timeline under the editor shows the whole week as you type: every event on its correct day in
clock order, with the computed time for sun-based triggers. The checks panel reads the schedule back
to you in plain English — conflicts, routines that never fire, devices that are switched off but
never switched on. When it looks right, pick an export format and copy or download: the YAML is
ready to paste into automations.yaml (or Settings → Devices & Services →
Automations in the UI), the CSV opens in any spreadsheet, and the text plan is a shareable summary.
Worked example: the starter week
Click Load starter week and you get five routines that form a coherent household schedule. With the default daylight (sunrise 06:45, sunset 17:30) it produces 28 events across the week:
- Living room lights — on at sunset −30 min, every day. The timeline shows 17:00 Monday through Sunday. In winter, when sunset moves to 16:45, the same routine fires at 16:15 with no edit — that is the whole point of a sun trigger.
- Thermostat — 21 °C at 07:00, weekdays only. The house is warm when someone gets up on a workday, but not on Saturday mornings when nobody is there at 07:00.
- Thermostat — 17 °C at 23:00, every day. The overnight setback that pays for itself; the export emits
climate.set_temperaturewith the value, not a generic on/off. - Bedroom lights — off at 23:30, weekdays. A safety net for the person who always forgets.
- Coffee maker — on at sunrise +45 min, weekends only. Saturday and Sunday at 07:30 with the defaults; a fixed-time version of this routine would be wrong half the year.
Switch the export to Home Assistant YAML and the coffee maker comes out as a sun trigger
with offset: "+00:45:00" plus a weekday condition of [sat, sun] — the
same five lines you would have written by hand, except the weekday list and the offset format are
guaranteed to be in the shape Home Assistant expects.
How it works
Every routine is one Home Assistant automation: a trigger, an optional weekday condition, and a
service action. Fixed times map to the time trigger with an at: value;
sunrise and sunset triggers map to the sun trigger with an event: and an
offset: in ±HH:MM:SS form — the exact format Home Assistant
parses, so the YAML works without reformatting. Weekday selection maps to a time
condition with a weekday: list, and is omitted entirely when a routine runs all seven
days (fewer lines, same behaviour).
The timeline computes each event’s clock time from your daylight values: a sunset −30
trigger at 17:30 sunset is 17:00. If an offset would push the time before midnight or past it, the
checks panel says so instead of silently wrapping the clock. Device names are slugified into entity
IDs (Living room lights becomes light.living_room_lights) with a domain prefix
taken from the device type — you will almost certainly edit those to match your real entities,
and the YAML header tells you to.
Common mistakes this builder catches
- A fixed “sunset” time that drifts out of season. 17:30 is dusk in June and an hour-and-a-half early in December. Any routine meant to track daylight should use a sun trigger with an offset; the checks panel reminds you when a late-afternoon fixed-time light routine would sit on for hours in winter.
- Offsets that cross midnight. Sunrise −90 at 05:15 sunrise is 03:45 — legal, but rarely what was intended. The builder flags any sun offset whose computed time falls before 00:00 or after 23:59 so you can confirm it deliberately.
- Two routines fighting over one device. If the same device gets two actions within ten minutes on the same day — on at 17:00, off at 17:05 — the timeline highlights both events and the checks panel names them. That is usually a typo in one of the times.
- A device that is switched off but never switched on. A schedule full of
offactions with no matchingonleaves the device dark forever; the checks panel lists every device whose only events are off. - Routines that never fire. No weekdays selected means the automation is dead weight in your config. The builder marks those as errors, not warnings — there is no interpretation under which a routine with zero days is correct.
- Pasting YAML with entity IDs you do not have. The generated IDs are slugified guesses (
light.living_room_lights), not a scan of your installation. The header comment in the export says to adjust them — Home Assistant will happily create an automation that then errors on every trigger until the entities match.
Related tools
Suggested
Luke Keam | techgeek.biz