I am searching for a custom component in Home Assistant that works similarly to the built-in Schedule integration, but is specifically designed to control room heaters (climate entities) by setting temperatures at certain times.
Key requirements:
Configuration of the schedules must be possible entirely via YAML.
Schedules and thermostats must remain completely separate: I do not want a combined “super thermostat” solution (like Generic Thermostat or similar).
It should be possible to define a schedule that applies to multiple days (e.g., all weekdays or the whole week) without having to repeat the same time/temperature entries seven times.
It would be very helpful if time blocks could be defined only with start times (no mandatory end times), so the temperature stays active until the next start time is reached.
Like the built-in Schedule integration, it should support a “data:” section where I can store additional information (e.g., custom attributes or notes).
Well, I went for the very simple approach, but I only have a single whole-house thermostat.
I have an automation that handles the schedule, and I have a separate script for setting the high/low temps based on the “mode” that that an automation can provide.
Been using it for a year or so like this and it seems just fine. Adding in weekday checks would be easy, but it’s more if anyone is home or not.
I also change the morning heat based on the expected temperature outside. For some reason I don’t need the house as warm when I feel it’s going to be a warm day…
Sometime back I had a different approach where the automation would run ever few minutes and then check what schedule should be running, but I like this way better.
I use the the HA local calendar for scheduling irrigation.
Triggers
triggers:
- trigger: time
at: "05:00:00"
id: pre_wake_up
- trigger: time
at: "07:00:00"
id: wake_up
- trigger: time
at: "09:00:00"
id: midday
- trigger: time
at: "18:06:00"
id: evening
- trigger: time
at: "20:00:00"
id: evenig_cool
- trigger: time
at: "21:30:00"
id: sleeping
- alias: Anytime the away mode toggle changes call the set temp script
trigger: state
entity_id:
- input_boolean.hall_thermostat_away_mode
id: away_changed
- alias: Trigger 'left_home' when zero people home for ten minutes
entity_id:
- zone.home
for:
hours: 0
minutes: 5
seconds: 0
below: 1
id: left_home
trigger: numeric_state
- alias: Trigger 'back_home' when count of people home is > 0 for two minutes
entity_id:
- zone.home
above: 0
id: back_home
for:
hours: 0
minutes: 2
seconds: 0
trigger: numeric_state
- alias: >-
Set 'left_home' mode when a door is open for a few minutes (i.e. turn off HVAC
when door is open)
entity_id:
- binary_sensor.doors_with_sensors
from: "off"
to: "on"
for:
hours: 0
minutes: 2
seconds: 0
id: door_opened
trigger: state
- alias: >-
And then set 'back_home' (i.e. turn heat back on) when doors are closed
again for a few minutes.
entity_id:
- binary_sensor.doors_with_sensors
from: "on"
to: "off"
for:
hours: 0
minutes: 2
seconds: 0
id: door_closed
trigger: state