#if else Automation in the UI

1 messages · Page 1 of 1 (latest)

olive mist
#

I want to build a simple thermostat automation, currently only using the UI, becase I'm pretty new.
I set up the time in a schedule.

Now I want to set up the "if window is closed" automation.
I want:

  1. if window is closed
  2. and if time is within the schedule
  3. turn on heat
  4. else don't turn on heat

But how do I do this (setp 4) using only the UI? Because I can only set up one trigger and one action, but can't do further stuff after that...

I could do it in reverse with a condition like this:

  1. if window is closed
  2. and if time is NOT within the schedule
  3. turn on heat

but then I would need a second automation for just turning off the heat... Is there a simpler solution to this?

If it's only possible with YAML. Is there a guide to get started here? I don't even know where I would put that code...

torn zephyr
#

In the if action block, you have to click “Add else”. Also, if conditions can have multiple conditions as well.

olive mist
#

Ohh, thanks! I will look into that

#

But in what block is it? I can't find anything with "else" inside the "Add trigger", "Add condition" or "Add action" menu...
Or do I look at the wrong spot?

torn zephyr
#

It’s in the IF action block.

#

Add action > search for IF (or Choose; choose is more powerful).

olive mist
#

Oh thanks, it's called "if-then" thats why I didn't find it 🙂

torn zephyr
#

Take a look at Choose as well. It allows for multiple “if-else” kind of actions.