I use a device with an older Android version which doesn’t have dark mode.
So, even with the theme set to auto, it is always Light theme…
Is there a solution to switch theme by hour ? Or sunset ?
I found a solution here with an automation that calls the frontend.set_theme service but it is deprecated and doesn’t work…
Hi, thanks for your help !
It seems to run ok but doesn’t really work, in fact the theme is still dark wathever the automation set.
I tested the frontend.set_theme service via the tools and there is something strange: if I change the theme and set the mode to dark, it successfully changes the theme but if I do the same thing by setting the mode to light, it doesn’t change the theme at all (I tested with Home Assistant theme and Google theme, which can successfully set in light mode by the user settings).
It could at least change the theme and keep it in dark mode, but no, it doesn’t change the theme at all.
I tested with two users, in user settings theme by default and auto mode (tested with light and dark too).
Edit: Plus, I can see il changes the theme only for my current user, not for the tablets…
Ok, I got the point!
Installed Google Light and Google Dark themes separatly and it works.
I didn’t quite understand the light and dark mode either, I thought it was to activate the mode and I’ve just realised that it’s to replace the theme in this mode only…
Thanks for your help!
I’ve been battling against setting the theme to dark or light mode for the past few hours and then came across this post. Why is there a “mode” setting in the HA docs for “frontend.set_theme” if it is not possible to set it to “dark” or “light”? Is it a bug?