Ok, below is a script that should do what you want. It can be enhanced to take variables like the name of the group and the name of the input_select, but for now it’s hard coded for the scenario described above.
Copy the following code into a file in your <config>/python_scripts directory. (Create the directory if necessary.) The file name should have a .py extension. The service you will need to call is python_script.xxx where xxx is the name of the script. So, e.g., if you put this code in <config>/python_scripts/update_timer_generico7.py, then the service will be named python_script.update_timer_generico7.
Here is the code:
group_entities = hass.states.get('group.all_lights').attributes['entity_id']
all_lights = []
for e in group_entities:
all_lights.append(e)
service_data = {'entity_id': 'input_select.timer_generico7',
'options': all_lights}
hass.services.call('input_select', 'set_options', service_data)
The options will be the entity_id’s of all the lights that exist. If you’d rather the options be the friendly_name’s of the lights, let me know.