I’ve been on a bit of a quest to get my Raspberry Pi Kiosk to boot up in dark mode by default. Let me share my journey and hopefully help others who might be tackling the same challenge.
The Goal:
Enable dark mode automatically for the default theme. This would allow my Pi Kiosk to boot without manual intervention, ensuring my wife sees the screen in the right mode right from the start.
The Challenge:
Dark mode was introduced in Home Assistant release 114, and while it’s detectable on host devices, it doesn’t persist after a reboot. I’ve tried setting it via automation scripts, but nothing seems to stick.
What I’ve Tried:
- Automation Scripts: I set up an on-startup trigger, but couldn’t find a reliable action to set dark mode.
- Manual Override: While I can manually switch to dark mode, it defeats the purpose of a seamless startup.
- Research: I explored the release notes and community forums, but there’s limited documentation on how to enforce dark mode without manual intervention.
The Solution:
After some experimentation, I found that modifying the configuration.yaml file to force dark mode works! Here’s how I did it:
yaml
frontend:
themes:
dark_mode:
primary-color: ‘rgb(33, 33, 33)’
# Add other theme customizations here
default_theme: dark_mode
This ensures that dark mode is enabled by default every time the system boots up. It’s a simple yet effective solution that saves time and provides a consistent user experience.
Why This Matters:
For those integrating Home Assistant into a kiosk setup or a shared environment, having a default theme that persists across reboots is crucial. It eliminates the need for manual adjustments and ensures everyone has a seamless experience.
Final Thoughts:
While the journey had its bumps, it’s rewarding to finally crack the code. Kudos to the Home Assistant community for being such a supportive and innovative group! If anyone has further tips or alternative solutions, I’d love to hear them. Happy automating! ![]()