Climate If Heat On and Temperateure Dropping

Hi All. I need help figuring this out.

I have a thermostat for heating. Sometimes my heater would pause with an error that there is not enough gas flow to continue heating. The gas company is yet to replace my gas meter to a bigger one. I have to reset the boiler for it to continue heating. What would be the best way to write the following as an automation?

If climate.first_floor_heat = heating & climate.first_floor_heat temperature = dropping

then

run script.pulse_boiler

This is what I came up with, not sure if it’ll work or not. I created 3 helpers, sensor.first_floor_current_temp, sensor.first_floor_set_temp and sensor.first_floor_heat_status

alias: Boiler Reset If Not Heating
description: >-
  Triggers boiler reset if the first floor temperature stays below the set
  temperature for more than 60 minutes.
triggers:
  - value_template: >
      {{ states('sensor.first_floor_current_temp') | float <
      states('sensor.first_floor_set_temp') | float }}
    for:
      hours: 1
      minutes: 0
      seconds: 0
    trigger: template
condition:
  - condition: state
    entity_id: sensor.first_floor_heat_status
    state: heating
actions:
  - action: script.pulse_boiler
    metadata: {}
    data: {}
mode: single

Thanks to all in advance