Question about Mode Manager app's `midnightHandler`

Good morning! So, the past couple of nights, I've experienced my "Day" lights coming on at midnight. I thought perhaps it was my selection of "night" happening at 12AM bugging something out, so I bumped it back to 11:59 PM, but tonight at midnight, the mode switched to Day once again.

Poking around in the app, I noticed the midnightHandler scheduled job, which I assume is doing some daily bookkeeping for the app. Since I updated to 2.2.4 last night, I figured I'd delete and re-add the app (setting my "night" mode to trigger at midnight again), just in case that improves things, but I'm not very optimistic.

Attaching logs, current app configuration, and the scheduled jobs for the app.

My question is: what is midnightHandler doing, and is it the possible source of my mysterious midnight day-mode situation?

(Edit: to address a likely question, the "day switch" and "night switch" are only used by Mode Manager and Amazon Echo Skill, and are triggered by "Alexa, good night" and "Alexa, good morning," respectively. Normally we go to sleep well before midnight, so use the voice command to transition to night mode from evening.)

Screen Shot 2020-11-17 at 8.41.06 AM


The midnight handler is used when you have 'Later of two times' or 'Earlier of two times' for internal bookkeeping purposes only. It's so the app is not fooled by something like the 'earlier' time being on one day and the later time on the next. It does not cause any mode changes.

1 Like

Thank you! Time for me to cross my fingers and hope the delete/recreate accomplished what I hope it did, then.

Happy to report that deleting and recreating the Mode Manager app did solve the “lights on at midnight” issue. Still no idea how it got messed up.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.