Dwains Dark Theme

Dwains Dark Theme

A Lovelace Dark theme based on Dwains Dashboard

Created by Léon van der Linden

Prerequisite


  • Make sure you can access youre Home Assistant config files with Samba Share or ssh

Installation Dwains Dark Theme


  • Download the dwains_dark_theme folder and place in your config/theme directory.
  • Make shure you have created a themes folder in youre config/ directory and added the following code to youre configuration.yaml
# Core Configuration
default_config:
frontend:
  themes: !include_dir_merge_named themes/
  • Reboot Home Assistant or after insatllation Dwains Dark Theme

Selecting Dwains Dark Theme


  • Click on youre profile picture
  • By themes you need to select Dwains Dark Theme

image

Automation options


Set HA theme for day and night

  • When you want to switch automatic between the Dark and Light theme based on the sun, please copy the file auto_switch_theme.yaml into youre automations.yaml or directory
  • Reboot Home Assistant
- alias: Set HA theme for day and night
  id: set_theme_for_day_and_night
  trigger:
    - platform: homeassistant
      event: start
    - platform: state
      entity_id: sun.sun
      to: above_horizon
    - platform: state
      entity_id: sun.sun
      to: below_horizon
  action:
    - service: frontend.set_theme
      data:
        name: >
          {% if states.sun.sun.state == "above_horizon" %}
            Dwains Light Theme
          {% else %}
            Dwains Dark Theme
          {% endif %}

Automation for default theme after starup HA

  • When you want to have a default theme after startup HA, please copy the file set_theme_at_startup.yaml into youre automations.yaml or directory
  • Reboot Home Assistant
- alias: 'Set theme at startup'
  trigger:
    platform: homeassistant
    event: start
  action:
    service: frontend.set_theme
    data:
      name: Dwains Dark Theme

Result


![image](upload://eEjeywMzuRU5kXxNaYUrZr2Yfk5.

Enjoy my Lovelace theme? Help me out for a couple of :beers: or a :coffee:!

coffee

1 Like

Thanks for the share but no success to get it working on my up-to-date Hassio system. I have tried both /config/theme as indicated in documentation and /config/themes like you indicate here but none of then work. Selection for theme keeps being inactive in my profile in HA !
Your theme is only composed of one yaml file ??

Thit you reboot ha?

yep restarted ha but not working ? what is the correct folder to use ? /config/theme or /config/themes ? and we agree that I copy the folder containing the yaml file in /config/theme ?

Themes

/config/themes/

Thanks but no way to get it to show up in Hassio for selection in my profile :frowning: Have even rebooted hassio host but not better :confused:

Did this ever get sorted… I am having the same issue… I have rebooted several times and cleared my cache … Theme seems to take effect for the sidebar etc but not when I select Dwains Dashboard. still shows light(default) theme…

For your understanding. The theme is a HA theme based on Dwains Dashboard. It will not effect Dwains Dashboard. You can red this on my github. If you want to change Dwains Dashboard in to dark? Go to settings - intergrations - dwains dashboard - option.

Wow … very quick response… thank-you … and I feel silly I didn’t notice this but that was exactly what the issue was… Also fixed this for my friend as he was having random issue… (his was auto…lol)… Thanks again…

No problem!

Hello,
How can i block some pages from non admin users ?

  • Like in lovelace dashboard, u have the menu option to hide some pages inside the dashboard…