Hey guys, I know there have been many variations of this posted and I’ve read through loads of them and I can’t figure out what is happening with my ‘if’…
My goal is to change the name of a button based on the value of a input_text.
- type: custom:button-card
entity: script.goodnight
show_name: true
show_icon: true
tap_action:
action: toggle
name: >
{% if is_state('input_text.house_phase', 'Sleep') %}
SLEEP
{% else %}
GOODNIGHT
{% endif %}
(I hope I’ve inserted that correctly… my first time!)
Thoughts?
mr.smith