Turn on Heat Recovery Ventilator and furnace fans for 30 minute intervals until humidity is below?

I’m sorry guys and gals I have tried to find an applicable example and apply it to my own.

My logic is if the humidity goes above 40 % in the house and colder than -15 degrees outside is to have on HRV and Furnace fan for say 30 minutes on and then turn off the HRV and furnace fan (to give us a break from the constant fan noise)
This basic on and off routine should continue until the humidity is below 40%.
I am not achieving this and my automations have devolved I think
I have made a binary sensor to automate off

  - platform: template
    sensors:
      hallway_humidity:
        friendly_name: 'Hallway Humidity'
        value_template: '{{ states("sensor.hallway_humidity")|float > 37.5 }}'

Here is my Automation

alias: >-
  HRV/furnace fan on when hallway humidity above 40% outside temp is -15 or
  below until humidity below 45% or one hour
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.hallway_humidity
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
condition:
  - condition: numeric_state
    entity_id: weather.dark_sky
    attribute: temperature
    below: '-10'
action:
  - service: script.hrv_plug_and_furnace_fan_turn_on
  - repeat:
      until:
        - condition: state
          entity_id: binary_sensor.hallway_humidity
          state: 'off'
      sequence: []
  - service: script.turn_on
    target:
      entity_id: script.hrv_and_furnace_fan_off
mode: restart

Here is the script it calls

sequence:
  - service: climate.set_fan_mode
    target:
      entity_id: climate.hallway
    data:
      fan_mode: 'on'
  - type: turn_on
    device_id: 21cbd1772d48b408b8986d
    entity_id: switch.heat_air_exchanger_wemo_switch
    domain: switch
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - service: climate.set_fan_mode
    target:
      entity_id: climate.hallway
    data:
      fan_mode: 'off'
  - type: turn_off
    device_id: 21cbd1772d48bb634c86d
    entity_id: switch.heat_air_exchanger_wemo_switch
    domain: switch
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
mode: single
alias: HRV plug and Furnace Fan turn on

some of the timings have been changed for testing and maybe I messed things up even more

Answering my own question. I obviously did not understand how repeat worked at all.
Here is my new script that seems to work

sequence:
  - repeat:
      until:
        - condition: state
          entity_id: binary_sensor.hallway_humidity
          state: 'off'
          for:
            hours: 0
            minutes: 0
            seconds: 1
            milliseconds: 0
      sequence:
        - service: climate.set_fan_mode
          target:
            entity_id: climate.hallway
          data:
            fan_mode: 'on'
        - delay:
            hours: 0
            minutes: 0
            seconds: 3
            milliseconds: 0
        - type: turn_on
          device_id: 21cbd17b896c011b634c86d
          entity_id: switch.heat_air_exchanger_wemo_switch
          domain: switch
        - delay:
            hours: 0
            minutes: 30
            seconds: 0
            milliseconds: 0
        - service: climate.set_fan_mode
          target:
            entity_id: climate.hallway
          data:
            fan_mode: 'off'
        - delay:
            hours: 0
            minutes: 0
            seconds: 3
            milliseconds: 0
        - type: turn_off
          device_id: 21cbd1772d48b411b634c86d
          entity_id: switch.heat_air_exchanger_wemo_switch
          domain: switch
        - delay:
            hours: 0
            minutes: 30
            seconds: 0
            milliseconds: 0
mode: single
alias: HRV plug and Furnace Fan turn on

I’m open to suggestions from others using HRV’s out there to see how they have automated. I’ve got a new house and its not been kept up. They clearly didn’t like how the HRV kept the furnace fan running all the time and just ripped out the wire interface to the furnace.
Its an old vanee HRV with a central control that has low, high, and off with a hygrometer which I think is not functional. It also has a single push button control in the bathrooms which just seems to turn it on high for 20 minutes.
I dont see any recirc control on this thing and I think the furnace does come on more when its running as I’m not sure how efficient the “heat recovery” portion is?