Hi all
I’m new to this community and new to HomeAssistant.
I’ve already managed to integrate some devices via ModBus.
Now I’m trying to “tune” a Dashboard visualization.
If a value of an entity is 0, the card should be “green”.
type: tile
entity: sensor.status_heizkessel
icon: mdi:dots-grid
card_mod:
style: |
:host {
color:
{% if sensor.status_heizkessel | int == 0}
greenyellow
{% elif sensor.status_heizkessel | int > 0}
red
{% endif %}
;
}
But, no matter how much I research or try, I can’t get this code working
I tried various ways and snippets I’ve found on the web (e.g. states(config.entity)), etc.
Anyone here who can direct me towards a solution?
Thank you so much - will try that now.
Say - can you let me know the best way to dig into YAML in general and the HomeAssistant concepts in special? The documentation seems to be rather functional, while I would prefer to dig into the topic more object-related (a complete processing of a certain exemplary device into HA).
Hm - interesting (sorry my basic questions - my last time with coding was somwhen around .NET 2.0…).
But even as I reduce the whole script to what D13g0m0nt3s suggested, nothing changes on the surface of my dashboard…
That was the right question… indeed.
While searching for solutions for my problem, I found many code snippets, but not a single hint that this is an add-on…
Guess that solved it… will try the next weekend