custom-cards / decluttering-card

🧹 Declutter your lovelace configuration with the help of this card
MIT License
386 stars 30 forks source link

Any way to use this for UI managed dashboards? #42

Closed andreasbrett closed 3 years ago

andreasbrett commented 3 years ago

I can't seem to figure out how/where to add the decluttering templates definitions when using UI managed lovelace dashboards. Could someone point me in the right direction?

What I tried was changing my lovelace config from this:

lovelace:
  mode: storage

to this

lovelace:
  mode: storage

  decluttering_templates:
    my_first_template:     # This is the name of a template
      default:
        - icon: fire
      card:
        type: custom:button-card
        name: '[[name]]'
        icon: 'mdi:[[icon]]'

But this is not valid for the lovelace configuration:

Invalid config for [lovelace]: [decluttering_templates] is an invalid option for [lovelace].

rahaaas commented 3 years ago

You can add templates to the Raw Configuration editor. Not sure if this is the only way to do it. The template should then be available within (but not across multiple) dashboards.

andreasbrett commented 3 years ago

Thank you very much. Worked right away.