Loop script that calls scripts

TL;DR - I need to figure out a way to have an action button that calls script 1, wait 10 mins, call script 2, wait 10 mins and call script 1 again - and keeps repeating in a loop

Additional details
I have a IR controlled HVAC which seems to have a busted thermostat
It seems to be cooling my study room to frigid temperature then cut out and then waits till it gets way too warm.
As much as I would like to get it fixed, the current COVID restrictions in my country make it impossible - and in any case not advisable till things get back to normal

To create a workaround, I setup two scripts on a Harmony hub in the room
Script 1 - Turns on the HVAC cooling mode
Script 2 - Turns off the HVAC mode

Then I created a third script (Script 3) that :

  • Calls script 1
  • delay 15 mins
  • calls script 2
  • Delay 15 mins

and I manually repeated that loop multiple times (only 2 loops in code below)

study_aircon_loop_mode_action:
  alias: Study Aircon Loop mode action
  sequence:
  - service: script.script_ht_aircon_jetcool
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
  - service: script.script_ht_aircon_off
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
  - service: script.script_ht_aircon_jetcool
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
  - service: script.script_ht_aircon_off
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0

Now I am sure there are more elegant ways to do this - but even this should have worked
However the script seems to stop after the 1st loop with the HVAC in off mode.
Any suggestions?

This all seems overly complicated when this exists. Or you could use a time_pattern trigger to execute an automation at a set cadence.