Apple TV HA control

I’m new to HA and see a lot of potential with it. I having trouble doing anything with my Apple TVs on HA. I’ve been able to pair and add 3 Apple TVs to HA and all show the media center and remote card on my dashboard. I’m not able to control any of them. I’m trying to do the automation where I hit play or pause on the Apple TV remote and it turns on or off the lights depending on play or pause. I’ve watched Youtube videos, downloaded blueprints and no luck. I can’t figure out what I am missing. Any suggestions?

The automation you are after is based on the media player entity of your Apple TV and the state. I do the same thing in my house where I have five Apple TV’s and control a lot based on state. For instance, in my theater, I have something similar to what you want to do, when you play the lights all go out and when you pause they all come on so you can navigate to the bathroom, so the trigger is:

trigger:
  - platform: state
    entity_id:
      - media_player.theater_apple_tv
    from: playing
    to: paused
    for:
      hours: 0
      minutes: 0
      seconds: 3

And then you can change that based on your needs (from paused to playing or something to standby - which is pretty much off).

After you have the trigger(s) you can define what you want to happen as a result.

2 Likes

At least for my Apple TVs, the media_player entity state changes seem to be ignored if the corresponding “remote” entity is OFF, and for some reason my remotes tend to randomly turn themselves off, so I had to create an automation to keep them on (which has no effect on the media_player or Apple TV). I’m not sure if this is specific to me, or if there is a better fix, but if your Apple TV automations aren’t triggering and it’s driving you crazy, keep an eye on the remotes.

1 Like

If you’re looking for a fun way to control your Apple TV devices from your dashboard, you might like my project

1 Like

Thank you all for the quick responses. I’ve tried the suggestions however nothing worked. I can get automations to work on all my light switches and door lock but nothing on the Apple TV. I even tried to click directly on the plus sign on the entity and create the automation that way with no success. I’m totally at a loss here.

Thank you all for the help again. Figured it out. I had the password enabled on Airplay. Once I disabled and did the integration again, works like a charm!