Trying for 2 days and read a large number of posts, but I am still unable to change the displayed text on my entity card based upon the switch state. The icon and icon color changes work. Here is what I currently have, any ideas welcome!
type: entity
entity: switch.dome_water_main_shut_off
name: Whole House Water Shutoff Valve
card_mod:
style: |
:host {
{% if states('switch.dome_water_main_shut_off')=='on' %}
--card-mod-icon-color: green;
--card-mod-icon: mdi:valve-open;
--mdc-icon-size: 80px;
{% else %}
--card-mod-icon-color: red;
--card-mod-icon: mdi:valve-closed;
--mdc-icon-size: 80px;
{% endif %};
}
name_template: |-
{% if states('switch.dome_water_main_shut_off')=='off' %}
Valve is Closed
{% else %}
Valve is open
{% endif %}
grid_options:
columns: 12
rows: 2