Theme change at Time

Hello,

I know it muss be a small fault. but i don’t see him

the Logs says:

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

on Line 200 in configuration.yaml is:
automation: !include automation.yaml

the code where i use:

  - alias: 'Set dark theme for the night'
    initial_state: True
    trigger:
      - platform: time
        after: '22:00:00'
    action:
      - service: frontend.set_theme
        data:
          name: 'darkred'

see somebody the fault?
Thanks for your Help!

Use at: instead of after: for time triggers.

With this works:

  - alias: 'Set dark theme for the night'
    initial_state: True
    trigger:
      - platform: time
        at: '18:45'
    action:
      - service: frontend.set_theme
        data:
          name: 'darkred'