Rule Restrictions

I have created two basic rules
1 - to run between sunset and sunrise (Night time)
2 - to run between sunrise and sunset (DayTime

2 seems to run all the time regardless of time of day

what am I doing wrong?

Rule 1

When Upstairs Hallway Sensor activates ...
Dim Upstairs Hallway to 12
Wait 1 minute
Dim Upstairs Hallway to 6
Rule and pending actions can run ...
Only between Sunset and Sunrise

Rule 2

When Upstairs Hallway Sensor activates ...
Dim Upstairs Hallway to 100
Wait 1 minute
Turn off Upstairs Hallway
Rule and pending actions can run ...
Only between Sunrise and Sunset

FYI, sunrise here is 7:19 and sunset 19:48
current time is 8:31 and the rule 1 rules runs now

in the basic rules list I see
image

A screenshot of the rule itself might be worthwhile as well, not that you haven't done a good job of capturing the details, both are useful, just sometimes there can be little things that a snapshot of the screen can reveal...

this part or more?
image

I'm tempted to be greedy and ask for more, the rule seems ok, which I guess is the point of the post.. but there must be something causing it....

And actually, based on your comment in the OP you talk about rule 2 being one that runs all the time, so seeing that one completely would be good.

@thebearmay has probably written an app by now that does what you need... :rofl: :rofl:

2 Likes

Might want to see what the rule thinks it is (including date) - I normally set a couple of variables at the top of the rule when I'm checking these.

1 Like

I was close.... :slight_smile:

1 Like

At one time or another I've done that, and thought about putting it in the information driver but it seemed redundant, they're readily available at location.sunrise and location.sunset

1 Like

That is true, if the hub can't give it to you, seems like overkill to seek it out as part of a Community driver, better to spend the time getting the hub spot on.

Anyway, enough of my tongue-in-cheek commentary... back to the original question..

Most common issue when using sunrise-sunset is that the hub location is not set correctly - Settings|Hub Details will show you the current date/time along with sunrise and sunset for the location. If they aren't correct check the latitude and longitude to make sure they are pointing at the correct location.

1 Like

I am still earning the acronyms here...
i think i put all in the below
it seems the rules restrictions are operating in reverse

image


so in a basic rule when restrictions are entered for a time range

that then RESTRICTS the rule from running during those times or the opposite?

The condition defined by the restriction must be true for the rule to run.