Keep lights on where motion was last detected?

As the title suggests, is it possible to keep light on where motion was last detected?

I live alone in my apartment and it is not necessary to keep the lights on in a room I am not in at the moment.

I have motion detectors in all rooms and currently I have set up timers to turn lights off when motion is not detected in a room.

This works well, however the lights can sometimes turn off in a room that I am in if the sensor doesn’t see any movement for a while.

So if I sit and watch TV for example I constantly have to wave my arms so that the lights turn on again.

So the solution would be to tell it to somehow keep the lights on where motion was last detected, so even if it doesn’t sense any movement it will assume I am still for example in the living room, since there was last movement there and no other room sensors have been triggered since then.

If however the last motion was sensed in the bedroom, the same rule will apply there. Last movement in bedroom, keep the lights on and turn off everything else after a few minutes.

What if you made a flow which turns on the lights in a room where motion was detected, AND turn off all lights in other rooms (in the same flow). You have to do this for every room.
Delete (or disable) all flows that turn off lights after a certain time in the same room where motion was detected.

When you leave home, go to sleep or it gets light, you have to switch off the lights manually in the room where you are then.

I don’t want the lights to turn off immediately because sometimes maybe I am just passing by or going to the kitchen to get something, the bathroom etc. So I do want a small delay.

Also in the living room I have sat it to turn the power of to the TV and receiver as I don’t like having them on stand by. They also turn on when motion is detected, but I have set a longer timer so that they don’t turn off with the lights.

So when ever the light turns off and I have to wave to turn it on again, the timer for the TV and receiver resets.

I am probably making it more complicated than it should, but don’t know how else to do it.

In your flow have a condition, an AND, set so that the lights turn off only if the TV is off

It sounds like you’ll need occupancy sensors. They ‘see’ your presence, optional even your position in a room, and you don’t have to move at all.

Example: Aqara FP1 (not yet supported by the Homey Aqara Xiaomi zigbee app)

1 Like

Interesting, and this works with homey pro? Have you or anyone tried it?

Well, this is why there’s the official app topic and the search function of the forum.
But, while I’m here, here you go :upside_down_face: This is from the app developer Ted:

1 Like

Maybe this is a solution.
As soon as you enter a room the light is switched on and the light in the previous room is switched off after a definable time. Because you live alone, you can configure each room this way. The light is always on in the room where you are.
By using further conditions, e.g. brightness is lower than or TV is on, you can still change the behavior accordingly.

However, routines might need to be added when you go to bed and when you have guests so that this flow is stopped. For this I would use virtual switches. But this shouldn’t be a problem.

Hope you understand the AF.

1 Like

This can be a solution, I will try it, thanks!

Please Share this flow?

Just store the zone number in a variable. My living room is zone number 1, when I walk in the “last zone” is set to 1. In the lights off flow I check if the zone number is NOT 1, if it is, the flow will stop.
Easy and effective…

Could you please show me an example?

I’ve hoor it in advanced flows, so can’t copy on my phone. But it is really easy:

Create var “last zone”

IF zone gets active
THEN set “last zone” to [zone number]
(I do this in my lights flow, because this flow has already the if zone active card, but this can only be done in advanced, because you probably check your Lux before turning on the lights. If you don’t use advanced flows you’ll need to create a new flow)

IF zone is inactive for 1 (or 5, or…) minutes
AND “last zone” is not [zone number]
THNE turn off lights

1 Like

To remember the last triggered zone, you can use the “An alarm was set” card from the toplevel zone.
Select motion as alarm type and store the zone tag in text variable.


Maybe this new flowcards help as well.
App: Device Capabilities