Good evening, would anybody be able to help here im really struggling to get my head around what i need to do.
I would like to change the entity icon colour based on the state of the entity.
I have the below:
type: custom:mushroom-entity-card
entity: sensor.myenergi_zappi_24887740_plug_status
layout: vertical
tap_action:
action: none
hold_action:
action: none
fill_container: true
name: Hedwig Status
double_tap_action:
action: none
I tried adding below but it doesent work:
icon_color: |2
{% if is_state('sensor.myenergi_zappi_2440_plug_status', 'EV Connected') %}
amber
{% elif is_state('sensor.myenergi_zappi_2740_plug_status', 'EV Disconnected') %}
red
{% elif is_state('sensor.myenergi_zappi_2440_plug_status', 'Charging') %}
green
{% endif %}
Any assistance would be appreciated