Can't turn off running script

I have a script (loop) that I am not able to turn off once I start it.

  fire:
    sequence:
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - service: script.turn_on
        data:
          entity_id: script.spark

  spark:
    sequence:
      - service: script.turn_on
        data:
          entity_id: script.fire

  ash:
    sequence:
      - service: script.turn_off
        data:
          entity_id: script.fire
      - service: script.turn_off
        data:
          entity_id: script.spark

In customize I have:

  script.fire:
    can_cancel: true

So I have the switch to turn it off and I also have the script ash to turn it off, but both options simply don’t work. The script just turns itself on again after half a second and the only way to stop it is to reload scripts under Configuration/General/

I do have another looping script (with delays in there) that I can turn off without any problem. But I don’t want delays in this one.

Change spark to…

  spark:
    sequence:
      - service script.turn_off
        entity_id: script.fire
      - service: script.fire

Sadly, that did not work.

I did get it to work with putting in the shortest delay possible (?)

  fire:
    sequence:
      - service: light.turn_on
        data_template:
          entity_id: light.ls1
          rgb_color: [255, '{{ (range(0, 100)|random) }}', 0]
          brightness: '{{ (range(50,255)|random) }}'
      - delay:
          milliseconds: 1
      - service: script.turn_on
        data:
          entity_id: script.spark

  spark:
    sequence:
      - service: script.turn_off
        data:
          entity_id: script.fire
      - service: script.turn_on
        data:
          entity_id: script.fire

  ash:
    sequence:
      - service: script.turn_off
        data:
          entity_id: script.fire
      - service: script.turn_off
        data:
          entity_id: script.spark

BUT that slows down the effect too much for what I want to achieve. So then I duplicated the “service: light.turn_on” a bunch of times like in the previous example, to have the delay only like every 20th time. But then it’s the same as before, I can’t turn the script off, once it started running.