Homey Community Forum

Disable light during day time

Hy guys,
i would like to create a flow to manage my light during day light and i’m not sure if this is the correct place…byaway…

Using Shelly Motion sensor that have also a light sensor i would like to block light during day so with a lumix value i would like to block torn on light.

How i can create a flow to disable light?

i try many ways but no solution, any suggestion?


Lux of Shelly device has changed


Logic - Lux is below ‘pick a value’
Time - it’s daytime


Switch lights of in zone
(or switch off device 1, 2, 3 etcetera)

Not sure what problems you have had, but one problem I have come across while trying to do the same thing is that my motion sensors which also contain light level sensors (I have Aetoec ones but the idea is the same) send a light level reading every N seconds where N is configurable but no less than 240 (I.e. 4 minutes). Problem is you can’t control when that happens so sometimes it takes the light level reading while the light is on, meaning the next time you check the light level in a flow you get a reading which makes it seem brighter than it actually is without the light on.

What I do is this:

  • create a Yes/No variable called (in my case) Downstairs hall dark
  • create a flow (in my case called Apply Downstairs hall light level threshold) that works like this: Shared Flow | Homey
  • create a flow (in my case called Downstairs Hall light level change) that works like this: Shared Flow | Homey - note that the flow triggered by this one in the Then section is the one we just created before
  • finally, create a third flow (in my case called Downstairs hall lights on with movement) that works a bit like this: Shared Flow | Homey - note here I am using a variable to set the light level to dim to so I can use other flows to change that based on time of day, but you could just switch on or dim to 100% here

Because the “Downstairs hall light level change” only triggers if the light is off, you are only ever changing the “Downstairs hall dark” variable when a light level reading is taken with the light off.

This might be too complex for your needs, so feel free to ignore if so!


Thank to @Jonathan_Draper and @Eternity for support!!!
i forgot to specify that also i would like to disable phisical switch if light is sufficient…
i joke with flow , option and after many test now i can manage my light correctly.

With this flow Light command i can change state (turnon/turnoff) my light if lumex is less then a value or light is on.
If lumex is less to a value, phisical switch turn on or off light
If light is turnon , phisical switch turn off light.
I need to put in OR check of lumex and light state because if is night and light is on, lumex is greater then to lumex value and without light state phisical switch don’t turnoff light.
i hope to explain correctly my flow in my basic english :slight_smile:

In order to run correctly this flow i need to change on shelly 1L device switch 1 type to Detached mode…

in this mode, switch 1L return all action but not fire relay.

In a similar way a create a flow to turn on light with a movement alarm activation and light is less to my lumix value and turn off at movement alarm deactivation.

by Marco