Apple TV Integration - tvOS 15 Beta

how do you pair (get a pin) for apple devices that are not apple TV (ex. other airplay devices with no screens like airport express)?

Go to HACS → integrations → three dot menu in top right → custom repositories → enter and select “integration” as the type.

1 Like

some devices will just pair and do not require a pin. my airport express gen 2 and my Denon receiver paired, but all of my airplay capable Sonos speakers require a pin and there’s no where the pin could be displayed.

I got it! :slight_smile:
Thank you so much!!!

Ahhhhh the ability to select inputs (apps) is SOOO SLICK

Thank you @postlund !!


Thanks for all your hard work on this, been waiting for a way to link up my HomePods for quite some time. I’ve managed to get this running ok on 2021.12.0 and it installs fine against my HomePods as well as two AppleTVs. I’ve found two issues so far:

  1. Attempts to send TSS to a HomePod fails but sending TSS to AppleTV works. Interesting side note, sending TSS to an AppleTV with a paired HomePod happily plays the output on the HomePod.
  2. I don’t get the source picker for the AppleTVs.

I can live without TSS for now but if somebody could give me a nudge in the right direction to get the source picker so I can start apps that would be great :slight_smile:

You must check the log to see what kind of error you get when you use TSS with the HomePod, there will likely be something. App launching will only work with latest dev (as it was merged yesterday) or by using hass-atv-beta. You also need Companion credentials, so if you had the Apple TV added from before everything broke, you need to remove it and add it again (this will be improved soon).

Thank you so much for all the effort to make this work! I can connect the ATV and use it.

One thing I noticed, if I start playing something on the TV using the apple remote (without touching Home Assistant), then HA doesn’t update the state to ‘playing’. Is this supposed to be the case?

I noticed that if I turn the ‘remote’ entity in HA off and on, then it updates the state to ‘playing’. From that point HA keeps track of the latest state when I interact with the ATV from the apple remote.

It seems that for some reason after not using the ATV for a few hours, then HA stops tracking the ATV state.


So I have a question. Is there a way to set up an automation, so that when I turn on my Apple TV using the apple remote it will turn on a dummy switch in Home Assistant. I would also like to have the switch turn off when I turn the ATV off with the remote.

I have tried by creating a trigger for when the Apple TV turns on to call service “input boolean:turn on” and chosen the dummy switch and vice versa, but it never actually turns the switch on or off. I thought I remember that this was going to be an option, but I may have misunderstood.

Also, I see two entries for “Apple TV Turned On” and “Apple TV Turned Off” in the trigger drop down. Is there a difference between the two?

@postlund I just want to say THANK YOU.

I came here after the latest beta was throwing the same errors as others and saw the sheer number of responses you have made and know how frustrating it can be to chase down these gremlins and deal with end-users, having done it many times myself! You handle it well and are very professional and obviously committed to getting this to work.


That’s all. :grimacing:


You can look at the state, but unfortunately it is very unreliable so it probably won’t work very well. Some improvements are coming but I don’t expect it to be even close to perfect.

Thank you for your kind words, it nice to hear :blush: It can be a bit frustrating sometimes, yes, that’s part of life. But most people are very helpful and provides nice feedback (at least when things work :wink:). The next release is gonna be big, so I hope you and everyone else likes it!

1 Like

I have been using these for a few weeks now and they work without any problem! Hope you can use some of it! I don’t use the virtual remote at all (disabled the entity) so everything is done with the real Remote.

@postlund I am really happy with the integration!! I’ve seen some nice features are coming up so I can’t wait until the updates are coming in again! For me, it’s one of the best parts of my home automation to automatically control audio, lights and more when watching something! Auto-pause when my doorell rings is another great use!

Is it correct that at the moment there is no way to turn on/off the AppleTV from HA with just a button (like the new physical remote)? Is this something that looks achievable or are there limitations to this?

Also: I have installed the integration from HACS before the december release. What is the best way to remove that and use the built in version from now on? (haven’t upgraded to the new beta). I like new features, but rather wait a little longer for the finished release :wink:

I got my Gen 2 to connect but it doesnt display anything in the media device and it doesnt control anything. Have you functionality on Airport Express?

Nope, that’s where I got stuck too and then I removed it from HA. I would airplay a song to it and nothing happened in HA. But honestly, that’s all an Airport Express can do. It’s not a Homepod and therefore doesn’t have media controls or even a volume.

Could anybody show me a couple examples of streaming a local file and TTS example scripts?

I can’t seem to figure it out.

I got it, im not sure why i wasn’t seeng it lol

Thanks for these automations. I was able to recreate them using the GUI. I have not quite mastered the art of writing yaml. I was able to recreate your autmoations with exception of turning Input Booleans on and off instead of switches. However, it still doesn’t work for me. I think because I don’t have the states defined. Where is that done? I just typed in “standby” and “unavailable” in the “to” and “from” fields, but I don’t think those are actually defined anywhere.

I am hoping I can find that and finish this up. Being able to use the remote to control on, off, and the entire Apple TV; while still using my virtual switch to control my home and other automations would make it much easier for me to tell my girlfriend and daughters what to do.

Thanks again @Patrick1610 for the help with the automation. I also didn’t say it before, but thank you @postlund for the incredible integration that allows me to use my Apple TV to control other Homekit automations. Much appreciated sir.

1 Like

I have not defined anything myself, just using what the integration provides.
Maybe this is easier. The first two screenshots are both triggers in one automation (On), the third is a seperate automation (Off).

For the ‘On’ automation there also is a condition. This makes sure it doesn’t on when going from Standby to Unavailable or vice versa (which is a risk when using the ‘From’ as trigger).

I just occurred to me @postlund why duplicate entries show up in integrations, it is so simple as to boggle the mind for why I didn’t notice it before: Integrations is still auto-discovering devices based on the old Apple TV code and then when your tvOS 15 beta is integrated, you get it there too. I know you mentioned on GIT that you kept thinking you fixed the problem and didn’t know why it kept popping up, I bet that is why.