Schedules with values other than boolean

I’m using a Schedule to switch my heating down at night which works fine with the Schedule helper but I’m wondering if it’s possible to associate a temperature or some other value with schedules rather than just ‘on/off’.

How do you turn off your heating?

Instead of calling the climate.turn_off service, you could use the climate.set_temperature service and also the climate.set_hvac_mode service

My thermostat’ don’t support turning the heating off as such, only changing the temperature. So I’m setting different temperatures during the day/night/evening. For usability it would be convenient to define a schedule where I can specify e.g. a default temperature of 21C, then lower temperatures of e.g. 19C at night and 13C during the day (when noone is home). Then just set up an automation that sets the temperature to the schedule’s current temperature triggered by any change in the value.

Currently I have a schedule and automation that sets 13C when ‘off’ and 21C when ‘on’, but I think to set three different temperatures gets more complicated and far from the kind of declarative configuration approach I generally prefer.

The thermostats do have their own support for schedules but I’d prefer to handle everything in home assistant and not have to figure out and maintain another system.

You can simply use Time Triggers. Set the trigger’s id to the desired temperature.

alias: example
trigger:
  - id: '21'
    platform: time
    at: '07:00:00'
  - id: '13'
    platform: time
    at: '09:00:00'
  - id: '21'
    platform: time
    at: '17:00:00'
  - id: '19'
    platform: time
    at: '23:00:00'
condition: []
action:
  - service: climate.set_temperature
    target:
      entity_id: climate.your_thermostat
    data:
      temperature: '{{ trigger.id | int(18) }}'
2 Likes