#Possible to store a set of default badges in a yaml file and reference them in dashboard yaml

1 messages · Page 1 of 1 (latest)

inland pebble
#

I use the same set of badges on all but a few of my Overview pages. After I edit one I have to copy the badges and edit all the other pages that use the badges. I have copied the current badge yaml data into a file however I am unable to reference that file in the Edit Raw Yaml screen. Is there a way to do this?

uncut stream
#

Home Assistant has two types/modes of dashboards: storage and YAML.
Storage mode dashboards are made with the UI editor and you cannot directly access the file(s) for them. They cannot use !includes or YAML anchors.
YAML mode dashboards are written completely in YAML which you do have access to the files via your preferred editor but cannot be accessed with the UI editor. They can, however, use !includes and YAML anchors.

#

If you want to create a YAML mode dashboard but still have the ability to use the UI for storage mode dashboards, you can set up both. Something like this would need to go into your configuration.yaml file: ```yaml
lovelace:
mode: storage

Add yaml dashboards

dashboards:
lovelace-yaml:
mode: yaml
title: YAML
icon: mdi:script
show_in_sidebar: true
filename: dashboards.yaml

#

If you don't want to jump all in with a YAML dashboard, you might consider the config-template-card.

If you need to use the same variable in multiple cards, then instead of defining it in each card's variables you can do that once for the entire dashboard.
Dashboard wide variables

uncut stream
inland pebble
#

thank you