Schedule automation

Hi everybody, Im a newbe on HA. I try to make a controled heating on my house via NodeMcu + Relay + MQTT and HA and work fine. But now i need to make a Schedule for heating and I used automation, but I dont know how to make some scheduling for automation.
Could you please Help?

Hey - I’m in exactly the same situation. I have a target temperature set in HA which a generic_thermostat uses to switch the remote relay on or off. I’ve got some very simple automation in place right now:

automation:
  - alias: Reduce the target temperature overnight
    initial_state: True
    hide_entity: False
    trigger:
      platform: time
      minutes: '50'
    condition:
      condition: time
      after: '21:45:00'
      before: '06:00:00'
    action:
      service: climate.set_temperature
      data:
        temperature: 14
      
  - alias: Reset the target temperature
    initial_state: True
    hide_entity: True
    trigger:
      platform: time
      after: '06:00:00'
    action:
      service: climate.set_temperature
      data:
        temperature: 20.5

This is fine for hour by hour changes, but to do day schedules, you’ll need to add weekday conditions https://home-assistant.io/getting-started/scripts-conditions/#time-condition

1 Like

Thank You for reply. So I only add
weekday:

  • mon atd…

I go to setup.

Just a tip:
don’t only use minutes: for the time trigger as that will fire every second within this minute.

Sebastian

Ah - gotcha. Good to know. So it should be:

trigger:
  platform: time
  minutes: 50
  seconds: 0

to only trigger once, at 50 minutes and 0 seconds.