Dashboard template color change is broke

I was experimenting with changing the background color on the Switch template for the Off state in one of my dashboards today, and I cannot change it back. I am on version 2.1.4.130, using the latest Chrome on Windows 10.

When I click "Remove" under the Background Color box and click "Save", then close that dialog and refresh the page, I see the change did not take effect. When I go back into the Template Color Editor, I see the previous color still remains. Also a weird behavior, when I click back and forth between the States for Switch, the Background Color box does not change. It remains showing the color selected for Off.

I also tried to just remove the "customColors" block from the Layout JSON. When I click "Save Layout JSON", I get error "Cannot read property 'filter' of undefined".

I am starting to think I am going to have to recreate this Dashboard to get back to the original state.

Any ideas or help?

I am having the same issue. Has anyone found a solution to this bug?

Maybe not a solution, since I don't have this bug. But something to try... Did you try to remove the customColors section from the JSON? Same result as the op? If so, copy the JSON, remove customColors and paste in a new empty dash. If this doesn't work, paste the JSON here and I'll have a look.

Thanks @markus! You know your stuff!!!

I did as you recommended - was able to delete those "customColors" settings from the Layout JSON under "Advanced" in the dashboard settings and it did the trick! The button templates that were problematic are back to the way they were before.

I really hope they spend some time on improving the dashboard again soon... It is quite useful, and there is so much that could be added/improved to make it easier to use!

As a reference... This is the setting that doesn't work for me:

{
  "template": "dimmer",
  "bgColor": "rgb(241,234,23)",
  "iconColor": "rgb(0,0,0)",
  "state": "on"
}

I was trying to make the text/icon black on the yellow background - I find the white on yellow extremely difficult to read...

:slight_smile: Been helping with a Dashboard-related project lately, have dug myself into how it works and even read through must of the JS-code by now.

This should work, the times it doesn't would be when there is corruption in the DB or connection issues to the hub. Or if the editing of the JSON was done wrong... Neither of these things are use-friendly...

So do we all, there's a neat release related to this coming from another dev soon, you might like it :wink:

I hope I don't have any corruption in my DB... I'll have to do some research on this to see if I can rule that out...

Oh! Now I can't wait!!! :smiley:
I'm curious - are you aware of a way that I can be notified when it comes out?

You could change back, so don't worry, that is not the case for you.

Go to preferences, tags and watch "dashboard" :slight_smile:

Oh good! I feel better now. :slight_smile:

Thanks! Nice! I didn't know I could do that. Learned quite a few things today! :smiley:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.