Hi
I have just started using mushroom cards and am setting up a new dashboard. I am trying to change the icon colour for the chips card at the top of the dash.
I am using the custom chip card. I’ve been searching for a while now and used 3 different templates by following other people’s suggestions but I can not get the icon to change colour depending on state.
I have tried the following code for the individual entity within a custom chip card:
type: entity
entity: binary_sensor.alarm_status
name: Alarm
content_info: state
icon_color: '{{ ''green'' if states(''binary_sensor.alarm_status'') == ''on'' else ''red'' }}'
use_entity_picture: false
type: entity
entity: binary_sensor.alarm_status
name: Alarm
content_info: state
icon_color: |-
{% if is_state('binary_sensor.alarm_status', 'on') %}
red
{% else %}
green
{% endif %}
use_entity_picture: false
type: entity
entity: binary_sensor.alarm_status
name: Alarm
content_info: state
icon_color: |-
{% set state=states('binary_sensor.alarm_status') %}
{% if state=='off' %}
red
{% elif state=='on' %}
green
{% endif %}
use_entity_picture: false
I have tried all 3 icon color templates within a custom template card and the colour does change in that card. However I can not get it to work for chips.
I would be very grateful if someone could confirm that it even is possible and point me in the right direction.
Thanks