Set theme (option) for specific dashboard

Hello!

Currently I’m creating a dashboard for which I want specific theme settings (namely, I want to change the card background color). The thing is: I only want to set this (and enforce it) for this specific dashboard.

Through the Dashboard YAML configuration I’m able to configure a background. Sadly, I am not able to find any documentation about the Dashboard YAML configuration.

Question: How do I enforce the use of a theme (or override specific theme settings) on a single dashboard?

Bonus question: How do I only open a dashboard without displaying the sidebar and header? (Just like as if you stream a dashboard to a Nest Hub.)

Thanks in advance!

Best regards, Tom.

2 Likes

Im watching this too… probably for the same reason you asked the question.

Nest hub always renders the background in nuclear explosion white.

I dont have a solution for you but I had a go at this and unfortunately it does not work for a nest hub (still renders white)

My next step is to set up a theme with a background image like a .png and see what happens there.

Ive asked the same question on discord and FB

There is 2 options for you that I think might work:

option 1: Duplicate your current theme to create a new custom one.
ex. if you are using ios-dark-mode theme, you can create an ios-dark-mode-new theme easily and assign it to your dashboard. You can do it this way:
-Open the file editor
-Go to the themes folder
-Create a new folder named “ios-dark-mode-new”.
-inside that folder create a new file named “ios-dark-mode-new” (make sure the extension is .yaml when you create it otherwise it won’t work. you can navigate to your home assistant \config\themes\ios-dark-mode-new to check it out).
-back in the file editor open the theme you would like to duplicate, select the whole text, copy and paste it in your new ios-dark-mode-new that you created.
-make changes to what you want to edit (your background for example).
-hit save

  • go in developer tools hit check configuration and if everything is good, hit restart.
    At that point you can edit the dashboard and select your new theme.

Option2: If you only want to add a background image to a dashboard.
-in home assistant click on the 3 dots top right.
-edit dashboard
-click on the 3 dots again
-Raw configuration editor

first line paste this:
background: center / cover no-repeat fixed url(PATH OF YOUR BACKGROUND)

-hit save

pasting that here you will apply that background to all your views in that dashboard.

if you want to apply it to a specific view, instead of pasting at the first line, you will have to scroll down and paste it the line after your view.

I hope that helps

Simon

There’s an addon in HACS called Kiosk Mode, it allows you to stream without sidebar and header.

@TomWis97 I know this is an old thread, but were you able to sort this out? I also have a dashboard that contains views for which I would like to hard code a theme. I’ve done that on each view, but it doesn’t seem to override the theme set in Profile>Theme (whether I set it to a specific theme or Use default theme).

This seems like it’s either (a) not working as intended or (b) should be changed so that a theme specified on a specific view would override the profile theme.

Also, for anyone else reading this and following the instructions provided above, a restart is not required. You can simply reload themes from Developer tools>Services>Reload themes.

1 Like