Unable to find service script/doorsiren

Below is the script I have in my configuration.yaml file.

script:
doorsiren:
sequence:
- service: media_player.sonos_join
data:
master: media_player.living_room
entity_id:
- media_player.living_room
- media_player.bedroom
- service: media_player.play_media
entity_id: media_player.living_room
data:
media_content_id: Siren.mp3
media_content_type: music

Also, my automation calls it with:

action:
- service: script.doorsiren

When I go to run the automation I am getting an Unable to find service script/doorsiren error in the log.

Can anyone tell what I am doing wrong?

Can you re-post using the preformatted text </>?

script.doorsiren looks like an entity id.

The service would be script.turn_on or one of the other services available for scripts.

1 Like
script:
   doorsiren:
     sequence:
      - service: media_player.sonos_join
        data:
          master: media_player.living_room
        entity_id:
          - media_player.living_room
          - media_player.bedroom
       - service: media_player.play_media
         entity_id: media_player.living_room
         data:
           media_content_id: Siren.mp3
           media_content_type: music 


    action:
      - service: script.doorsiren

In your automation use:

  action:
    - service: script.turn_on
      entity_id: script.doorsiren

gave that a try and got the following error now:

Unable to find service script/turn_on

Is script in your services list?

no, “Script” isn’t even listed as a domain

Have you restarted HA since adding it to your configuration.yaml?

Yea, I’ve restarted several times.

Any luck?

Can you post some of your config?

Maybe try the command hass --script check_config

1 Like
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: !secret
  longitude: !secret
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: imperial
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Chicago
  customize: !include customize.yaml
  

# Show links to resources in log and frontend
#introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather Prediction
#sensor:
#  platform: yr

# Text to speech
tts:
  platform: google

zwave:
  usb_path: /dev/ttyACM0
  config_path: /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/libopenzwave-0.3.3-py3.4-linux-armv7l.egg/config
  
input_boolean:
  away_mode:
    name: Set Away Mode
    initial: off
    
nest:
  client_id: !secret
  client_secret: !secret

http:
 api_password: !secret
 ssl_certificate: !secret
 ssl_key: !secret
 
notify:
  - platform: pushbullet
    api_key: !secret
    name: pushbullet
    
script:
   doorsiren:
     sequence:
      - service: media_player.sonos_join
        data:
          master: media_player.living_room
        entity_id:
          - media_player.living_room
          - media_player.bedroom
       - service: media_player.play_media
         entity_id: media_player.living_room
         data:
           media_content_id: Siren.mp3
           media_content_type: music
           
####  Includes  ###

group: !include groups.yaml
automation: !include automation.yaml

There is my entire config, not a lot going on. I can run the check config and it comes back as valid.

There are some spacing issues in your script. Not sure about the syntax of your first service either.

script:
  doorsiren:
    sequence:
      - service: media_player.sonos_join
        data:
          master: media_player.living_room
        entity_id:
          - media_player.living_room
          - media_player.bedroom
      - service: media_player.play_media
        entity_id: media_player.living_room
        data:
          media_content_id: Siren.mp3
          media_content_type: music

Tried it with the correct spacing and I’m still getting the same error.

I am facing the same issue