Comments (3)
As an example:
configuration.yaml:
homeassistant:
...
allowlist_external_dirs:
...
- /config/lovelace
...
lovelace: !include lovelace/lovelace.yaml
lovelace/lovelace.yaml:
mode: storage
dashboards:
...
system:
mode: yaml
title: System
icon: mdi:home-assistant
show_in_sidebar: true
require_admin: false
filename: lovelace/lovelace-system.yaml
lovelace/lovelace-system.yaml:
decluttering_templates: !include_dir_merge_named templates-decluttering/
views:
- !include views/system/general.yaml
...
Folder lovelace/templates-decluttering
contains files (may be grouped in folders) for decluttering templates - either "1 file = 1 template" or "1 file = several related templates":
..
template_1.yaml
template_2.yaml
lovelace/templates-decluttering/template_1.yaml:
template_1:
default:
...
card:
...
So, each dashboard file (like "lovelace-system.yaml") should include that decluttering_templates: !include_dir_merge_named templates-decluttering/
string to have your templates available.
from decluttering-card.
I'm getting some issues following your steps.
Copy everything and creating the folder + lovelace.yaml. On lovelace-system.yaml I did just for test a fast view instead of import.
decluttering_templates: !include_dir_merge_named templates-decluttering/
views:
- title: Test
cards:
- type: picture
image: https://demo.home-assistant.io/stub_config/t-shirt-promo.png
tap_action:
action: none
hold_action:
action: none
Deleting thse"..." from your example code. I try to validate the config and i get this issue:
"Invalid config for [lovelace]: Url path needs to contain a hyphen (-) for dictionary value @ data['lovelace']['dashboards']. Got OrderedDict([('system', OrderedDict([('mode', 'yaml'), ('title', 'System'), ('icon', 'mdi:home-assistant'), ('show_in_sidebar', True), ('require_admin', False), ('filename', 'lovelace/lovelace-system.yaml')]))]). (See /config/configuration.yaml, line 67)."
Maybe a mistake on the !import
lovelace: !include lovelace/lovelace.yaml
to
lovelace: !include /lovelace/lovelace.yaml
But anyways i had error:
Error loading /config/configuration.yaml: in "/config/configuration.yaml", line 68, column 11: Unable to read file /lovelace/lovelace.yaml.
Thanks for your help!
from decluttering-card.
Check again steps in my post and compare with your setup.
If you still experience errors - then post your "lovelace.yaml", "lovelace-system.yaml" & "configuration.yaml" files.
BTW, your issue is neither a bug nor a feature request.
It is just a question.
I strongly suggest you to ask similar questions in a dedicated decluttering-card Community thread.
These questions should be posted there instead if being lost on Github.
from decluttering-card.
Related Issues (20)
- The card uses non-unique ids for CSS elements inside a card HOT 1
- Card takes up space in a vertical stack card even when all content is hidden
- decluttering inside a core grid card behaves oddly, changes size of the grid tile
- Passing a jinjia template causes an error HOT 1
- Problem with decluttering card and lovelace_gen together HOT 2
- Default referencing variable
- Broken in HomeAssistant beta (2023.4b0) HOT 10
- The automated release is failing 🚨 HOT 1
- decluttering-card references appear broken with Core 2023.4.0 HOT 12
- Polymer will be deprecated in HA 2023.5 HOT 2
- Cannot read properties issue since 2023.4.x HOT 9
- Inherit another template or optional variables? HOT 3
- Allow merge operator for variables HOT 4
- fill_container property not working when used in a template HOT 5
- Decluttering for tile cards not working HOT 1
- Cannot use, e.slice is not a function HOT 7
- e.slice is not a function HOT 3
- Support the visual editor
- Decluttering template card fills two columns in new sections layout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decluttering-card.