Basic Rule running despite being restricted?

I can't figure out what is incorrect about my rule setup. I want to turn on a light switch every morning at 6am, unless the sun already came up (summer time), and turn back off 20 minutes after sunrise. My assumption is the "wait until" portion of that would simply not be relevant if the initial turn on trigger is restricted in the first place, but who knows, maybe that's the issue?

When Time of Day is 6:00 AM ...
Turn on Front Door Smart Switch

Wait until Time of Day is 20 minutes after sunrise , then ...
Turn off Front Door Smart Switch

Rule and pending actions can run ...
Only between Sunset and Sunrise

I also tried toggling the restriction to Trigger Only instead of Rule and Pending Actions. In both cases my switch still comes on at 6am even though it should be restricted since sunrise already occurred. Then as a result, now it never turns off because my wait until time is already in the past (maybe 5:50ish currently) - or at least that's my guess as to why it doesn't turn off.

Do I have something set up wrong? I know I can move this to room lighting probably without issue but I'm still curious to understand what the problem is here.

1 Like

Devs are going to ask for a screenshot of the rule, turn on all logging, and a screenshot of the logs.

I just created a test rule, which is currently saying it is restricted, we will see what happens in 15 minutes.

When Time of Day is 11:30 AM ...
Toggle Virtual Switch

Rule can be triggered ...
   Only between Sunset and Sunrise
1 Like

You have it set so that the rule and pending actions can ONLY run between Sunset and Sunrise yet you are trying to turn off the switch 20 mins AFTER sunrise.
From this I'm assuming the light will never turn off.

Yeah I covered that with them on Reddit, but even with that setting changed the trigger still fires.

This is clearly looks like a bug, I was able to replicate it. @bravenel is this your app?


1 Like

But why does it turn on in the first place then? Turning off wouldn't be a problem then.

And in any case like I said, I tried changing the rule to restrict trigger only, and still it does the same thing (unless the wait until is still counted as trigger?)

Yeah unfortunately I'll have to wait until I get home. I did review the logs though and it looks something like:

6am ON
6am turn on (restricted)

I'll post the actual logs tonight


Yes that log file is exactly what I was seeing as well. Shows restricted but still runs.

1 Like


If 6am is between sunset and sunrise, it will turn on.
Then you are trying to turn off after sunrise and this is where the restriction will kick in, I assume.
I do not use basic rules but I'm just going by your description so I could be missing something really obvious.

EDIT: Oops I missed a bit in your description. :blush:From what you are describing, yes, it should NOT turn on.

1 Like

In their case sometimes 6AM is AFTER sunrise, and it is still triggering the light to come on. As I showed above I was able to replicate the issue with a similar rule.


I can confirm there is a bug with the restrictions in this case. It manifests when the option to restrict only the trigger is selected for the Restriction. A fix for this will be in the next release.


Looks to be fixed (I think in a beta release).

Changed it to 7:55 PM and got this log last night.


No events logged on the device.

1 Like

I'll have to look into getting the beta release if so (can I?). My hub froze again overnight so I'm not sure if there was any kind of update to it. I can't imagine, but is there any chance this bug could've been causing my hub lockups? Every single time it froze at some point overnight, and the only thing running is this basic rule at that time. It's never locked up during the day.

Backups also run at night.

This is not a full new beta cycle they are just testing a couple of fixes before it goes into a patch update for 2.3.9, so no need to sign up for the beta it should be released soon.

UPDATE: It is out now in Release 2.3.9 Available - #4 by gopher.ny


Heck yeah! I'm glad to see a bug fix so soon. I'll make sure to have my hub install the update before tonight. Thanks team!

And thanks @jtp10181 for helping me understand it was a bug and I wasn't crazy :rofl: