Hello,
I’m new to HA and first time using Markdown.
I would like to show the temperature and humidity data of eight localities in tabular form. Where heating is in use, the row is displayed in a different color. After a long struggle I succeeded, the code is not pretty, but it works. If I arrange it in a table, I cannot change the color of the individual rows. If there is a better and simpler solution, I would like to l earn from it. Thanks.
Termosztát Hőmérséklet Páratartalom
___
{% if is_state('switch.r0_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Nappali {{ states('sensor.homerseklet_0') }} °C {{ states('sensor.paratartalom_0') }} %
{% if is_state('switch.r1_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Háló {{ states('sensor.homerseklet_0') }} °C {{ states('sensor.paratartalom_0') }} %
{% if is_state('switch.r2_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Tetőtér {{ states('sensor.homerseklet_0') }} °C {{ states('sensor.paratartalom_0') }} %
{% if is_state('switch.r3_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Torony {{ states('sensor.homerseklet_0') }} °C {{ states('sensor.paratartalom_0') }} %
{% if is_state('switch.r4_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Vendégszoba {{ states('sensor.homerseklet_0') }} °C {{ states('sensor.paratartalom_0') }} %
{% if is_state('switch.r6_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Műhely {{ states('sensor.homerseklet_6') }} °C {{ states('sensor.paratartalom_6') }} %
{% if is_state('switch.r5_2', 'on') %}
<font color=red>
{% else %} <font color=white>
{% endif %}
- Medencetér {{ states('sensor.homerseklet_0') }} °C {{ states('sensor.paratartalom_0') }} %
<font color=white>
- Garázs {{ states('sensor.homerseklet_garazs') }} °C {{ states('sensor.paratartalom_garazs') }} %
___