Error at my first script

  • The screenshot you posted contains automations, not scripts.
  • The first automation is incorrect. The entire block in red (see below) contains indentation and syntax errors.
  • The first and last service calls (scene.turn_on) aren’t hyphenated. Multiple actions require hyphens.
  • The delay action is hyphenated but improperly indented.


Where are these automations located?

Are they in the configuration.yaml file? The line numbers in your screenshot have low numbers which suggest this is not in the configuration.yaml file. Is that a screenshot of the automations.yaml file or somewhere else? If they’re in a separate file then the first line should not contain the automation: key word.


For future reference:

FAQ Guideline 11 - Format it properly

FAQ Guideline 14 - Screenshots