Hi there,
i am in the middle of the transition away from Node Red to Home Assistant. Yesterday i thought that i can relatively easy migrate my kitchen lights to HA, but i tends to be harder than i thought.
There are three devices involved, all of them are connected to ZigBee2MQTT. There is a Aqara Button which sends states like single, double etc. A Zigbee Ceiling light an Aqara Motion sensor. The Motions Sensor is only there for turning the light off if it is on and there is no motion detected after a certain time.
So what should happen? I push the Button, the light turns on. A timer starts running, when the timer reaches its end it checks if the motion sensor has detected motio, in this case the timer starts over again, if not it switches of the light.
Quite easy but i cant get my mind into a simple solution which must exist in HA for such a simple problem without any helper scripts etc. Could anyone point me in the right direction?
When the 10min passed in your example the light would be shut off in every case, or do i see that wrong. There would be no further check of the stat of the motion sensor, am i correct?
I used similar basically the same automation as you are trying to do.
As i remember the trick is to use helper i think timer. Then in automation when motion is clear timer is run. After time you set in timer elapsed it will turn off the light.
If motion is detected in timer set time it will reset timer.
It was something like that but i dont use it any more as i moved to presence detection and have just a few pir sensors.
Or maybe you have to create toggle sensors cant remember exactly but i know that i used helper for that.
Unfortunately it will not work as I remember. I used helper that will restart switching off light if motion was detected.
Maybe in newer version things were changed under the hood but when I set this up i had to use helper.
No, nothing has changed. That trigger for: time has worked pretty much since the beginning of Home Assistant. And continues to. You do not need a helper or timer for this. See: Motion activated lights automation