Setup of ventilator

Hey, I have a ventilator in my bathroom that is controlled by a light switch. I would like to have this behavior:

  1. When I turn on the light (also controlled by the light switch) I want to wait 2 minutes and then if the light is still on, turn on the ventilator.
  2. If the light was on for less than 5 minutes, turn off the ventilator 5 minutes after the light was turned off.
  3. If the light was on for more than 5 minutes, turn off the ventilator 10 minutes after the light was turned off.

I managed to do differentiate between step 2 and 3 with use of another helper automation. The automation is disabled 5 minutes after the light is turned on and the automation that controls the step 2 is started only when the helper automation is enabled and the automation that controls the step 3 is started only when the helper automation is disabled…

Is there a better way to do that?

Also, now I noticed, that I have a bug in the step 1. Actually the ventilator starts even when the light is off 2 minutes after I originally turned the light on. Any ideas how to fix this? Thanks

6 Likes

within the aqara ecosystem?

Is there a particular Aqara device you’re using for this?

I don’t know if you are with the Apple ecosystem, if so, you could try to do it through shortcuts.

Yes, just in aqara ecosystem. In Aqara Home app using automations… The light switch is Aqara Light Switch H2 EU.

What are shortcuts pls?