Invalid config for [automation]: [light]?

I would be embarrassed to admit the time I have into this today. Please help me understand. I am attempting to control the dim level of one bulb with the brightness level of another.

ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [light] is an invalid option for [automation].

light:
  - platform: template
    lights:
      kitchen_overheads:
        friendly_name: "Kitchen Overheads"
        level_template: "{{ states.states.light.kitchen_74.attributes.brightness|int }}"
        value_template: "{{ states.states.light.kitchen_74.attributes.brightness|int > 0 }}"
        turn_on:
          service: light.turn_on
          entity_id:
            - light.kitoh2_75
            #- light.panel_hallway_2
        turn_off:
          service: light.turn_off
          entity_id:
            - light.kitoh2_75
            #- light.panel_hallway_2
        set_level:
          service: light.turn_on
          entity_id:
            - light.kitoh2_75
          data_template:
            brightness: "{{ brightness }}"

Any idea why you have states.states?

Also if this is in automation.yaml or in the config.yaml as part of automation: how can you have light: at the top? Don’t automations start with alias and trigger? There doesn’t seem to be any context here for us to go on.

keithh666 I’m sorry. It was late is a poor excuse but the best I have. Admitted absolute noob to HA here. I don’t have access to my PI this morning. I have six Linear LB60Z bulbs in my kitchen overhead fixtures. They are currently controlled via a Vera Edge and a PLEG plugin. When one of those bulbs is turned on or dim level changes the remaining 5 follow at a matched dim level. I am trying to establish the same functionality with HA. At this moment in time I have more determination than knowledge and sincerely appreciate any help. I’ll gratefully take any advice you could share with me.

It looks like you have stuck this template in your automation section? That’s not where it goes. :wink:

It looks to me like you are trying to combine a light setup and an automation, they are two separate things and need to go in different parts of the configuration.yaml