How to use Applescript to turn off Apple TV in iTunes?
This Applescript does the job very well!

tell application "iTunes" to get name of AirPlay devices
tell application "iTunes" to set selected of AirPlay device "Apple TV salon PT" to false