How to properly manage motion detection?

Well, I'm having a hard time every time I try to configure what with the illuminance.

This time I'm trying to figure out how to turn on a switch when the mode is day or evening only (and only between 1pm and 9 pm). if the illuminance becomes lower than X.

Also, I don't want the light to come back on if I turn it off afterwards until next day.

I have create a global variable and create an app that reset the value when mode change to night. But I'm not sure if this work correctly..

Any advice?

You don't appear to check whether the illuminance is actually below X. Your Trigger should be changed to check this instead of simply that the value has changed.

You could also use the private boolean that is available in the rule itself, rather than needing to setup a global variable, if you want, unless you use the variable elsewhere. You will still need to reset the private boolean like you are in the second rule, just changing the action to set the private boolean for rule 1, instead of the global variable. I do something very similar to this to control my blinds. Let me know know if you are not sure about how to do this and I can provide some screenshots.

Indeed, if you could put some screenshots it would help me a lot :wink: Thank you.

For the illuminance, yes I know.

I put "changed" temporarily. The time to find the right value to put. I can then easily trigger the action by passing my hand in front of the sensor.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.