Power restore after voltage issues

Hi, Community!
I have few relays, which automatically turning off in under\over voltage cases, and doesnt turn on after it normalized.
I’ve created following automation:

      - id: "UPS Power Restore"
        description: Restore UPS after high voltage
        alias: ups_ac_restore
        initial_state: true
        mode: single
        trigger:
          - platform: state
            entity_id: binary_sensor.home_ac_in
            to: "off"
            for:
              hours: 0
              minutes: 10
              seconds: 0
              
        condition:
          - condition: state
            entity_id: switch.control_mode
            state: "on"
          - condition: state
            entity_id: switch.home_ups
            state: "off"
          - condition: numeric_state
            entity_id: sensor.zal_charger_voltage
            below: 260
        action:
          - service: switch.turn_on
            target:
              entity_id: switch.home_ups

in general, this automation will only work if the voltage is normal after 10 minutes, but if it is not, the device will remain off.

Please tell me how to create an automation that will check the voltage every ten minutes after turning off the power, and if it is OK, turn on the device, if not, wait 10 minutes and try again