I am running HA 2021.6.3
I have integration setup for Apple TV, it shows two entities: 1. media_player.appletv entity. 2. remote.appletv
My Apple TV is connected to samsung TV with CEC so putting apple tv to sleep will turn off the TV and press menu button on apple tv remote will wake up and turn on TV.
The goal is to keep kids watching tv in control.
I want to write an automation where when the apple tv is turned on or start playing it should turn off after 1 hour.
I used the UI and created an automation it looks like this:
alias: Apple TV Off after 1 hr
description: ''
trigger:
- platform: device
device_id: 117e9a59992b5394132d877612f5da3c
domain: media_player
entity_id: media_player.apple_tv
type: playing
for:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
condition: []
action:
- type: turn_off
device_id: 117e9a59992b5394132d877612f5da3c
but this does not work.
any idea?