Automation/Script variable - string to list object

I have a script in which I have to declare a list in almost every sequence so I figured this would be a great place to use the new script variable feature.

variables:  
      players: "{{ expand('group.media_players_single')|map(attribute='entity_id')|list }}"

My issue is that players becomes a string, not a list object. I need a list object which I can iterate and reference indices for this script. This is probably a silly question, but I’ve looked and played around and I can’t figure this out. Is there any way to get a string that looks like a list back into a list object without doing jinja gymnastics?

Template results are always strings. At least until this is released:

Understood. Was hoping there was a way to convert a string to a list actually within the template that I hadn’t discovered yet.

Speaking of that PR though, I’ve been anxiously awaiting this so I can automatically open fold entities based on a template value and finally resolve this.

Minor item, but it has bugged me since Thomas released the fold entity row.