Anchors: !include anchors.yaml

Anchors only works in lovelace mode. But if I can add any of these
customize: !include customize.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
group: !include groups.yaml
sensor: !include sensors.yaml
camera: !include cameras.yaml
template: !include template.yaml
why not anchors? I use decluttering card but its not ideal. for things like card_mod styles repeated over and over and over it should be easy to save the code in anchors.yaml and reference it in dashboards in ui or lovleace.

Use card mod themes. Then all you have to add to the card is the class you want, e.g.

card_mod:
  class: top-level-card
card_mod:
  class: graph-card
1 Like

Thank you but I don’t understand. Just like I didn’t understand decluttering-card til I kept reading. Where is more details about this? That’s is great but still feel theres always a hole in the learning curve.

I guess if I could wrap my head around it it would help with styles, but still seems overly complicated. The anchors idea to me is perfect. Just like I keep secrets and reference them in config. I have conesnipets that could be full cards or just styling saved, like a clipboard the can’t be referenced in a card or dashboard. For now decluttering-card is working for me.

Yeah but that is not going to happen. There’s a reason for this:

Something to do with non yaml mode dashboards being stored as json not yaml.

1 Like