Dwains Light Theme

Dwains Light Theme

A Lovelace light theme based on Dwains Dashboard

Created by Léon van der Linden

![](upload://aGQCnnDs00dCuPUc5n9bWLr9L7p.png)

Prerequisite


  • Make sure you can access youre Home Assistant config files with Samba Share
  • 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 Light Theme

Installation Dwains Light Theme


  • Download the dwains_light_theme folder and place in your config/themes directory.
  • Reboot Home Assistant

Selecting Dwains Light Theme


  • Click on youre profile picture
  • By themes you need to select Dwains Light 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 Light Theme

Result


image

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

coffee

1 Like