I have a Bathroom project where i wanted to turn on 2 lights switches that are connected to speakers when i start an Airplay stream so i can have automated music in my bathroom while i shower :).
This is how i pulled it all together…
I installed the first speaker in the light socket with the bathroom fan connected to a zwave switch named Bathroom Speaker 1. The second speaker was connected to a zwave outlet named Bathroom Speaker 2. Next i created a virtual switch named Bathroom Speaker This gets presented to Homekit through the JSON Complete API smartapp as apart of the Homebridge-smartthings install.
After adding your Apple TV 4 or 4K to homekit as a switch with Homebridge-dacp.
I named mine Bathroom2 you should have something like this in the home app.
And the final bits of automation
Now you can say “Hey siri, turn on the bathroom speaker” or simply Airplay to the bathroom everything will automagicly turn on and work like this.