Stop actors at night

Hi,
I want to make a flow which turns on the light when it gets too dark.
But only at the day, in the night I want to make a node, which stops the light to turn on.
But the sensor should still gather the lux data.

So the sensor should work full time, but the light only can go on between 6:00am and 11:00pm.

  1. What have you got so far?
  2. Where are you running into trouble?
  3. Have you searched thru the forums and looked at the nodes/flows on the flows page?

This is my flow at the moment.
Every 5min the flow check the Lux value.
If it is greater than x then i set the payload to 0.
Else i set the payload to1.
And if the Big Timer is off.
It should be always off.


The light turns on after a short time, when it should be off.

So if your flow doesn't do what you want think it should do it is worth putting more debug nodes in it, so you can work out where your flow diverts from what you think it should be doing, so I would have debug nodes after every change and switch node to allow me to see what is happening.

There are several different ways of doing what you want.

What I would do is to use your BigTimer node to set a global variable using a change node

(eg Set global.lightSwitchWork to msg.payload)

You can then use a switch after your "Licht ein" to check for this on only pass on a message if allowed by the global variable eg global.lightSwitchWork is "On"

Thanks for your answer.
Ill try this and look if it work like this.