Script names can not(?) contain dashes!

Hi,

man, that just took me ages to learn.
Apparently names for scripts should not contain dashes (-):

[scripts]# ../configtest.sh
Testing configuration at /config
16-11-29 11:21:39 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [script]: [ha-restart] is an invalid option for [script]. Check: script->script->ha-restart. (See ?:?). Please check the docs at https://home-assistant.io/components/script/
Failed config
  script:
    ha-restart: [source /config/scripts/ha-restart.yaml:?]
      alias: Restart Homeassistant
      sequence: [source /config/scripts/ha-restart.yaml:2]
        service: homeassistant.restart

Successful config (partial)
  script:
[scripts]# mv ha-restart.yaml restart_hass.yaml
[scripts]# ../configtest.sh
Testing configuration at /config
[scripts]#

Could we please have a note on that on the script component documentation page?

Sebastian

I always use underscores. Just old habits.

1 Like

It would be great if you can help update the documentation. In the upper right corner of any documentation page, you will find “Edit this page on GitHub”. Follow the link and submit your suggested change. Demonstrated here: https://youtu.be/dRfk9JAlPJk?t=1h16m17s

2 Likes

Ah cool, I wasn’t aware that anyone could edit these pages!
Thanks!

Sebastian

PS: Is there a reference what kind of characters are (not) allowed or is it only dashes?