Home Assistant Themes

I am trying to make my Home Assistant green using this in my automation.yaml:

automation:
  - alias: 'Set theme at startup'
    initial_state: 'on'
    trigger:
     - platform: homeassistant
       event: start
    action:
      service: frontend.set_theme
      data:
        name: green

I am getting the error

The following components and platforms could not be set up:
automation

Please check your config

What is wrong?

I don’t think this is your problem. I copied this automation to my test system, and it worked fine.
Perhaps you have other automations that are getting in the way???

In order for the frontend service to exist, you must first declare the themes in configuration.yaml