hello
i want to modify my yaml
i have a button with an icon
but i want to change this icon according of the state of an other entity
this is my code , no errors but not working
type: entities
entities:
- entity: button.x9c1t7_pressed
icon: "{% if is_state('switch.bjx4ws_switch', 'on') %} mdi:lightbulb-on {% else %} mdi:lightbulb-off {% endif %}"
title: werkpl for 1 werkplaats tr cont scripted led
and when i test it : it seems to work as the text changes instead of the icon
thanks in advance