Why do some scripts ignore my script name and assign a weird number?

I created three scripts, one makes an alias from the name, but two make a strange ID like script.1713850844200.

Why?

And HOW DO I DELETE them?

Difficult to say without seeing the scripts.

That “strange” ID is just the UNIX timestamp of its creation, a quick-and-dirty way for the system to generate a unique number.

How did you create them: YAML or UI? Do they show up in the UI list? If they do, is there not a delete option under the three dots?

Answering both…
The scripts were created in the UI.

alias: Set Summer Sprinkler Durations
sequence:
  - service: esphome.sprinkler_controller_1_set_summer_run_durations
    data: {}
  - service: esphome.sprinkler_controller_2_set_summer_run_durations
    data: {}
mode: single
alias: Set Spring Sprinkler Durations
sequence:
  - service: esphome.sprinkler_controller_1_set_spring_run_durations
    data: {}
  - service: esphome.sprinkler_controller_2_set_spring_run_durations
    data: {}
mode: single
alias: Set Test Sprinkler Durations
sequence:
  - service: esphome.sprinkler_controller_1_set_test_run_durations
    data: {}
  - service: esphome.sprinkler_controller_2_set_test_run_durations
    data: {}
mode: single

Here is what HomeAssistant put into the scripts.yaml file:

set_spring_sprinkler_durations:
  alias: Set Spring Sprinkler Durations
  sequence:
  - service: esphome.sprinkler_controller_1_set_spring_run_durations
    data: {}
  - service: esphome.sprinkler_controller_2_set_spring_run_durations
    data: {}
  mode: single
'1713850787237':
  alias: Set Summer Sprinkler Durations
  sequence:
  - service: esphome.sprinkler_controller_1_set_summer_run_durations
    data: {}
  - service: esphome.sprinkler_controller_2_set_summer_run_durations
    data: {}
  mode: single
set_test_sprinkler_durations:
  alias: Set Test Sprinkler Durations
  sequence:
  - service: esphome.sprinkler_controller_1_set_test_run_durations
    data: {}
  - service: esphome.sprinkler_controller_2_set_test_run_durations
    data: {}
  mode: single

I can’t delete the “summer” script. They were all made in the UI, so why one uses the timestamp ID is a mystery. The “delete” button on the ‘info’ page is greyed out.


Update. I was able to delete “summer” with the ‘delete’ found in the meatball menu (next to ‘traces’). I made the script in the UI again and it is all normal again.

Thank you both for your quick replies.