Implement night mode support and improve startup sequence - #33
Draft
penguineer wants to merge 4 commits into
Draft
Implement night mode support and improve startup sequence#33penguineer wants to merge 4 commits into
penguineer wants to merge 4 commits into
Conversation
penguineer
marked this pull request as draft
August 27, 2026 14:20
Member
Author
|
Somehow with this solution the status is not regained after rebooting wittgenstein or restarting the service. This worked before on master. Needs further investigation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a "nightmode" feature to the LED control service, allowing the LEDs to be turned off at night except for a brief period after a state change. The implementation introduces new MQTT topic handling, state tracking, and timing logic to manage visibility during nightmode. It also improves startup and shutdown behavior for the LEDs.
Fixes #32
Nightmode feature and MQTT integration:
MQTT_NIGHTMODE_TOPIC) to enable or disable nightmode via MQTT messages. When nightmode is active, LEDs remain off except for a short visibility window after a state change. [1] [2]Nightmode state management and timing:
apply_physical_statefunction to control LED output based on nightmode and timer state, ensuring LEDs are only shown briefly in nightmode.Startup and shutdown improvements: