Reading a state attribute in a custom card

I have been getting into custom button cards, they are very good, however I have hit and impasse, I have a card for my Dyson, as below.

type: custom:button-card
entity: climate.living_room_dyson
aspect_ratio: 1/1
color: auto
color_type: icon
icon: mdi:heat-wave
tap_action:
  action: call-service
  service: input_boolean.toggle
  service_data:
    entity_id: input_boolean.lr_heating_cooling_toggle
name: Dyson
state:
  - value: cool
    color: green
    spin: true
    icon: mdi:fan
  - value: heat
    color: red
    icon: mdi:heat-wave

At the moment the colour changes depending on the state of the entity, but I want it to change on the change of one of the attributes of that entity in particular when hvac_action changes.

How do I call the hvac_action attribute?

Cracked it. but thanks for looking