Automation 'expected a dictionary value'

Getting this error code

Invalid config for [automation]: expected a dictionary for dictionary value @ data['action'][0]['data_template']. Got None
extra keys not allowed @ data['action'][0]['brightness_pct']. Got None
extra keys not allowed @ data['action'][0]['hs_color']. Got None
extra keys not allowed @ data['action'][0]['transition']. Got None. (See /config/configuration.yaml, line 40). Please check the docs at https://home-assistant.io/integrations/automation/
Invalid config for [automation]: extra keys not allowed @ data['condition'][1]['state']. Got None
not a valid value for dictionary value @ data['condition'][1]['condition']. Got None. (See /config/configuration.yaml, line 40). Please check the docs at https://home-assistant.io/integrations/automation/
Invalid config for [automation]: extra keys not allowed @ data['condition'][1]['state']. Got None

The logs loop like that 10 more times but I can post the full log if one needs.

Here’s the automation page specifically line 36 - 56 just for context (also someone let me know if this isn’t necessary still super new to this).

- id: CC_livingroom_east
  alias: Color Change Living Room East
  trigger: 
    minutes: /120
    seconds: 0
    platform: time_pattern
  condition: 
    - condition: time
      after: "10:30:00"
      before: "03:00:00"
    - condition: state
      entity_id: light.1f_lc_living_room_east
      state: true        
  action:
      service: light.turn_on 
      data_template: 
        brightness_pct: 100
        hs_color: 
          - "{{ range(360)|random }}"
          - "{{ range(80,101)|random }}"
      entity_id: 'light.1f_lc_living_room_east' 

The automation is basically a light scheduler with an hourly random colour change. I will probably add a transition to each action as well.

Bad spacing in the action section. Move everything left two spaces. Also you probably meant the state of your light to be on instead of true.

Btw you don’t need to put quotes around the entity ID in the action section.

My guess is the editor is inserting tabs instead of spaces. There’s nothing wrong with what you have posted (assuming it is correctly included under automation:.) Well, except as @Tediore pointed out, you probably want the state to be 'on' (make sure to quote it) instead of true for the second condition.

Alright, so I decided to try to re-write the code to see if it is the editor throwing in tabs instead of spaces. Getting this one now.

- id: Wake_up!
  alias: "1030 Lights On"
  trigger:
      platform: time
      at: "10:30:00"
  action:
    service: light.turn_on 
    data_template: 
      brightness_pct: 100
      hs_color:
        - "{{ range(360)|random }}"
        - "{{ range(80,101)|random }}"
    entity_id: group.all_lights
- id: CC_kitchen_east
  trigger: 
    minutes: /120
    seconds: 0
    platform: time_pattern
  condition: 
    - condition: time
      after: "10:30:00"
      before: "03:00:00"
    - condition: state
      entity_id: light.1f_kitchen_stove_east
      state: On
  action:
    service: light.turn_on 
    data_template: 
        brightness_pct: 100
        hs_color: 
          - "{{ range(360)|random }}"
          - "{{ range(80,101)|random }}"
    entity_id: light.1f_kitchen_stove_east

And the error logs

Invalid config for [automation]: extra keys not allowed @ data['condition'][1]['state']. Got None
not a valid value for dictionary value @ data['condition'][1]['condition']. Got None. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/integrations/automation/

What’s hella confusing is that the log says to check the configuration.yaml but line 13 is just this.
group: !include groups.yaml
This is a fresh install (new update kind of messed things up, so I just reflashed and wrote this up trying to figure out where the trouble with my original code is.

Also thanks you guys have been really helpful

state: 'on'

as per @pnbruckner

Also, I think your time pattern should be hours: 2
As I think the minutes go through a mod function based on 60 so this would fire every hour