I need some help with creating my automation scheme. Below is the Automation section of my configuration.yaml file I use. Automation 1 works just fine; when kodi is paused/stopped the table light comes on. Automation 2 does not work, when kodi resumes from a paused state the light does not go off and a notification is not sent (notification was built in just to see if the turn light off service was the issue), I also commented out other conditions to eliminate possible error locations. I have played with this couple lines of code for multiple hours and can’t get it to work…what am I missing?
[code]automation:
- alias: “Kodi Pause @ Night”
trigger:
platform: state
entity_id: media_player.kodi_sheild
from: ‘playing’
condition:
#- platform: stateentity_id: sun.sun
state: ‘below_horizon’
- platform: state
entity_id: light.table_light
state: ‘off’ - platform: state
entity_id: light.Kitchen_Light
state: ‘off’
action:
service: light.turn_on
entity_id: light.table_light
- platform: state
automation 2:
- alias: “Kodi Resume @ Night”
trigger:
platform: state
entity_id: media_player.kodi_sheild
from: paused
condition:- platform: state
entity_id: light.table_light
state: on
#- platform: state
entity_id: light.Kitchen_Light
#- platform: state#state: 'off'
entity_id: light.art_light
#- platform: state#state: 'on'
entity_id: light.bobo_light
state: ‘on’
action:- service: light.turn_off
entity_id: light.table_light - service: notify.Pushover
data:
message: “lights turned on.”[/code]
- platform: state