I’m trying to update/change the text of the entity of card using card-mod.
I managed to do the icon and color change but not sure how to do update the text.
- type: entities
entities:
- entity: switch.momentary_garage_door_open
icon: mdi:garage-open
name: Garage door open
state_color: false
card_mod:
style: |
:host {
{% if states('binary_sensor.zone_9')=='off' %}
--card-mod-icon-color: rgba(70,113,148,255);
--card-mod-icon: mdi:garage-lock;
{% else %}
--card-mod-icon-color: rgba(254,195,7,255);
--card-mod-icon: mdi:garage-open;
{% endif %};
}
for example when {% if states('binary_sensor.zone_9')=='off' %}
then the the text of the entity should be ‘door is close’
while for the other state … ’ door is open’
any idea what property should I use in the card-mod schema to switch the text.
I have tried ‘name’ and ‘content’ but that doesn’t work.