Automation-trigger: compare 2 entities

I would like to be able to compare 2 entities and trigger an automation if lower/ewual/higher
Would be usefull to start a pump if a target-temperature of a radiator was higher as the acual tamperature

The numeric state trigger can do that. See: https://www.home-assistant.io/docs/automation/trigger/#numeric-state-trigger

Here’s the example from the documentation:

automation:
  triggers:
    - trigger: numeric_state
      entity_id: sensor.outside_temperature
      above: sensor.inside_temperature

I didn’t get it to work:
I have an actor at my radiator with 2 attributes I want to compare:
attribute: temperature
attribute: current_temperature

Before you go to far…
Don’t you have a climate entity with this?

Got it:

condition: numeric_state
entity_id:
  - climate.tv02_zg_bad
value_template: "{{ state.attributes.temperature - state.attributes.current_temperature }}"
above: 0