Script example

Does anyone have an example of a script that has a sequence of events in it that works? I have found several different examples in the documentation and in the example files. None of them seem to be the same syntax. I think I have tried each of them over the past week and still can’t seem to get the scripts to run. I have simplified mine to the following.

script:
  Morning:
    alias: "Good Morning"
    sequence:
      - service: switch.turn_on
        entity_id: switch.stairway_switch
#      - delay:
#          minutes: 1
#      - service: light.turn_on
#        data:
#          entity_id: group.stair_lights
#          brightness: 128
#          color_name: white
#      - service: switch.turn_off
#        data:
#          entity_id: switch.stairway_switch

and all I get in the home-assistant.log file is the following.

Nov 23 20:06:55 hass hass[27517]: #033[32m16-11-23 20:06:55 INFO (MainThread) [homeassistant.components.http] Serving /api/services/homeassistant/turn_on to 192.168.2.105 (auth: True)#033[0m
Nov 23 20:06:55 hass hass[27517]: #033[32m16-11-23 20:06:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=turn_on, service_call_id=1975917360-11, domain=homeassistant, service_data=entity_id=script.morning>#033[0m
Nov 23 20:06:55 hass hass[27517]: #033[32m16-11-23 20:06:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=turn_on, service_call_id=1975917360-12, domain=script, service_data=entity_id=['script.morning']>#033[0m
Nov 23 20:06:55 hass hass[27517]: #033[32m16-11-23 20:06:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1975917360-12>#033[0m
Nov 23 20:06:55 hass hass[27517]: #033[32m16-11-23 20:06:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1975917360-11>#033[0m

Thanks

  cosy:
   alias: cosy
   sequence:
    - alias: Fireplace on
      service: media_player.play_media
      data:
       entity_id: media_player.lounge
       media_content_id: https://homeassistanturl/local/Fireplace.mp4
       media_content_type: VIDEO
    - alias: tv on
      service: shell_command.tv
    - alias: dim lights
      service: lights.turn_on
      data:
       entity_id: group.lights
       brightness: 40
       transition: 10

This is what i have and that works if that helps

I finally got it. My script name “Morning” had to be in lower case “morning”. That one was frustrating. Thanks

Thanks @turboc I had an issue where altering the name of the script got it working too. Doesn’t seem to be related to the case or spacing in the script’s name though.