id: '1619471534244'
alias: Turn off living room light with Apple TV
description: Turn off living room light with Apple TV
trigger:
- platform: state
entity_id: media_player.living_room_2
condition: []
action:
- type: turn_off
device_id: c69d0bb88d04e6998dcb59ca505a0c3a
entity_id: remote.living_room
domain: remote
- type: turn_off
device_id: bf9734d41b042acd4b1ba8fdb443fbac
entity_id: switch.wemo_living_room_light
domain: switch
mode: single
the first automation is the one I am working with after looking around on here for similar. The second one is the first one and I thought it wasn’t work because I wasn’t using a state trigger.
Basically what I want to do is have the light turn off when I turn the Apple TV / tv off after 11 pm.
Yes it didn’t work. I tried it a couple of ways trying to turn off the Samsung tv or Apple TV.
neither did the trick.
alias: turn off light with TV
description: turn off light with TV
trigger:
- platform: state
entity_id: media_player.samsung_smart_tv
to: 'off'
from: 'on'
condition: []
action:
- service: switch.turn_off
target:
device_id: bf9734d41b042acd4b1ba8fdb443fbac
mode: single
alias: turn off light with TV
description: turn off light with TV
trigger:
- platform: state
entity_id: media_player.samsung_smart_tv
to: 'off'
from: 'on'
condition: []
action:
- service: switch.turn_off
target:
entity_id: switch.wemo_living_room_light
mode: single
Did you copied my example 1:1? Please go to automation editor, open the concerned automation and switch to yaml mode.
Looks like you have to much quotation marks in the on/off section.