Hello,
I would like to add another entities state to the state contents of a tile card.
I got this working this way:
card_mod:
style:
ha-tile-info$: |
.secondary:after {
visibility: visible;
content: " - {{ states('sensor.shelly_ht_wohnzimmer_humidity') }}%";
The problem is, that I already use card-mod to change the colors in the tile card:
card_mod:
style: |
ha-card {
--ha-card-background:
{% set state = ((states('sensor.luften_wohnzimmer')) | string) %}
{% if (state == "Egal" ) %}
{% set color = 'var(var(--paper-toggle-button-unchecked-button-color))' %}
{% elif (state == "Ja" ) %}
{% set color = '#145A32' %}
{% else %}
{% set color = '#78281F' %}
{% endif %}
{{ color }};
}
.info {
{% if states('binary_sensor.fenster_wohnzimmer_alle') == 'on' %}
--primary-text-color: #039be5;
{% endif %};
}
hui-card-features {
{% if states('binary_sensor.fenster_wohnzimmer_alle') == 'on' %}
--primary-text-color: #039be5;
{% endif %};
}
Now I need to combine these things but had no success. It would be great if someone could help me getting this running.
Thanks