Thermostat demand on or off

I want to track when demand is on or off. I use Nest. The thermostat card goes orange when demand is on but all I can see in entities are climate, temp and humidity. Is there a way to see when it is calling for heat?

It probably is an attribute of the climate entity.

I use a template to extract it into a sensor, then you can log it and chart it.

sensor:
  - platform: template
    sensors:
      downstairs_hvac_action:
        value_template: >-
          {{ state_attr('climate.downstairs_thermostat','hvac_action') }}