[Simple] Lights turning on/off based on motion

Only put any additional conditions to the “light on” flow, or you might get the situation that a sudden increase of brightness (as example) your lights stay on.

1 Like

Maybe this is usable for you.

I’m a bit new into flows / advanced flows.
However, I’m to start using this more frequently.

I’ve a Xiaomi motion sensor to switch on a light bulb when there is a motion, with the help of a Fibaro Relay Switch.
But, I also want to be able to switch the light bulb with a manual switch. This switch is connected to the Fibaro Relay Switch and this is working.

So, I made an advanced flow, where the motion sensor enables the light bulb. This is working.
But when there is motion detected and someone accidental also switch the manual switch, the light bulb gots turned off. But I want to change it such that the light bulb is switched on without a timer.
How can I do this?
Don’t know if I can ask this question in this topic; if not, please mention that and I will open a seperate topic.

(I was not able to share an advanced flow, how do I do that?)

Like you just did. Or use the Flow Exchanger, which can export & import flows directly.

In that same topic you’ll find several example flows on how to control a light without you being left in darkness

.

This one includes a luminance condition of any sensor (while a light does not always have to turn on at daytime), and a check if the light is on or not:

´

Hi Peter,

Thanks.
Switching the light bulb with motion sensor is successful, also with timer.
However, do you know how to overrule this flow when the normal (old fashioned switch with Fibaro Relay) is used. Then a timer of 1 hr should be used, but I don’t know how to setup this.

YW, Cowman,

This is a good start I think:

Hi Peter,

It took a while to find some time to work on this flow.
Because the Flow Exchanger still isn’t working with all templates, I recreated the flow. At first I didn’t know that “push button” was an AVD.
Now I have the AVD included, however, what flow is behind the “Push Button”-AVD?

For your information, I’m using a Fibaro switch to switch a normal light bulb. The fibaro switch is also connected to the wall switch. Currently, Homey doesn’t see any difference between an action with the wall switch and a switch via Homey (i.e. a flow). At least, not with my current Flow.

Hi,

None, it’s just a virtual push button to show the functionality of this flow; I assume you replace it by the Fibaro.
Then the flow would look something like this:

4 posts were split to a new topic: Turn off Roborock Dock when charging is finished

hi Peter, just a question on the flow of yours, as I see it more often. after the fibaro wall switch on request, you have the check to see if the lights are turned off, and if so to turn them on. Why not immediately turn them on? Is that because you use a switch and not a push button?

Hi Patrick
No, it can’t hurt to turn off/on the light when it’s already off/on.
To me it’s cleaner from a logical or programmatical point of view I think.

A more hands-on example to check a light’s state would be:
When…
-button X is pressed
And…
-light A is on
Then…
-turn light A off
Else…
-turn light A on