Conditions on the entities card configuration | hvac_action

On my entities card I want to show my thermostat when ihvac_action is heating (not idle). I can get it to display when in heat mode and then not show when heat mode is off but does not tell me if the boiler is actually heating - which is my desired outcome.

The code below is my attempt at trying to do this. It causes no error but does not work. The thermostat is displayed regardless. How can I change my code so that it only displays when hvac_action is heating.

Things I have tried but did not work

  • Changed the value to heat
  • Put the value in a single quote and without
  • Removed the state: (this creates an error)
- type: conditional
    conditions:
      - entity: climate.hallway
        state: heat
        attribute: hvac_action
        value: 'heating'
    row:
      entity: climate.hallway
      icon: mdi:thermometer-plus