That’s your problem then.
Either you have not got the correct entity id (check in Developer Tools / States) or it has no state set.
EDIT: I’ve just noticed how you are setting the input_text. Try this instead:
- service: input_text.set_value
target:
entity_id: input_text.light_to_switch
data:
value: '{{ states.group.simulation_lights.attributes.entity_id | random }}'