Handling very often repeated items in dashboards

I have several dashboards and many views using custom:auto-entities and to keep the less useful stuff from appearing, this appears littered in a few dozen places. More often every time I update this list I have to go to all those places to change it.

         exclude:
            - hidden_by: user
            - hidden_by: integration
            - domain: automation
            - entity_id: '*update'
            - entity_id: '*signal*'
            - entity_id: '*ble_strength*'
            - entity_id: '*rebooted'
            - entity_id: '*reboot'
            - entity_id: '*battery_level'
            - entity_id: '*last_seen'

You can’t do includes in dashboards not in yaml files (and these are not, I’m trying to acclimate to the aggressive anti-yaml movement in HA).

Is there another alternative? Some way to use templates, define the list once and reuse?

Or are the choices put up with it, or move it all the file yaml storage?

Linwood

I use includes all over the place in my dashboards.

Hopefully this will not affect yaml-mode dashboards.

1 Like

In ones stored in the database not a file?

Any chance of an example? I found postings saying you could not, and trying could not find a syntax that worked.

One thing it has impacted, I think, is documentation. While there’s still yaml configuration info in them, it’s far less complete now. They (the infamous “they”) appear to be deferring to GUI dialogs to specify details like layout and doing a more poor job of describing the syntax. I frequently set up a fake dashboard in the GUI and make a setting to look at the underlying yaml.

Happy to provide examples, but not currently at home - will post them tomorrow,

These are yaml files that I have written (yaml, not UI dashboards).

Always like to see examples of clever approaches, but the in-file yaml is not my question, I am asking about UI dashboards (which have YAML underneath).

Gotcha.

I am pretty sure you cannot use includes with UI dashboards.

Right - include, using secrets, yaml-anchors may only be used for yaml files.

No, they are saved as json.

Well, when you edit raw they look like yaml.

I think since they are actually saved as json is the reason that we can’t have comments as that format is not conducive to comments.