Multiple sensors changing the same ICON shown in a single card

I just installed two RATGDO ESPHome devices and it all works great, but I’d like to reduce the # of cards it takes to get good info from them.

As it is now I have two Cards, one shows the cover open/closed status and the other shows whether there’s an Obstruction blocking the binary_sensor

I can see in the Door code it is capable of showing an error state and changing the icon to mdi:garage-alert and blink 2s if if the cover status is either unknown or unavailable, but is there a way to have it do the same if the Obstruction sensor is on so I can use just one card?

Like so many others, this is my first attempt at using ESPHome/Home Assistant and I just need a nudge in the right direction to figure this out.

For the Doors I use:

type: custom:button-card
entity: cover.ratgdov25i_left_door
name: Garage Door Left
show_name: true
show_state: true
state:
  - value: closed
    color: rgb(92,184,92)
    icon: mdi:garage
  - value: open
    color: rgb(255,193,7)
    icon: mdi:garage-open
  - value: unknown
    color: rgb(217,83,79)
    icon: mdi:garage-alert
    styles:
      card:
        - animation: blink 2s ease infinite
  - value: unavailable
    color: rgb(217,83,79)
    icon: mdi:garage-alert
    styles:
      card:
        - animation: blink 2s ease infinite
tap_action:
  action: call-service
  service: button.press
  data:
    entity_id: button.ratgdov25i_left_toggle_door
  confirmation:
    text: Are you sure?
hold_action:
  action: more-info

type: custom:button-card
entity: cover.ratgdov25i_right_door
name: Garage Door Right
show_name: true
show_state: true
state:
  - value: closed
    color: rgb(92,184,92)
    icon: mdi:garage
  - value: open
    color: rgb(255,193,7)
    icon: mdi:garage-open
  - value: unknown
    color: rgb(217,83,79)
    icon: mdi:garage-alert
    styles:
      card:
        - animation: blink 2s ease infinite
  - value: unavailable
    color: rgb(217,83,79)
    icon: mdi:garage-alert
    styles:
      card:
        - animation: blink 2s ease infinite
tap_action:
  action: call-service
  service: button.press
  data:
    entity_id: button.ratgdov25i_right_toggle_door
  confirmation:
    text: Are you sure?
hold_action:
  action: more-info

For the Obstruction Sensors I use:

type: horizontal-stack
cards:
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: binary_sensor.ratgdov25i_left_obstruction
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: binary_sensor.ratgdov25i_right_obstruction
    show_state: false

This seems like more of a button card query than a ESPHOME query.

It would help to show images of what you currently have to help us understand.

I think you might be able to do something using the Javascript Templates button card feature.