Add mode parameter to frontend.set_theme service #1886
Unanswered
Velnius
asked this question in
Other UI enhancements
Replies: 1 comment 1 reply
-
|
If what you're asking for were to be implemented there would probably need to be a new service like |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the enhancement
Description
Currently, the
frontend.set_themeservice only allows setting the theme name (name) and optionallyprimary_color. However, it does not support changing the theme mode (light or dark). This limits the ability to dynamically switch between light and dark modes based on conditions such as time of day, sun position, or sensor data.Why is this important?
Proposed Solution
Extend the
frontend.set_themeservice to accept an optionalmodeparameter:If mode is not provided, keep the current behavior.
Benefits
Currently, the only way to achieve this is by creating two separate themes and switching between them, which is not efficient. Adding mode support would make Home Assistant theming more flexible and user-friendly.
Use cases
Automatic selection of Theme mode (dark or light) based on the time of day. Currently, this can only be done manually. Or you need two separate Themes.
Visual examples
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions