State input select auto populate

Hi, I populate my input select with script python and shell_command script it’s work but when I select the option and when refresh the page lose the option, and if I create automation for reproduce a song, the automation or HA can’t catch the option.
Idea? Thanks