I like the default theme, however I can’t find a way to automatically change it to dark mode at night and to light mode at day time. I can’t even set it using the “Services” tab under “Developer Tools”.
The main reason is that I can’t find the name of the default theme which is a required key.
Is it even possible to automatically change the mode of the default theme?
No. The light/dark setting comes from the device viewing Home Assistant.
If you want to change the theme based on sunrise/sunset you have to create two themes yourself. Set the theme in your profile to backend selected and automate switching of the two themes.
You can base your day and night themes on the default light and dark themes using modes.
Between this thread and this one I haven’t been able to automate my theme switching from light to dark based onthe sun. The theme I am using is mushroom but it does not seem the want to change. if I keep the theme dark in the automation it will work with changing themes but as soon as I choose light at the scheduled time it would enable theme switching or change the mode (dark/light).
Seems like you mentioned above this is solved but I am unable to replicate (noting I am new to HA).
2023-12-19 11:41:03.815 ERROR (MainThread) [homeassistant.config] Invalid config for 'frontend' at configuration.yaml, line 162: expected a dictionary for dictionary value 'frontend->themes->day->modes->light', got None, please check the docs at https://www.home-assistant.io/integrations/frontend
Invalid config for 'frontend' at configuration.yaml, line 165: expected a dictionary for dictionary value 'frontend->themes->night->modes->dark', got None, please check the docs at https://www.home-assistant.io/integrations/frontend
I replaced light: with light: {} and did the same with dark.
But set_theme doesn’t change the interface. Looks like it is not enough just to change the theme, some solution is need to apply it.
Has this option been removed? It’s even referenced in the current frontend docs, but I’m not seeing the ‘Backend-selected’ option on any of my devices. I feel like I have to be doing something really stupid…
Edit: I gather the name of this option was simply renamed to ‘Use default theme’ and the docs weren’t updated accordingly. However, I still am unable to force light/dark mode. Here’s what I have in my config:
I think this is the issue. I’m explicitly relying on dark/light mode to display the correct image for my picture element card and I thought/was hoping HA could change this. Seems it can’t (would love someone to prove me wrong).
I added light mode to my day theme and dark to my night theme.
Day theme did not look any different but but when I switched to my night theme it was totally messed up with the default HA light theme as my desktop does not have a day / night setting.
Because my desktop has no day/night setting that HA can use to switch between light and dark modes it was stuck on light mode, even though I specified the dark mode in my night theme.
This is utterly ridiculous that it’s been an ongoing issue for literally a freakin decade. The settings are hidden away in non relevant areas. For Christ’s sake how difficult is it to add in the dashboards section a button for light, dark or device settings? Seriously.