!include needs the path to the file in your config folder, it has nothing to do with files downloaded by your browser which means that /local/... means the real /local folder on your server for !include
Eg: if your file is in /config/templates/file.yaml (with /config being your HA config directory), your include needs to be: !include templates/file.yaml
Hey @jimz011 , have you also had any problems with the style of your entities since one of the updates to 1.10.x?
I use the same anchor code as you to set the style of my buttons, depending on the state of the entity.
Previously, for unavailable entities, the icon was hidden and they were âgrayed outâ. But since one of the updates only the icon is hidden and the background has the same color as the one of activated buttons.
Also the reachable, but not activated entities should be greyed out a bit. But since one of the updates they also have the background of activated buttons.
for several of my buttons, I changed the label template from reading a sensor in the backend, to calculating this in the frontend, (the number of lights being on)
label_template: >
var i;
var entities = entity.attributes.entity_id;
var count = 0;
for (i = 0; i < entities.length; i++) {
var state = states[entities[i]].state;
if (state === 'on') {
count += 1;
}
}
if (count === entities.length) return 'All ' + entities.length + ' Hallway lights on';
if (count === 0) return 'No Hallway lights on';
return 'Hallway lights on: ' + count + ' of ' + entities.length;
I have several other buttons doing other live calucalations, instead of reading the state of existing sensors/entities.
It seems to me, (and to my vents) that this is rather processor intense, and takes a lot of the system. Being the HA or my devices, I am not sure. fact is I am experiencing more and more time outs on the full system, and my Hue lights are beyond stability. So much even, that with restarts, they will often not show up at all.
Ive had this unfortunate experience before with the card set to auto (for the light color). Since this also calculates the temp, the took a lot of the system, and resulted in the same lag and unresponsiveness. Changing to auto-no-temperature solved that. Which was immediate proof of the systems burden under that setting.
Id like to be advised about this matter, and hear why this is happeningâŚAnd, if some dedicated setting could prevent it, improve on it, or other tis you might have.
Thanks!
Again, everything in the button-card is calculated by your browser. Nothing (!!) happens on the HA instance.
However, the lag that you might feel probably comes from the fact that you use *_template everywhere (too much?). In that case, when a button uses a *_template, I donât have any other solution but to recalculate the entire button every time any entity from your whole HA instance is modified (because I donât know what you are using in the *_template). So for you, the browser is probably recalculating the entire display every half second.
This has nothing to do with anything related to LL
that simply isnât true. But it is not only the button card causing it, it happens with the mini-graph card, and another custom card also. Lovelace itself apparently takes a lot of effort of the instance. Reported about that before and elsewhere.
its not that I feel it, it is the system hanging, hue lights showing unavailable (which is an indicator for internal issues) and many many timing warnings in the log.
I understand, and this is probably the culprit indeed. Which of course is an enormous issue⌠If the system has to recalculate the entire page constantly for only 1 template, and we are all showing the lights brightness eg on lights buttons etc etc, then where would this lead us?
Iâve asked/wondered before: before Lovelace, using regular HA, we were accused of overloading the frontend with niceties when using custom-ui. Now, with Lovelace, where all frontend niceties rely on (custom) cards this is built-in the system. Lovelace is only front-end as you said, and of course it is. But if the system canât handle that properly, what can we doâŚ
The button card doesnât do anything with HA. However the mini-graph-card calls the history API to retrieve the data (that is I/O heavy especially on a raspberry pi). So I can assure you that button-card doesnât introduce any load on your instance.
The browser (not HA) recalculates only the buttons with *_template not everything, but if all your buttons have a template, unfortunately I canât do anything (unless introducing a new parameter in wich youâll have to declare entities that will trigger a button update)
Use card-modder to change the background color, config-template-card to do it based on the temperature. Youâll not be able to achieve the same thing with button-card.
Something new that crossed my path today - all my Zwave devices entered into a ânot availableâ state and every button-card tied to a Zwave entity simply stopped working. No visual indication that something was amiss appeared aside from the buttons simply not responding. Other Lovelace cards, for example slider-entity-row, actually showed an âEntity not availableâ error.
Is this something I simply need to configure with my buttons or does this functionality not yet exist?