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.