Hello,
I want to change some elements on a thermostat card. Up to know I have this:
type: thermostat
entity: climate.thermostat_wohnzimmer
name: Wohnzimmer
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 }};
}
This changes the background color depending on a sensor state, works fine.
Now I also want to change the color of the temperature shown in the slider-center. I used the DOM inspector to copy the js path of the div slider-center, copied this to the card-mod-helper and got this as a selector:
“#view>hui-view>hui-masonry-view$#columns>div>hui-card-options>hui-thermostat-card$#slider-center”.
But now I have no idea how to use this selector to change the color. It would be great if someone could point me into the right direction.
Thanks!