Detecting dark mode

Does anyone know if it’s possible to detect when the dark theme is active in Home Assistant when using the “Auto” theme option?

I have the same challenge in my HA configuration. Would like to configure custom button cards based on the active mode (light or dark) to meet ergonomic aspects of contrast. Did you find a solution, @jason0x43 ?

I did not. I don’t recall exactly what I was trying to do at the time; I think it may have involved badge icons.

At this point I’m not customizing the UI at that level, and the UI’s standard automatic light/dark theme switching does what I need.

Anyone find a solution for this? Google led me here.

Only way I managed to do this is via Browser Mod.
BrowserMod 2.0 generates a dark mode binary sensor

1 Like