I wonder…is it possible above type of configuration if dashboad is not in yaml mode? I mean, to have one single file with all “declulttering templates” inside and then just call it from dashboard? I guess not, because i get an error when trying to save if i make that file and then try to call it with
at the beginning of selected dashboard (by edit dashboard → raw configuration editor, inserted before “view”)
It would be nice to work, though… i have same templates in three dashboards…
Imho most of experienced people are using yaml-mod.
Storage mode is basically for testing something.
And yes, for dashboards in storage mode I need to paste a particular decluttering template into a “raw” file - just for testing.
Weah, welll, i like to have UI available. Many things can be done way quicker than write whole code for each and every little thing… apart that, i’m not exactly “experienced” guy, i’m still learning…
Nonetheless, HA owners tend to “force” all addon writers to comply their code with UI interface, so i guess running in UI is something which is prefferred.
I had to indent my decluttering card file. An entry looks like this:
# card with main entity and lock entity
locking-thing:
card:
type: 'custom:button-card'
entity: '[[thing_entity]]'
name: '[[thing_name]]'
template: standard-button
triggers_update: all
aspect_ratio: '[[aspect_ratio]]'
styles:
... and so on
Also note that the first line after the defining name is “card:”
You cannot use !include in storage mode.
In storage mode every dashboard (i.e. all views, all cards) is stored as one json file.
When using the Lovelace editor, this code is auto-converted to yaml; after saving again turns into json.
“Raw configuration editor” - when the whole dashboard is converted into yaml.
Trying to use “!include”, “!secret” here will cause an error on saving.
Means - all decluttering templates have to be added explicitly (not by “!include”).