Solving Lightning Problem with Aqara Smart Plug and Door Magnetic Sensor

We didn’t have any lighting in our winter garden and had been using an Aqara door sensor for a long time. This area would get dark in the evening, so as a solution we bought a plug-in light and an Aqara smart plug.

By writing an automation, I made it so that when the door opens, the plug turns on and therefore the light turns on. This way I both solved my lighting problem and prevented it from staying on unnecessarily. Also, if the plug is already on, it doesn’t pass the first if condition, so it doesn’t turn off after 2 minutes; in other words, if I manually turned the light on and want it to stay on, the light will keep shining even if the door is opened and closed. Thank you, Aqara!

11 Likes

The screenshots are not visible in the video, so I wanted to post the automation that I created.

Good luck with the contest!

3 Likes

Adding an “if” in the middle is a great idea. :astonished:

2 Likes

Welcome aboard! It’s a very helpful automation(cute dog btw :rofl:

3 Likes

Dog was a paid actor

2 Likes

Hi, just for information, if you add a condition in the IF condition that is the opposite of the WHET condition, this way you avoid spammy automation triggering when performing an action in WHEN. I practice this all the time.

3 Likes

Also I could not find the time range selection in WHEN section. That will be useful feature if you can add to app @AqaraOfficial

Hi, there is a time range in the “…” setting. See lesson 2, fig16. Automation 2.0. Lesson2. Advanced settings "..." (Execution time, delay of conditions, reversal of conditions) is

2 Likes

Oh great! Now i have same function without using time condition.

Thanks a lot :slight_smile:

1 Like

Please read the lesson carefully IF. The delay doesn’t work the way you think😉

Well actually it works on my case; but you’re right. We should check.

The “…” section works perfectly. I’ll point out the “delay” option in the WHET and IF sections for you.
:wink:

Thank you for sharing!

1 Like