Describe the solution you'd like
I have several plotly cards with very similar and lengthy configuration, especially for the YAML elements default, layout and hours_to_show.
Rather than duplicating the configuration in each card, I would like to define templates of config once in the dashboard file (or separate file) and specify one or more templates in the plotly card that would then be merged in.
This would allow me to update the template config, eg. adjust where the buttons are, and all the cards that use the template will reflect the change.
Describe the solution you'd like I have several plotly cards with very similar and lengthy configuration, especially for the YAML elements
default
,layout
andhours_to_show
.Rather than duplicating the configuration in each card, I would like to define templates of config once in the dashboard file (or separate file) and specify one or more templates in the plotly card that would then be merged in.
This would allow me to update the template config, eg. adjust where the buttons are, and all the cards that use the template will reflect the change.
How would it be defined in yaml? Similar to config_templates into GitHub - RomRider/apexcharts-card: 📈 A Lovelace card to display advanced graphs and charts based on ApexChartsJS for Home Assistant 1
For example a block in ui-lovelace.yaml:
and several cards could then use that template, overriding only what is necessary, mainly the entities involved:
and a similar one for electricity demand would yield: