Help troubleshooting automations

Hey folks,

I just switched from OH2 to Hass.io on Tuesday. This system is great so far. I got everything integrated within 24 hours. I built my first automation that same night. And it worked! Yay! But today I sat down to add 2 new ones and configurator keeps throwing errors. I’ve gone over a bunch of tutorials and examples and everything seems correct. Perhaps a more seasoned set of eyes can spot my error.
Here is my code: (the first one “Smart sleep function” doesn’t break anything by itself)

automation:
# turns off the TV after 3 minutes of the chromecast being idle, after 11 pm
- alias: Smart sleep function
  trigger:
    platform: state
    entity_id: media_player.koalacast_tv
    to: 'off'
    for:
      minutes: 3
  condition:
    condition: time
    after: '23:00'
    before: '05:00'
  action:
    service: hdmi_cec.standby

# turns on tv and light at 5:30 am mon-fri if i'm home.
- alias: work wake up
  trigger:
    platform: time
    at: '05:30:00'
  condition: and
  conditions:
    - condition: time
      weekday:
        -mon
        -tue
        -wed
        -thu
        -fri
    - condition: state
      entity_id: 'device_tracker.3096fb3af2ff'
      state: 'home'
  action:
    - service: homeassistant.turn_on
      entity_id: light.bedroom
    - service: hdmi_cec.power_on  

# turns on light and tv when I get home from work.
- alias: work welcome home
  trigger:
    platform: state
    entity_id: 'device_tracker.3096fb3af2ff'
    state: 'home'
  condition:
    condition: time
    after: '15:30:00'
    weekday:
      -mon
      -tue
      -wed
      -thu
      -fri 
  action:        
    - service: homeassistant.turn_on
      entity_id: light.bedroom
    - service: hdmi_cec.power_on  

Here are the errors that it throws:
Testing configuration at /config
ERROR:homeassistant.config:Invalid config for [automation]: expected a dictionary @ data[‘condition’][0]. Got None
extra keys not allowed @ data[‘conditions’]. Got None. (See /config/configuration.yaml, line 89). Please check the docs at https://home-assistant.io/components/automation/
ERROR:homeassistant.config:Invalid config for [automation]: [state] is an invalid option for [automation]. Check: automation->trigger->0->state. (See /config/configuration.yaml, line 89). Please check the docs at https://home-assistant.io/components/automation/
Failed config
automation:
- action: [source /config/configuration.yaml:101]
service: hdmi_cec.standby
alias: Smart sleep function
condition: [source /config/configuration.yaml:97]
after: 23:00
before: 05:00
condition: time
trigger: [source /config/configuration.yaml:91]
platform: state
entity_id: media_player.koalacast_tv
for: [source /config/configuration.yaml:95]
minutes: 3
to: off
- action: [source /config/configuration.yaml:121]
- entity_id: light.bedroom
service: homeassistant.turn_on
- service: hdmi_cec.power_on
alias: work wake up
condition: and
conditions: [source /config/configuration.yaml:110]
- condition: time
weekday: -mon -tue -wed -thu -fri
- condition: state
entity_id: device_tracker.3096fb3af2ff
state: home
trigger: [source /config/configuration.yaml:106]
platform: time
at: 05:30:00
- action: [source /config/configuration.yaml:141]
- entity_id: light.bedroom
service: homeassistant.turn_on
- service: hdmi_cec.power_on
alias: work welcome home
condition: [source /config/configuration.yaml:132]
after: 15:30:00
condition: time
weekday: -mon -tue -wed -thu -fri
trigger: [source /config/configuration.yaml:128]
platform: state
entity_id: device_tracker.3096fb3af2ff
state: home

Successful config (partial)
automation:
- action: ?
- service: hdmi_cec.standby
alias: Smart sleep function
condition: ?
- after: 23:00:00
before: 05:00:00
condition: time
hide_entity: False
trigger: ?
- platform: state
entity_id: ?
- media_player.koalacast_tv
for: 0:03:00
to: off

Any ideas? For reference line 89 is the first note explaining the first automation. Thanks in advance, I’m sure it’s something simple that i’m missing. Cheers folks!

You forgot the opening [condition](https://home-assistant.io/docs/scripts/conditions/): statement.

# turns on tv and light at 5:30 am mon-fri if i'm home.
- alias: work wake up
  trigger:
    platform: time
    at: '05:30:00'
  condition:
    condition: and
    conditions:
      - condition: time
        weekday:
          -mon
          -tue
          -wed
          -thu
          -fri
      - condition: state
        entity_id: 'device_tracker.3096fb3af2ff'
        state: 'home'
  action:
    - service: homeassistant.turn_on
      entity_id: light.bedroom
    - service: hdmi_cec.power_on

And then you use an invalid trigger command state, which should be to (in this case).

The error message config:Invalid config for [automation]: [state] is an invalid option for [automation]. in this case flags state as the problem.

# turns on light and tv when I get home from work.
- alias: work welcome home
  trigger:
    platform: state
    entity_id: 'device_tracker.3096fb3af2ff'
    to: 'home'

Thank you so much! Those definitely helped. Another thing that was causing issues was that I forgot to add spaces between the dashes and the weekdays. This was causing errors in the expected dictionary of days.

Thanks again for your help @Tinkerer!