I am trying to turn my TV off when no motion is detected. Below is what I have tried.
If the TV is ON it works. Turns the TV OFF.
If the TV is OFF it does not work. it turns the TV back ON.
alias: "Make the Apple TV sleep"
sequence:
- service: remote.send_command
target:
entity_id: remote.lounge_appletv
data:
delay_secs: 1
command:
- home_hold
- select
- service: media_player.turn_off
target:
entity_id: media_player.lounge_appletv