Automation assistance

Writing my first automation, I’m attempting to speak a greeting when someone flips on the christmas lights. I’m getting an error when HA starts up that indicates something might be off with the yaml, but I don’t see it. Any assistance is greatly appreciated. The yaml is as follows:

- alias: "Greeting with lights"
  trigger:
  - platform: state
    entity_id: switch.xmas_lights_switch
    event: turn_on
  action:
    service: tts.pico_say
    entity_id: media_player.local_media
    data:
      message: "MERRY CHRISTMAS!"

The error is:

ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [event] is an invalid option for [automation]. Check: automation->trigger->0->event. (See /home/hass/.homeassistant/configuration.yaml, line 34). Please check the docs at https://home-assistant.io/components/automation/

Instead of

Try

to: 'on'

1 Like

Yep, got an answer on subreddit first :slight_smile: