Variable luminance

Hello,

I read more than one topics but i can’t find the solution… I want to detect the luminance with a motion detector and set a variable to ‘yes’ or ‘no’.
You can see my little flow below.

When the the light becomes less than the treshold the variable isn’t updated… What do I wrong???

When you want to use “ELSE” then you also must fill in a condition in “AND”, in your example , both cards under “THEN” will be started.

1 Like

Hello, thx for your answer but I don’t understand you. My english is not so well…

The WHEN-card trigger the flow but you need an AND-card that is checked to have THEN and ELSE work as you intend.

I suggest you add this:
WHEN: Luminance becomes less than 20 lx
AND: Luminance is less than 20 lx
THEN: Set lx in cuisine to Yes
ELSE: Set lx in cuisine to No

1 Like

Hello Johan,

I have only 2 cards available for the sensor when I want to fill in the ‘and’ field… Both are ‘motion’ cards…

I think this would achieve what you want. The last card has Set lum to yes but should be no (seems its a bug in the share a flow view).

1 Like

It’s working!!! Thanks a lot !!!
I think with this manner of thinking I can solve other small issues…