I like to get my light in the living room turned on 20 minutes before sunset. This is working fine most of the time. But on rainy day, it’s too late.
I would like to turn on that light if the lux outside is below 400 but only if it is between “sunset -90” and sunset. The rest of the day, I don’t want to turn them on even if it is dark.
The only way I thought of doing it so far is to create several RM at sunset-x and test the lux on each one of them until I get to sunset-20. But I’m sure there is a nicer way of doing it....
1 Like
mik3
June 1, 2020, 1:07am
2
Try this...
Make a rule that does the following.
Trigger:
Lux device
Action:
If lux is <= 400 and time is between -90sunset and sunset THEN
Turn on living room light
End if
1 Like
There are no time related to sunset in the comparaison
Oups, sorry. Yes there is...
Great thanks
I guess in the action we don’t need to test the lux again since it is in the trigger.
Thanks a lot. It is much nicer that way than what I thought first.
mik3
June 1, 2020, 1:36am
6
Correct.
You may want to setup a Pb too. So it doesn’t trigger the light to turn on over and over.
Trigger:
Lux device
Action:
If time is between -90sunset and sunset and PB is true THEN
Turn on living room light
Turn off Pb
Else if Pb is off Then
Turn on Pb
End if
I’m scratching my head like crazy trying to figure out what a PB is.
I imagine it would be a local variable... but why PB. Lol
mik3
June 1, 2020, 1:58am
8
Private Boolean.
Just think of it as a extra condition to check for. It helps stop repeating actions. My terminology was wrong. It’s not off or on but true or false.
1 Like
Guytas
June 1, 2020, 10:34am
9
Hum.... the lights turned on this morning. There is an issue with the condition. Even if I type -90 it test +90. Look
See in the “manage or create condition” we can see the proper -90. But the top part shows +90 (and it is true right now, at 6:30am)
mik3
June 1, 2020, 10:52am
10
If you change it to -90 sunset and just sunset, removing the -21 does it work?
Guytas
June 1, 2020, 11:04am
11
I had to delete the first two conditions and then I edited the last one. It is now ok.
I guess it is because I had change the condition between a single time to a time between.
Anyhow, now it is false, so it will work tonight.
Thanks again.
Have a great day
Guytas
June 5, 2020, 11:03am
13
Finally, this is working perfectly. We got a rainy day and the light came on earlier. It is perfect. Thanks
2 Likes