sunset/sunrise question in 22251
-
Been fighting with my Day/Evening/Night modes of late. Thought I had them working just right but after deploying 22251 yesterday evening something "happened." (Note, I've been holding off on reporting what I think is a bug using the sunrise/sunset settings in rules wherein they won't hold a setting until I destroy and recreate that criteria a second time.)
My rulesets:
I had to one-eyed add the
mode
restrictions at midnight after being awakened from a sound sleep.I'm trying to keep my rules slim/trim after finding many duplicate/conflicting rulesets during a review over the past few days.
For Days, I should be present, it should start at 0630 ET each weekday, 0730 ET each weekend day (as sunrise often comes after those times.) No concerns about crossing the "midnight divide" with
day
.For Evenings, I should be present, it should start at sunset and end at sunrise (note: that sunrise thing won't ever happen as one goes to bed at SOME point and invokes
night
) but I do have the logic in there so the system doesn't switch today
or just get lost at midnight if I'm up late.Any thoughts on how to make this cleaner but not be awakened at midnight? lol
-
In your Day rule, you have "before sunset" as a condition. That means the test will be true from midnight to sunset, false from sunset to midnight, and then go back to true at midnight, every day. Is that consistent with your intentions? IMO, Day isn't day until after sunrise (i.e. the period between midnight and sunrise isn't Day, it's part of Night to my thinking).
Oh, and in Evening, your two conditions "after sunset" OR "before sunrise" can be written as a single condition "between sunset and sunrise".
-
In your Day rule, you have "before sunset" as a condition. That means the test will be true from midnight to sunset, false from sunset to midnight, and then go back to true at midnight, every day. Is that consistent with your intentions? IMO, Day isn't day until after sunrise (i.e. the period between midnight and sunrise isn't Day, it's part of Night to my thinking).
Oh, and in Evening, your two conditions "after sunset" OR "before sunrise" can be written as a single condition "between sunset and sunrise".
@toggledbits For Days the issue is that sunrise often comes after alarm times. Would "after sunrise"
or
"when alarm times istrue
" better address?Re Evenings, I wasn't sure with the midnight crossover that the "between" would address the needs.
-
@toggledbits For Days the issue is that sunrise often comes after alarm times. Would "after sunrise"
or
"when alarm times istrue
" better address?Re Evenings, I wasn't sure with the midnight crossover that the "between" would address the needs.
@gwp1 said in sunset/sunrise question in 22251:
For Days the issue is that sunrise often comes after alarm times. Would "after sunrise" or "when alarm times is true" better address?
I can't really answer this, not knowing enough about your rules and how Alarm Times works. I'll leave it to your experimentation, I just wanted to point out that there's a significant number of hours that may not comport with your intentions.
@gwp1 said in sunset/sunrise question in 22251:
Re Evenings, I wasn't sure with the midnight crossover that the "between" would address the needs.
Very important feature that it handles midnight crossing correctly on all time conditions.
-
@gwp1 said in sunset/sunrise question in 22251:
For Days the issue is that sunrise often comes after alarm times. Would "after sunrise" or "when alarm times is true" better address?
I can't really answer this, not knowing enough about your rules and how Alarm Times works. I'll leave it to your experimentation, I just wanted to point out that there's a significant number of hours that may not comport with your intentions.
@gwp1 said in sunset/sunrise question in 22251:
Re Evenings, I wasn't sure with the midnight crossover that the "between" would address the needs.
Very important feature that it handles midnight crossing correctly on all time conditions.
@toggledbits Ok, this has surfaced the potential bug I referenced in my OP.
I'm attempting to edit the Evening ruleset to change to "between sunset and sunrise". I add the trigger:
I click
save
andexit
Rule shows as
SET
The trigger has changed to "from sunrise to sunset"
And now my system is fighting over Day vs Evening.
EDIT:
Further, editing the trigger does not prompt forsave
- it's as though the change in the trigger isn't seen.Further testing... adding a new trigger of "after sunset" and clicking
save
switches to "after sunrise". -
@toggledbits Ok, this has surfaced the potential bug I referenced in my OP.
I'm attempting to edit the Evening ruleset to change to "between sunset and sunrise". I add the trigger:
I click
save
andexit
Rule shows as
SET
The trigger has changed to "from sunrise to sunset"
And now my system is fighting over Day vs Evening.
EDIT:
Further, editing the trigger does not prompt forsave
- it's as though the change in the trigger isn't seen.Further testing... adding a new trigger of "after sunset" and clicking
save
switches to "after sunrise". -
OK. I would have liked to see a bit more concise description in that OP (e.g. "sunrise/sunset selections not saving when edited"), but found and fixed. Another thing you might have observed is when you changed those menus to
sunset
first andsunrise
second, you didn't get the green bar on the left of the condition, indicating that it had been changed.I'll do a build later today with the fix. In the meanwhile, you can work around it by changing the sunrise/sunset start and end to what you want, then edit the offset to something and then re-edit and put it back to 0 (or whatever you want). You should get a green bar on the left side of the condition when you do that.
-
OK. I would have liked to see a bit more concise description in that OP (e.g. "sunrise/sunset selections not saving when edited"), but found and fixed. Another thing you might have observed is when you changed those menus to
sunset
first andsunrise
second, you didn't get the green bar on the left of the condition, indicating that it had been changed.I'll do a build later today with the fix. In the meanwhile, you can work around it by changing the sunrise/sunset start and end to what you want, then edit the offset to something and then re-edit and put it back to 0 (or whatever you want). You should get a green bar on the left side of the condition when you do that.
@toggledbits My screenshots were a step-by-step thru the issue. "I click
save
andexit
"does show that there is no green bar next to the edited trigger. -
Yes, I could see that. I was referring to the OP, which you also made reference to. Fixed now. Build coming later.
-
@toggledbits My screenshots were a step-by-step thru the issue. "I click
save
andexit
"does show that there is no green bar next to the edited trigger. -
Yes, I could see that. I was referring to the OP, which you also made reference to. Fixed now. Build coming later.
@toggledbits I wasn't sure at the time of the OP post that it was a legit bug and not just... me.
-
T toggledbits locked this topic on