Hi everyone, I’m new to the world of smart home automation and I’m trying to set up a simple rule using my sonoff basics devices. The goal is to control the ceiling lights based on the state of my window and ceiling lights. Here’s what I’m aiming for:
If my window light is on and the ceiling light is on, I want the ceiling light to turn off automatically. However, if the window light was already on before the ceiling light was turned on, I want both lights to stay on.
I managed to set up the first part of the rule using an ‘if’ statement, but I’m struggling with the second part. I’m not sure how to incorporate a condition that checks the order in which the lights were turned on. Is there a way to do this using ‘after’ or ‘before’ conditions in the rule engine?
Any advice or tips would be greatly appreciated! I’m really excited to get this working and would love to hear how others have tackled similar automation challenges. ![]()