Flow to turn on and off lights by room occupancy

Please can I ask for some advice. I am looking for two lamps to turn on (via smart plugs) after sunset and remain on whilst the room is occupied, and then turn the lamps off when the room is empty. I have two sonoff presence sensors and 1 aqara motion sensor along with two smart plugs.

When any of the presence sensors or motion sensor is triggered, I would like the lamps to turn on. To prevent the lamps turning off whilst the room is occupied I have inserted a 10 minute delay which I intended would reset the 10 minute delay each time any of the sensors are re-triggered.

However, my advanced flow does not seem to work correctly and the lights turn off after 10 mins when the room is still occupied.

Please can I ask for any suggestion on how I can modify the flow so the lamp remain on whilst the room is occupied? Thank you

specific Flows in homey.

You are missing a second trigger for turning off the lamps as the setup of your will always turn them off after the ten minutes timer is ended. Personally I have created zones for each room and will turn the lights on when the zone is activated, and tuning them off when the zone has been inactive for a certain amount of time. This way of doing it will also exclude the need of using a separate timer as you are using in the flow. Bear in mind that this is just one way of doing, but this is the one that I prefer. But despite of it all, you will need a second trigger.

Once the 10 minutes delay card is started it can’t be interrupted. So the lights will turn off after 10 minutes no matter what.

thank you for the advice - I will try out another trigger.

thank you!

You need to program something like:

ā€˜If none of the presence sensors was activated for 10 minutes, turn off the lamps’

Also look at the options to use the activity status of the room ā€˜Lounge’. If all the sensors are in the same room that is much simpler than checking each sensor individually.

Split the flow up into multiple commands

The card you want to use is actually a WHEN card, not a THEN card.

Inactive

To not getting left in the dark, this works best for me

I will try that, thank you

Thank you for sharing this.

Zone activity also has this card

That way you can remove the timer. (But you are limited to minutes)

The "zone activity" app provides even more options

Most of the above solutions require more apps, so that’s less space and less ram for your Homey for other use cases

The card already exists for Matter products, so just use that

Timers for presence is just time consuming to build, manage and troubleshoot. Also, if the community app stops being updated to be compatible for future Homey firmware updates, you’ll have to redo those flows

People really need to start offering simple solutions for others on this forum and stop burdening them with unnecessary complexity

one activity also has this card

"That way you can remove the timer. (But you are limited to minutes)

The "zone activity" app provides even more options"

You can literally put 0.25 minutes to get seconds on this card. It’s really not that difficult.

I’m aware of that card. But it acts flaky here (doesn’t trigger at times). The Chronograph is very reliable.

I don’t see how we can remove the timer from my flow, because the ā€œonā€ branch pauses that same timer.

All in all, I always use and show the timer version because it works at all times :wink:

Funny, Never had an issue with this card, use it in many flows to control my lights (so I would notice quiclkly if its flaky)

Thank you