Hi everyone,
I’d like to share one of my automations and also ask for some advice on improving it in the new automation format.
My setup:
I have an air purifier plugged into an Aqara Smart Plug.
I created a scene called “purify air” which:
- Turns on the Smart Plug
- Waits 15 minutes
- Turns off the Smart Plug
Automation 1.0 (old format):
This version worked perfectly.
When:
- Door and Window Sensor closes
- Door and Window Sensor had been open for more than 1 minute
- Aqara Smart Plug is off
Then:
Execute scene “purify air”
Automation 2.0 (new format):
When:
→ Door and Window Sensor closes
If (all conditions):
→ Door and Window Sensor had been open for more than 1 minute
→ Aqara Smart Plug is off
Then:
Execute scene “purify air”
The idea:
Whenever I ventilate the room (balcony door open for more than 1 minute) and then close it again, the air purifier should run for 15 minutes to refresh the air.
I started doing this because after airing, I often noticed increased PM2.5 and PM10 values in the room — likely due to outdoor air quality. So the purifier helps bring those levels back down quickly.
The 1-minute condition is important because my cat often wants to go out onto the balcony — but I don’t want the air purifier to start every time she goes in and out briefly.
The issue:
This worked perfectly in Automation 1.0, but in Automation 2.0 it only works if I remove the condition “Door and Window Sensor had been open for more than 1 minute.”
It seems the new automation logic doesn’t detect that past open-state condition anymore.
Question:
Has anyone managed to reproduce this behavior in Automation 2.0?
Is there a workaround or a different way to express “had been open for more than X minutes before closing”?
Thanks in advance for any suggestions or ideas!

