Please help a newbie with first automation

I’ve copied the simple media automation from the sample given and tailored it to fit my configuration (or so I thought), but it’s still not working. Can someone please put me on the right path?
Here is my configuration.yaml:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: XXXX
  longitude: XXXX
  # Impacts weather/sunrise data
  elevation: XXXX
  # metric for Metric, imperial for Imperial
  unit_system: imperial
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Detroit

# Show links to resources in log and frontend
#introduction:

# Enables the frontend
frontend:

http:
  # Uncomment this to add a password (recommended!)
  # api_password: PASSWORD

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

wink:
  access_token: XXXX
  refresh_token: XXXX

automation:  !include automation.yaml
scene:  !include scene.yaml
media_player: !include media_players.yaml


#camera:
#  platform: generic
#  still_image_url: https://blah blah blah
#  name: Local Weather

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather Prediction
sensor:
  platform: yr

Here is my media_players.yaml

### MEDIA PLAYERS ###

- platform: kodi
  host: http://10.0.0.XXX
  port: 8080
  name: Kodi
  user: user
  password:  password
  turn_off_action: shutdown
- platform: webostv
  host: 10.0.0.XXX
  name: Family Room TV

here is my automation.yaml

  - alias: "Media player paused/stopped"
    trigger:
      - platform: state
        entity_id: media_player.kodi
        from: 'playing'
#    condition:
#      - condition: state
#        entity_id: sun.sun
#        state: 'below_horizon'
    action:
        service: scene.turn_on
        entity_id: scene.livingroom_normal

  - alias: "Media player playing"
    trigger:
      - platform: state
        entity_id: media_player.kodi
        to: 'playing'
#    condition:
#      - condition: state
#        entity_id: sun.sun
#        state: 'below_horizon'
    action:
        service: scene.turn_on
        entity_id: scene.livingroom_dim

and here is my scene.yaml

  - name: Familyroom normal
    entities:
        light.family_room_lights_:
            state: on
#            transition: 2
#            brightness: 150
        light.family_room_lamp:
            state: on
#            transition: 2
#            brightness: 215
  - name: Familyroom dim
    entities:
        light.family_room_lights_:
            state: off
#            transition: 2
#            brightness: 75
        light.family_room_lamp:
            state: off
#            transition: 2
#            brightness: 145


It is a bit a hard to read your configuration file with the formating.

It seems that automation.yaml file is not included in the configuration.yaml file?
So you can copy your automations to the configuration.yaml file or include it as described here: https://home-assistant.io/topics/splitting_configuration/

edit: I now see that you include your automation.yaml file.
Your automation.yaml file should not start with “automation:”.

When you want to post code, place 3 backticks (the character next to the ‘1’ on your keyboard), type ‘yaml’, paste your code and end with another 3 backticks. Like this:

‘’‘yaml
code line1
code line2
‘’’

I took out the “automation:” as you suggested, and it’s still not working. I’ve also corrected the formatting in the post, so that should help.

Do you get any errors in the log?

You should probably remove two spaces from each line in automation.yaml and scene.yaml

Have you read https://home-assistant.io/topics/splitting_configuration/ ?

Do the entities scene.livingroom_normal and scene.livingroom_dim show up in your list of current entities?
In your scene.yaml you used Familyroom normal and Familyroom dim but in your automation you are calling for livingroom_normal and livingroom_dim.

Maybe your scene needs to be along the lines of this… I am pretty new too…

Thank you so much for pointing out such a stupid mistake. I was thinking more along the lines of a syntax error, not a naming error. Nice catch, thanks again.

You are welcome!