Yet another background picture question

Hi all

Sorry for yet another request for help on something so basic, but I really have read everything I could find, and still no joy… my first post so please be gentle!

I am simply trying to create my first theme, and the only thing I want that theme to do is to apply a background to a View within a Dashboard.

I have Dashboard called…Dashboard
In that dashboard I have a view called Home

In configuration.yaml I have

# Load frontend themes from the themes folder
frontend:
  themes:
    - !include_dir_merge_named themes

In the folder /themes I have dashboard_home.yaml

In dashboard_home.yaml I have:

frontend:
  themes:
    dashboard_home:
      lovelace-background: center / cover no-repeat url("/local/wallpaper.jpg") fixed

In the www folder (/local) I have wallpaper.jpg

But… when I go to dev tools and check configuration I get this error:

Invalid config for 'frontend' at configuration.yaml, line 7: expected a dictionary for dictionary value 'frontend->themes', got [{'frontend': {'themes': {'dashboard_home': {'lovelace-background': 'center / cover no-repeat url("/local/wallpaper.jpg") fixed'}}}}]

Finally (unsurprisingly I guess given the above error) when I go to the view Home within my dashboard Dashboard, I do not have anything in the Theme dropdown.

Very grateful for any help to identify the probably laughably basic mistake I am making…!!

Stu

Start with removing 2 first lines.

dashboard_home:
  lovelace-background: center / cover no-repeat url("/local/wallpaper.jpg") fixed

like this in dashboard_home.yaml?

I now get this configuration check error:
Invalid config for 'frontend' at configuration.yaml, line 7: expected a dictionary for dictionary value 'frontend->themes', got [{'dashboard_home': {'lovelace-background': 'center / cover no-repeat url("/local/wallpaper.jpg") fixed'}}]

Try “themes: !include_dir_named”

It makes no difference I’m afraid :frowning:

Well, I am far from PC, this how I described it in another thread:

frontend:
  themes: !include_dir_merge_named themes

Sorry for prev misleading with dir_named.

Thanks! I don’t understand why but this worked:

frontend:
  themes: !include_dir_merge_named themes

whereas this did not:

frontend:
  themes:
    - !include_dir_merge_named themes

When you defined “include” after “-“ - it is treated as a list.

1 Like