Homey Community

Flow PIR + LUX


I am new to homey. Enjoying the experience so far.
Want to make a flow which turns on the light when motion is detected and the lux value is below a certain treshold.
I am struggling to get this working. I tried to use the card “motion detected” in the if part, but I have no way to select the lux value in the and part of the flow.
Could someone give me some pointers how to approach this?

See the flow below which I tried.


see the item Hue motion sensor - it really s u c k s


This not really answers my question. I cannot select luminance (lux) in the and card. In the thread you linked they seem to be able to select lux level. Is am using neo coolcam pir V2.


And where did u het that tag from?
And is it actualy less than 100?


In the if column I could select “luminance changed” and that is where I got that tag from. Than I changed the if card to “motion detected”, but than my tag which I use in the logic card stops working. Not sure how to check for lux value. What I want to achieve is: WHEN motion detected AND lux less than 100 THEN turn on kitchen lights.


There is a tag menu at the top of the flows page. Find ur pir and drag the “helderheid” tag from there into ur logic card in the AND colom.


Lol, so simple… did overlook that. Already thought I was doing things way to complicated. Will check when I am home. Thanks!




You will probably use another flow with lux input to turn the light off??
You will soon find out you want a different lux level to switch the light off (to prevent light on 30sec later light off)
Especially when you are still experimenting its usefull to create a variable (better logic app) and use a math formula to add an offset to this value (see screenshot).
This way you can easily change the one variable to play with the lux level and seperately the math offset to play with the lux setting for off.

Hope it helps you


Thanks for the tips. Good idea to use variables accross flows, so I van define lux treshold once for multiple flows/zones.
My Idea for the flow was to turn lights on and also turn the lights off with a delay off 30 minutes. When the flow is triggered again the lights will be turned on and off delay will be reset. Than one flow will suffice and keep things organized. Will this work or will the off action be triggered anyway?


I think it would work.
But personally I would not do it that way.
Reason is that evry time the lux changes this flow will be triggered (and reset the timer)

I do not like flow to run continuously to much processor usage of homey.
Rather have a second flow that does not trigger that much…


The flow always wil be completed, so after 30 sec it wil turn of the lights