Restriction problems with sunset

I have a simple rule, "If motion sensor trips, set lights to 25%, then wait for motion to stop for 10 seconds and turn off the lights." This is to keep me from tripping over the dogs at night when we go to bed. I set a restriction so the rule only runs between 10:00 p.m. and sunrise, as I typically go to bed somewhere around 11:00 p.m. and this has worked well.

However, last night I noticed that the rule did NOT run when I went to bed at 12:10 a.m. This is obviously between the 10:00 p.m.-sunrise period. The motion detector tripped (I was watching the dashboard that has that sensor in it), but the lights did not turn on. I removed the restriction and the rule ran as expected. It appears that, for some odd reason, the system assumed midnight was equivalent to sunrise and disabled the rule. Am I missing something here?

HE version, Basic Rules Version 1.0.6 (3/15/2022)

Follow up: I just changed the restriction to allow the rule to run from 10:00 p.m. to 6:30 a.m. to see if it's the "sunrise" bit that's wonky. I'm not thrilled about staying up until after midnight to test it, but I'll keep you posted.

1 Like

Check your zone and time settings under hub details and make sure your lat/long are correct.

Time zone, latitude/longitude, location, that's all correct.

As I had mentioned, I changed the restrictions from "10:00 p.m. to sunrise" to "10:00 p.m. to 6:30 a.m." and that worked fine (tested it by actually getting up and triggering the motion sensor at 12:30 a.m.). So, it appears that "sunrise" doesn't work as advertised. I had seen other threads that said that those values (sunrise and sunset) were problematic on earlier versions, but were supposedly fixed with a release earlier than I'm running. Ah, well.

I can live with the "6:30 a.m." bit rather than sunrise, as here in So Cal it's rare for 6:30 a.m. to occur before sunrise. For those few occasions, no big deal.

How about changing 'Sunrise' to 'Sunrise with an offset of 1'.
Does that work OK?

Hadn't tried that, but I can give it a whirl. I'm assuming you mean something like "sunrise + 1 minute", correct?

I'll try that tonight. Another late night (er, early morning) foray into the nuances of HE (insert sound of amused sigh here).

Yes. That is what I was thinking.

TBH though, it should work with Sunset only.

Can you post a screenshot of your rule so that we can have a look and make sure there is not something obvious wrong with it.

As the rule stands right now:

When Back Hall Motion activates ...
Dim Back Hall Lights, Main Hall Lights to 20
Wait until Back Hall Motion motion stops and stays inactive for 10 seconds, then ...
Turn off Back Hall Lights, Main Hall Lights

Rule and pending actions can run ...
Only between 10:00 PM and 6:30 AM PDT

Oh, and @bobbles, since you appear to be a Brit, my moniker of "jagguy" is because I have a '67 Jag 340 (a proper one, right-hand drive), a '70 Jag E-Type OTS (left-hand drive) and a 2016 Jag XF-S (my daily driver, also left-hand drive).

Stop me before I buy more of the ruddy things! :smiley:

1 Like

That should work OK.
Had you edited the rule the day it did not work? Just wondering if it needs to go through midnight to pick up the sunrise time.

Is it Inspector Morse's? :slight_smile:

Very nice. Love that car. A true British classic.

That should work OK.
Had you edited the rule the day it did not work? Just wondering if it needs to go through midnight to pick up the sunrise time.

To be honest, I don't recall the sequence of events. I set up the rule and went to bed around 11:30 p.m. (2330) and it worked as expected. The next night, I got wrapped up in something and didn't go to bed until about 12:10 a.m. (0010) and it didn't work (dashboard said the motion tripped, but no lights), so that's when I changed the rule to the 6:30 a.m. thing (yesterday). Last night, I specifically got up at 12:30 a.m. to test it and it worked. So the first iteration did go through midnight and should have picked up sunrise, but something went wonky.

As to the 340, I thought Morse had a earlier Mark 2. Mine is the 12th from last 340 made, in Warwick Grey (more like an antique white) with a red Ambla interior. Delivered in London and I have the original plates (LRU425F). His name is "Basil" (after Basil Fawlty because he can be a bit, uhm, shall we say "cranky"). I bought it from the original owner's widow (they had emigrated to Los Angeles back in the 1990s).

The E-Type is a 4.2L Series 2 OTS, BRG with tobacco interior, white hood and named "Petula" (after Petula Clark, a favorite singer and, yes, I'm an old fart). The XF-S is "midnight sapphire" with a black interior and just named "Jag". The infotainment system and bluetooth to my Android phone play up occasionally, but other than that he's been a good car.

1 Like