Sunrise and Sunset don’t work

Always says restricted. Deleted and recreated. Same issue. Yes the time is correct. Yes location is correct. It just started doing this after weeks and now I can’t fix it.

This hub is killing me with all these issues…

Is there a better or different way to do this? If you think it only triggers once you’re wrong. every time it evaluates the light level it triggers.
It’s not one and done so the time has to be restricted. It’s sunrise time right now.

Sounds like what you are wanting to do is too complicated for a single simple rule. From the thread below break it out into 2 simple rules and it should work.

@danpirro I can't really see what you're trying to do. Could you maybe do a screenshot on a laptop instead of your phone?

This is probably to be expected, but can't tell since can't see your rule setup.

2 Likes

It’s a very large picture. Is your phone small? It’s just a simple rule. Luminance goes below 800 and the lights go on. Works great. As soon as I add the restriction of -30 and +30 from sunset it immediately and always says restricted. Time is correct. Localization is correct.

I can't see any part of a rule. All I see is the picture of sunrise/sunset, and the one with Restricted.

I see nothing about illuminance, or the rules themselves.

1 Like


That’s the entire rule. These is an issue with it calculation subset and I cannot fix it. Now it’s not reporting restricted.

You’re too fast lol. I replied to an earlier reply. Appreciate the input

Did you turn on all logging for this rule (and device logs turned on probably would be good idea too), and let the rule run? What do logs show, where does it fail?

And I would say that if you are having a constant triggering from illuminance, that you should consider Rule Machine where you can put in a Predicate to the rule to filter out the triggering better.

You mean sunset to sunset :slight_smile:

1 Like

Yea, I screwed up, so used to typing sunset to sunrise and not set to set.

But that brings up an interesting question, is is supposed to be sunset to sunset like that? Or maybe that is some bug that you can't use both like that in one rule?

Perhaps the problem is that the rule is working as configured but it isn't configured as intended?

1 Like

The issue isn’t the rule. It works. The issue is as soon as I add the sunset plus and minus 30 mins it always thinks it’s restricted until way later. The issue is the restriction not being accurate.

It will be Restricted for all times except for the one hour that begins 30 minutes before sunset. Is that what you intended?

2 Likes

If you look at the App Status page (gear icon), in the section called Event Subscriptions, you should see information like this, only with your sensor and hub name (Location):

Then, nearer the bottom of that page will be a Scheduled Job for tomorrow at 30 minutes before sunset:

Please confirm whether you have similar settings or not.

2 Likes

The answer is - if you edit the rule it breaks and goes restricted until tomorrow. Even a reboot does not fix it. I was trying to guesstimate the lux level and I was changing that value. It’s been fine for days and today I moved it from 800 to 1000 and it’s right back to restricted but I bet it’s ok tomorrow.

Are you past Sunset-30 and before Sunset+30 where you are?

Screen Shot 2022-03-05 at 3.20.32 PM

The rule should show Restricted except for that one hour.

I was right in the time it should work. Tomorrow it will work.

OK, I will in do the same thing here -- sunset isn't happening for a while.

Hmmm, I just set up this restriction below, and it's not saying Restricted:

Screen Shot 2022-03-05 at 4.18.51 PM

But if I change it to this, it does:

Screen Shot 2022-03-05 at 4.20.03 PM

Both of which make sense given the sunset time and current time here.

I'm running on the new beta for 2.3.1, so it's possible that something got fixed here, but I'm not aware of any of this changing since 2.3.0. Hopefully, when you update once 2.3.1 is released it will work right for you.

BTW, it doesn't change whether it says Restricted or not until after Done is hit in the rule.

1 Like