Generated invalid automation

Figured it out, the issue I was having was due to the while condition expecting an entity_id and instead having a target value, which the blueprint was attempting to populate with a device_id.

From what I understand,

    my_light:
      name: Color Loop Light
      description: Choose Light entity to Color Loop
      selector:
        target:
          entity:
            domain: light

...and...

      while:
        - condition: state
          target: !input my_light
          state: 'on'

Should be changed to...

    my_light:
      name: Color Loop Light
      description: Choose Light entity to Color Loop
      selector:
        entity:
          domain: light

...and...

      while:
        - condition: state
          entity_id: !input my_light
          state: 'on'

(note the removal of target in the my_light configuration and changing of target to entity_id in the while condition)

Also other instances of target would need to be changed to entity_id throughout the sequence.

While using target in both the my_light configuration and sequence should work, I was not able to figure out how to get it working in my while condition.

I ended up using this to build my updated and working blueprint, which can be found here:

References for other posts which helped me figure this out: