Scripts not appearing under "scripts" even though scripts.yaml exists

Hi,

I’m new to Home Assistant (just installed it yesterday in fact). I’ve managed to configure both of my thermostats so far, and started trying to integrate my Broadlink RM3.

I have successfully “learned” several codes by using Service and have been able to fire the learned commands manually through Service as well so I know I can talk to the RM3 and send and receive codes.

So now, I’m trying to create some scripts because I’m controlling a stereo amp and standard UI doesn’t really work great for that (power on/off is the same button for example).

The idea was to create a script for “power” and have it send the same code I just tested successfully.

I created the following script:

service: remote.send_command
data:
  device: amp
  command: power
target:
  entity_id: remote.rm3_mini_1_remote

and hit “save”

The script saved successfully and I can ssh into HA, cat the scripts.yaml file and see it.

Problem is, when I go to “scripts” in the GUI, there is nothing there and I can’t call the script.

I tried restarting the service…nothing.

What am I missing here? The script was created, it’s just not showing up in the GUI for some reason.

Try this.

script.yaml

  add_your_script_name_here:
    sequence:
      - service: remote.send_command
        data:
          entity_id: remote.rm3_mini_1_remote
          device: amp
          command:
            - power

Have you told home assistant to reload the scripts file? Go to Configuration → server controls, scroll down to “YAML configuration reloading” and hit scripts. This is needed if you don’t create the script from within the GUI.

I DID create the script in the GUI.

After saving I can see it in the scripts.yaml file, but it’s not showing up and if I try to call it from the GUI (when I’m still on the page from creating it), it says it can’t find it. (failed to call service script)

I was able to create the script in the GUI as you suggested, but same problem - can’t see the script in the GUI and can’t call it.

1 Like

In your configuration.yaml file do you have a line like this?

script: !include scripts.yaml

Without that, the scripts won’t show in the UI.

This is documented here:

2 Likes

I figured it out!

somehow in my configuration.yaml file I had:

remote:
   - platform: broadlink
    host: xxx.xxx.xxx.xxx
    mac: xx:xx:xx:xx:xx:xx

not sure how that dash got there. I removed it and it works now.

When the script has an uppercase character in the name it also doesn’t work and there is no warning for that. I am posting this, because it was a pain to discover that and this was the topic I found.

2 Likes