I’ve replicated an existing Garage door button card to apply to a different entity.so I’ve changed the referenced entity as well as icons and for some reason the colours are incorrect and the icon is not changing as the state changes either. YAML is below. Any suggestions would be greatly appreciated.
type: custom:button-card
entity: binary_sensor.front_gate_sensor_contact
show_name: false
state:
- value: Closed
color: rgb(92,184,92)
icon: mdi:gate
- value: Open
color: rgb(255,193,7)
icon: mdi:gate-open
- value: unknown
color: rgb(217,83,79)
icon: mdi:gate-alert
styles: null
card:
animation: blink 2s ease infinite
- value: unavailable
color: rgb(217,83,79)
icon: mdi:gate-alert
styles: null
card:
animation: blink 2s ease infinite
tap_action:
action: call-service
service: switch.turn_on
target:
entity_id: switch.front_gate_switch_0
confirmation:
text: Do you want to open the front gate?
hold_action:
action: more-info