All card-mod-related info on a bar-card readme may not reflect latest changes in card-mod. That is why I suggested to check docs on a card-mod github.
And as I already said -
This may never happen.
Suggest to ask a question in the main card-mod thread.
Besides, the 1st post of that thread contains a link (in the end) which leads to a list of examples, find there examples for bar-card, might be useful.
In general, card-mod should be used as
type: custom:bar-card
...
card_mod:
style: ....
Not that it is defined on a cardās level, not per-entity; and also note that missing ācard_modā keyword.
The first post of that thread doesnāt actually instantiate card-mod, it just goes straight to style, which is what I worked from and then was corrected by you.
Iāve found the problem, now. The per-card card editor on Safari is randomly removing chunks of my config. Itās only when I go into the dashboard editor that I can actually see everything. Iād use Chrome, but that has its own issues.
i figured it out how to use target with the value from an entity with the suggested config-template-card:
hereās an example code with the Tesla Car Battery and target value from the Charging Limit that is currently set in the Tesla App (80% in the picture):
Suggest to define āsensor.tesla_charge_limit_socā as monitored by config-template-card, i.e. add it into the āentitiesā section, otherwise the card will be not updated after changing this helper.
If by āindicatorā you mean a small ātriangleā (like an arrow) - it is shown when an entity is constantly changing (up, down). I do not know the exact algorithm - but probably the card tracks a valueās gradient within some fixed time period; if the gradient is not 0 ā show an indicator. So the indicator sometimes is displayed, sometimes not.
I am not using the indicator myself; imho it is not very informative.
ok that makes sense. thanks for your explanation.
if the algorythm is working like that, it may be a too long timespan for the big car battery to increase to the next percent. So maybe thats the reason it is never shown for me.
would be a nice feature to see if it is charging. so maybe iāll replace the icon with cardmod to show if its plugged in in and acutal charging.
You may analyse a ābinary_sensor.chargingā (or whatever): if it is ON ā colorize the icon by card-mod as you suggested yourself (ask in the main card-mod thread for details if needed).