Skip to content

Initial Add of Night Mode for a133p devices - #1898

Open
michstmatt wants to merge 7 commits into
spruceUI:Developmentfrom
michstmatt:feature/night-mode
Open

michstmatt wants to merge 7 commits into
spruceUI:Developmentfrom
michstmatt:feature/night-mode

Conversation

@michstmatt

@michstmatt michstmatt commented Oct 21, 2026 •

Copy link
Copy Markdown

Inspired by NextUI, this adds a Night Mode action for the TrimUI Brick. Toggling it sets the display settings to pre configured values. These values are updated via a new extra settings menu option. When the toggle is o
n it saves current display settings to a temp location where they will be restored back when the toggle is off.

Screen Shots

BrickPro_2026 10 21_15 47 07_2895 BrickPro_2026 10 21_15 47 29_2895

@chrisj951 chrisj951 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR mainly looks good for me but i'd like an option in the menu to toggle between night mode on/off instead of physical toggle only.

Otherwise this setting will show up but only work on devices with physical switches unless I am misunderstanding.

)
)

option_list.append(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually to keep it simple just wrap this in

if Device.get_device().supports_night_mode_settings()

And set it to false in devicecommon and true into the a133p devices. We can expand from there

@michstmatt

Copy link
Copy Markdown
Author

Thanks! I noticed that silent mode and quiet mode don’t have the ability either to be enabled from the UI. I could see a couple options: 1 it could be its own setting for night mode (on / off) or 2 a mode selector (Quiet Mode, Silent Mode, Night Mode).

Eventually there could be user defined modes

@chrisj951

Copy link
Copy Markdown
Contributor

Thanks! I noticed that silent mode and quiet mode don’t have the ability either to be enabled from the UI. I could see a couple options: 1 it could be its own setting for night mode (on / off) or 2 a mode selector (Quiet Mode, Silent Mode, Night Mode).

Eventually there could be user defined modes

Yeah for now add the simple if i posted and we can expand from there. That way the pr doesnt get too large

@michstmatt

Copy link
Copy Markdown
Author

updated to enable on a133p devices

@chrisj951

Copy link
Copy Markdown
Contributor

The magicx devices don't have a switch, can you leave them not implementing an override please

@michstmatt

michstmatt commented Oct 22, 2026 •

Copy link
Copy Markdown
Author

Sure I’ll update that. One thing will be an issue which is the current display and backlight controls, most device providers update the display directly. This causes 2 issues 1 is with night mode on, the current display settings reflect night mode because it reads directly from the device and allows you to update the device. Issue 2 is resume from sleep.

I think the right solution is to keep both display values for normal and night mode in the config. Updating the UI settings updates the config. This would be more desired state config so we’d just need to reconcile this state but I think we can handle that. Specifically the display settings would only update the display if the device is in normal mode, similarly with night mode. On boot/UI reload we should update the devices display setting so it’s consistent with what’s in the config json

@michstmatt

Copy link
Copy Markdown
Author

I went ahead and made night mode a UI first experience. It supports all devices by defining two sets of display parameters, basically day and night mode. Each sub display entity is only updated if the system supports it. For the hardware toggle, I put it behind the device feature flag. Not sure if this is controversial but I felt like it was weird to have only backlight on the main settings screen, so I promoted display settings to where backlight was, and added the night mode switch and settings there.

@chrisj951

Copy link
Copy Markdown
Contributor

I went ahead and made night mode a UI first experience. It supports all devices by defining two sets of display parameters, basically day and night mode. Each sub display entity is only updated if the system supports it. For the hardware toggle, I put it behind the device feature flag. Not sure if this is controversial but I felt like it was weird to have only backlight on the main settings screen, so I promoted display settings to where backlight was, and added the night mode switch and settings there.

Only backlight is there because it's the main one people will change regularly. The others are tweaked once, if at all, by most users so they're left further back in the settings to keep the main page as a quicker access point, with less used ones in deeper menus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants