How to create an automation that will scroll all profiles in my light_profiles.csv

I have a light_profile.csv with colors suitable for Christmas decoration and would like to have light to start solid white for 5 min, display profiles form light_profiles.csv for 10min and go back to solid white for 5min. And cycle repeats.

What is a correct way? May be a Template or Script?

You can get the contents of light_profile.csv with the file.read_file action then use templating to get the profile names. It’s going to take a bit of string manipulation and you’ll need to make sure that your light_profile.csv doesn’t have extra spaces or line breaks.

action: file.read_file
data:
  file_name: /config/light_profiles.csv
  file_encoding: YAML
response_variable: profiles

You can get all the profile ID’s from the response with something like:

{%-macro split_dot(profile_csv)-%}
{{ (profile_csv.split('.')[2]) }}
{%-endmacro-%}
{{ (profiles.data).split(' ') | reject('eq','id,x,y,brightness,transition') 
| map('apply', split_dot) | map('replace',',0','') | unique | list }}

Or, you could limit it to profiles for certain entities by using a select:

{%-macro split_dot(profile_csv)-%}
{{ (profile_csv.split('.')[2]) }}
{%-endmacro-%}
{{ (profiles.data).split(' ') | select('search', 'light.example')
| map('apply', split_dot) | map('replace',',0','') | unique | list }}

If your goal is to be able to cycle through them, then your best bet might be to set up a Trigger-based Template Select, using the template above (or some variation on it) to populate the options of the Select.