type: custom:mushroom-chips-card
chips:
- type: action
icon: mdi:lightbulb
icon_color: >-
{%if(((state_attr('light.office', 'brightness') | float(0)/255*100) |
round(0)) == 100)%} green {%else%} red {%endif%}
tap_action:
action: call-service
service: light.toggle
data:
brightness_pct: 100
target:
entity_id: light.office_light
doesn’t work, but using the dev tools templates:
{%if(((state_attr('light.office', 'brightness') | float(0)/255*100) | round(0)) == 100)%} green {%else%} red {%endif%}
works fine and returns red or green based on the brightness set.
Thanks