YAML Butler
← All guides

Build a thermostat schedule in Home Assistant

Create a simple temperature schedule while respecting thermostat capabilities, units, and manual overrides.

A thermostat schedule translates household habits into deliberate setpoint changes. Begin with a small schedule you can explain, such as a weekday morning temperature, and confirm that the thermostat integration supports the action. Comfort, building characteristics, and heating equipment differ, so an example setpoint is a placeholder rather than a recommendation for every home.

Inspect the climate entity

Open the climate entity in Developer Tools and examine its current mode, temperature unit, minimum and maximum targets, and supported features. Some devices support one target temperature, while others require a high and low range in an automatic mode. Some expose presets such as away or eco. Test the intended action manually with a suitable value before creating a schedule. Use the action schema your actual integration exposes.

Separate temperature from operating mode

Setting a target temperature may not switch heating or cooling on if the device is currently off. Decide whether your automation should change the HVAC mode or leave that choice to the household. If you do change mode, verify the supported values first. Do not assume every climate entity accepts heat, cool, or heat_cool. Keep mode changes explicit in the description so somebody reviewing the rule understands the effect.

A starting-point automation

Every entity ID below is an example. Replace it with your actual entity ID and review all settings before use.

alias: Weekday morning thermostat
description: Set a reviewed morning target on weekdays; example uses the configured temperature unit.
triggers:
  - trigger: time
    at: "07:00:00"
conditions:
  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
actions:
  - action: climate.set_temperature
    target:
      entity_id: climate.hallway
    data:
      temperature: 20
mode: single

Start with a weekday morning change

The example runs at 07:00 and checks that the day is Monday through Friday. It sets a single placeholder thermostat to 20 in the installation’s configured temperature unit. Check your own units before copying it. Add an evening rule only after the morning change works as expected. Separate small rules are easy to inspect; a combined schedule with trigger IDs can be useful later if shared conditions become repetitive.

Choose an override policy

A schedule can unexpectedly overwrite a temperature chosen manually a few minutes earlier. If that is undesirable, add a hold helper and require it to be off before scheduled changes. Decide how the hold ends: a visible dashboard switch, a chosen deadline, or the next daily reset. Guest mode and holiday mode can use the same pattern. A clear override makes the schedule understandable to people who never read the YAML.

Plan for downtime and native schedules

A time trigger does not replay a missed 07:00 event after Home Assistant restarts. You can add a startup reconciliation rule that determines the currently appropriate period, but first decide whether it should override a manual hold. Also check whether the thermostat already has a native schedule or cloud routine. Two competing schedulers can repeatedly change the target, making each individual automation appear unreliable even though both are following their own rules.

Test gently and observe the result

Review the trace after a real scheduled run and check that the target changed on the thermostat itself. A target change does not imply immediate heating or cooling; equipment delays and device controls may apply. Avoid rapid cycling experiments. Keep equipment protections and local thermostat controls intact. Document your chosen setpoints, units, time zone, and override behavior so future changes can be made deliberately rather than by guessing from a short action list.

Describe the schedule in household terms

When asking for a generated draft, state the days, local times, target entity, units, and whether manual holds should win. Mention away behavior separately from the regular morning schedule. If you want a weekend variation, say exactly which days differ rather than asking for a typical working week. After generating, compare each requested period against a normal calendar day and an unusual day at home. Missing exceptions are easier to spot in a short written schedule than inside a large block of conditions.

Further reference: official Home Assistant documentation.

Common questions

Why did the temperature change but heating stay off?

The thermostat may be off or in another HVAC mode, or applying its own controls. Setting temperature does not always enable heating.

Does the morning event run after downtime?

No. Use a deliberate startup reconciliation rule if you need to restore the current schedule after a missed event.

Put your own idea into YAML.

Describe your devices, timing, and exceptions. YAML Butler will give you a starting point to review.

Generate your automation ↗