Automation 2.0 Best Practice?

Hi all,
Just after some ‘best practice’ advice when setting up an automation in the new 2.0 version.

Use Case
When old style PIR senses movement it puts power to an Aqara T2 Relay. Automation then says When T2 Turns On, Then AQARA T1 LED Strip = On.

When old style PIR no longer senses movement it stops power to Aqara T2 Relay. Automation then says When T2 Turns Off, Then AQARA T1 LED Strip = Off.

Currently I have 4 (yes 4!) automations to run this as I only want it activated between Sunset and Sunrise. 1 to turn on the PIR On automation at Sunset, 1 for PIR to turn on the T1 LED, 1 to turn off the T1 LED and 1 to turn off the PIR On automation at Sunset. The PIR Off automation can run all the time as it makes no difference.

I believe in Automation 2.0, I can reduce this down to 2 Automations?

New 2.0 Setup / Questions
So, I’ve added the screenshots of the converted Automation to 2.0, but should the Acting Time be setup in the When or Then?
Currently I’ve set this up in both as an example.

Thanks


1 Like
  • WHEN → defines what triggers the automation
  • IF → checks conditions (optional checks before actions run)
  • THEN → defines what happens (the actions)

If you want your automation to only trigger during a certain time (e.g., between sunset and sunrise), you should set the Acting Time in the WHEN block.

That way, the automation will only fire during that time window.
Outside of it, it won’t trigger at all.


When to use Acting Time in THEN

Only useful if you want different actions depending on the time.
For example:

If motion detected → if day, set LED white; if night, set LED warm white.

1 Like

Great, many thanks

1 Like

Hello, maybe my lessons will help you in setting up 2.0. If you have any questions, write, ask, I’m happy to help. Automation 2.0 Tutorial Collection - Lesson 1

2 Likes