Controlling thermostats according to a schedule

Hi all! I have now installed some thermostats in home assistant. They keep the temperature and regulate it, so far it works very well! :slight_smile: i would like to control some of the thermostats on a time basis (bedroom thermostat from X clock to Y clock on 21 degree celcius). i find automation settings and scripts under the device settings, but nothing where i can set times. do i need any timers/actions for that?

You could add time conditions to automations using platform: time…

- alias: HVAC Winter Evening
  trigger:
    platform: time
    at: "17:00:00"
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.home_hvac
        temperature: 19

Thank you! in which file are the automations created? automations.yaml or configurations.yaml?

automations.yaml

I already use smart thermostats (Honeywell) so this doesn’t apply to me right now, but…

Every smart thermostat I’ve heard of comes with an app or other easy way for non-techies to establish and change a daily and weekly schedule. It’s really the whole point of a smart 'stat.

It seems sort of primitive to have to write code (automations) to do this. Of all the great things HA can do, this is a glaring omission.

Has this already been done and I’m just missing something?

via custom components afaik. schedy

1 Like

Thanks, that’s pretty slick. But then again, I’m a coder from way back. I was thinking more in terms of a GUI-fied process for the masses. Here are a couple of screen shots from my Honeywell thermostat web-based configuration screen. There’s an app too, which does similar things. I find this pretty primitive, with a limited number of changes allowed, but I guess that keeps it simple. I’m sure with the talent here, we could do better!

Schedule_2

I think you can find similar projects in “share your project” - have you tried?
Or maybe you can do it and share with us?
I personally don’t need such a complex scheduler and just made a night/day preset/automations for my central heating. Don’t have time for more, priorities…

thank you, that was the answer. it works so far! i would like to change the hvac_mode from ‘auto’ to ‘heat’ at 5 o’clock. after 15 minutes i would like to switch back to ‘auto’. how can i change this in the config? ‘auto’ should stay at 20 degrees.

automation:
- alias: Bathroom warm
  trigger:
    platform: time
    at: "05:00:00"
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_bathroom 
        temperature: 25 
- alias: Bathroom normal
  trigger:
    platform: time
    at: "05:45:00"
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_bathroom
        temperature: 20

call climate.set_hvac_mode?
hint: open Developer Tools → Services and type in set_hvac and you’ll see what it needs as arguments.
Do ask if you need further assistance.