Automation script error can't find why

Hi All,

I start new automation when I do a configuration validate everything is ok.
When I do a reload of automations I get a error. I can’t find out why. When its working ill add all kind of lights to turn off and after 23:30:00 turn them off. (thats the idea) but first this must work :slight_smile:

2020-10-05 14:22:26 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [event] is an invalid option for [automation]. Check: automation->event. (See /config/configuration.yaml, line 22).
###########################################################################################
# SCENE HOLIDAY
###########################################################################################

- alias: "Scene - Emulate Holiday"
  trigger:

    - platform: state
      event: sun.sun

    - platform: time
      at: "23:30:00"

  condition:
    - condition: state
      entity_id: switch.vacation
      state: "on"

  action:
    - choose:
        - conditions:
            - condition: state
              entity_id: sun.sun
              state: "below_horizon"

          sequence:
            - service: script.pushover_engine
              data:
                message: "Enjoy your holiday, the emulate holiday scene is activated"
                priority: 2
                sound: pushover
                title: "HA Notify Engine"

        - conditions:
            - condition: time
              after: "23:30:00"

          sequence:
            - service: script.pushover_engine
              data:
                message: "Enjoy your holiday, the emulate holiday scene is deactivated"
                priority: 0
                sound: pushover
                title: "HA Notify Engine"

Your error is not with this automation. Somewhere in your automation section you have the word event as an option.

Meaning…

automation:
  event:  #<---------------  NOT VALID

My guess is that you are trying to make a separate file/folder for this automation and you’re doing it incorrectly with an include.

I think this is the problem:

    - platform: state
      event: sun.sun

You can’t use this then it will be

    - platform: sun
      event: sunset

Now reload automation is ok