well, yeah, how do you suppose this is going to work? you declare a variable in the config, but you dont use it in your decluttering-template at all?
variables:
- room: buro
the way to go is always to first create the card you want in regular yaml full config. Next , notice you use that identical card for more than 1 few entities. Then, create that identical card config and name/add it in you decluttering templates folder, starting the template with
card:
type: [your type of card]
and then paste the full config of the card.
Last step is removing the real entity_id’s or any other variable you want to ‘declutter’ and add that to the variables with the square braces [[ ]].
lastly, rewrite the frontend using the new template and declare the variables you need in the template.
cut it short: your template does not contain [[room] so it won’t do anything
Oh sry. Did not mention it. I did not use the variable to minimize the reasons the decluttering-card could break:)
Using the following does not work too.
uhm, really sorry, but you are confusing me now… what Test button is that? its not configured in the yaml you show here…
all I meant was, that the call to decluttering_template can only be successful if you have the main custom resource configured correctly.
next you should be calling the card correctly in the dashboard config.
those 2 relative configs should be ok, before you cn even begin to create a type: custom:decluttering-card config .
I can not see an obvious mistake in the latter, so I would think either the main resource is not set up correctly , or the dashboard can not find the templates.
Are you sure there is not a single error in either the dashboard, or the inspector console?
Short explanation: I overlay an image over the floors of my rooms so that floor’s color change with temperature from red (warm room) to blue (cold room). It works without using the decluttering card but code looks cleaner using it.
Hi, I am trying to design a card for my batteries status. I wish to change the icon and the background colors in function of the state of the battery.
I build a card directly in the dashboard and I am able to achieve my objective.
However, when I use the same code (+ the structure for decluttering template) I do not get the same result.
While using the template, I always get the ELSE scenario of the if statements : background : black and icon: orange.
Can anyone help, I think that my problem is the code to retrieve the value of the entity. But, I don’t know how to do it.
Start with the 1st card, remove the 2nd one. Now you cannot even see an error, everything is clipped.
Not to mention a fact that the template should be short and simple at the beginning, then you may add all needed additional functionality after clearing all basic functionality (here - working as a template). Otherwise you are making a common mistake - building monstrous software full of bugs.
I try to set the name off an entity with the state of another entity. I try many things but cannot find the right format to do it in Custom:Decluttering-Card.
The above line of code works great within Button-Card template.
The repo seems to be abandoned.
Although the card works fine in most of cases, there are issues on GitHub and I do not observe any reaction from the Author.
Will be happy to be wrong here.
Have another issue. Think I mentioned it in the repo some time ago with another more complex card config but this is simple:
Have a set of 8 conditional (state binary on) buttons in a grid of 4.
When the binary is on, it fills the grid from the left.
Since most of the yaml of those 8 cards is identical except the entity , I also made it with a decluttering template.
However, using that always ?except when the actual 1st card is on ) leaves the first in the grid unused and shows the first ‘on’ card in the 2nd place holder in the grid …