Assume this is your “dashboards” file:
dashboards:
lovelace-main:
mode: yaml
title: System
icon: mdi:xxxxxxxxxxxx
show_in_sidebar: true
require_admin: false
filename: lovelace/lovelace-system.yaml
lovelace-climate:
mode: yaml
title: Climate
icon: mdi:xxxxxxxxxxx
show_in_sidebar: true
require_admin: false
filename: lovelace/lovelace-climate.yaml
And these are your files for each dashboard:
### lovelace/lovelace-system.yaml
views:
- !include views/system/view11.yaml
- !include views/system/view12.yaml
- !include views/system/view13.yaml
- !include views/system/view14.yaml
### lovelace/lovelace-climate.yaml
views:
- !include views/climate/view21.yaml
- !include views/climate/view22.yaml
- !include views/climate/view23.yaml
- !include views/climate/view24.yaml
Everything is inside this tree structure:
.storage
|_ ...
|_ ...
lovelace
|_ views
| |_ climate
| | |_ view11.yaml
| | |_ view12.yaml
| | |_ view13.yaml
| | |_ view14.yaml
| |_ system
| |_ view21.yaml
| |_ view22.yaml
| |_ view23.yaml
| |_ view24.yaml
|_ lovelace-climate.yaml
|_ lovelace-system.yaml
...
configuration.yaml
Now add a new folder “decluttering-templates” for your templates and create any tree structure inside (like “these templates are for climate only”):
lovelace
|_ decluttering-templates
| |_ common
| | |_ template11.yaml
| | |_ template12.yaml
| | |_ template13.yaml
| |_ network
| |_ template21.yaml
| |_ template22.yaml
| |_ template23.yaml
|_ views
|_ ...
Each file may be 1 decluttering template:
my_template:
default:
...
card:
...
or several templates (like “a bit different representations of same card”):
my_template_1:
default:
...
card:
...
my_template_2:
default:
...
card:
...
And place this string into each file for each dashboard:
decluttering_templates: !include_dir_merge_named templates-decluttering/
views:
- ...
Now ALL your dashboards are sharing same templates.