Hey everyone. I’m trying to set up a custom mushroom chip card which contains my front door lock (among other chips). I want the lock icon to be one color when unlocked and another when locked but I cannot seem to get this to function. I have even copied other user’s yaml configurations and still been unsuccessful. Here’s what I have that is non-functional. This current configuration results in the lock icon remaining white under all circumstances but has no errors reported. I’m sure I’m overlooking something very silly but I’m brand new to coding so feel free to point me to any and all resources to get me on the right track here.
- type: entity
entity: lock.front_door
use_entity_picture: false
icon_color: <-
{% if is_state( 'lock.front_door', 'unlocked' ) %}
red
{% else %}
green
{% endif %}