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