Hi @AqaraOfficial , here it goes a suggestion for lighting automations.
I’ve got an automation that turns on the led strip T1 underneath the upper cabinets of the kitchen when the motion sensor detects movement. Another automation turns it off when stops detecting movement after one minute. At the same time I have some ambients for the night, dinner, relax and movies so the second automation turns of the led strip
, it will be nice to add a new THEN:
IF motion sensor doesn’t detect motion after x time THEN return to previous status
It will be nice and super useful for ton’s of other automations
Thanks
1 Like
You can make your LED Strip “remember” the last state by just enabling/disabling automations. I have done this trick for most of my lights, so, for example, when you manually turn on the light, then it won’t be automatically turned off.
Example:
Automation 1:
IF
motion detected
AND
led strip is off
THEN
Disable automation 3
Turn led strip on
Enable automation 2
Delay 5s
Enable automation 3
Automation 2 (toggle “trigger once” and disable this automation by default):
IF
No motion for 1 min
THEN
Turn led strip off
Automation 3 (prevents auto off when manually controlled):
IF
LED strip turns on
THEN
Disable automation 1
Disable automation 2
Automation 4:
IF
LED strip turns off
THEN
Enable automation 1
Now when anyone manually controls the light strip, or when you turn it on via an automation, then automation 1 and 2 will automatically be disabled and it will prevent the LED Strip from being turned off automatically.
But if the LED Strip is turned on by movement, then it will work as usual.
Btw “return to previous state” is very hard to implement because how vague the term is. Your automation turns the LEDs on or sets brightness, which is actually a state change, and depending on the situation, “previous state” may not be what you think it is. This feature would need some kind of a “checkpoint” that can be used as a reference to what “previous state is”.
For example:
IF
motion detected
THEN
save state of LED strip as “checkpoint 1”
Turn on
Then “restore LED strip to checkpoint 1” will make more sense
2 Likes
If my example didn’t fit your use case, then feel free to elaborate or share more examples, I’ll try to help you with the automations as much as I can
3 Likes
What I meant it’s something like the function of restoring the status after a blackout for example, this function actually exists. Thanks @cezary806
1 Like