Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Question about changing Themes

$
0
0

@tescophil wrote:

OK, So i was new to themes until today. I enabled themes within my configuration.yaml and then used the HACS to install a bunch of themes. I switch between themes my going onto my user profile page and selecting a theme from the dropdown.

I found a dark theme that I like, so decided to setup a simple input_boolean to switch between dark and default themes using an automation:

- id: change-to-dark-theme
  alias: "Switch to Dark theme"
  trigger:
    - platform: state
      entity_id: 
        - input_boolean.enable_dark_mode
      to: 'on'
  action:
    - service: frontend.set_theme
      data:
        name: slate
  
- id: change-to-light-theme
  alias: "Switch to Light theme"
  trigger:
    - platform: state
      entity_id: 
        - input_boolean.enable_dark_mode
      to: 'off'
  action:
    - service: frontend.set_theme
      data:
        name: default

However, switching themes with the automation only changes the theme on the Lovelace cards, and not the entire UI i.e. The background, top and side menu bars still use the old theme.

So, is this a bug or a feature ? What I want the automation to do is have the same effect on the UI as when I select the theme under my Profile.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>