sudo curl https://get.pimoroni.com/buttonshim | bash
sudo apt-get install git
sudo pip3 install pychromecast
cd /home/pi/
sudo git clone https://github.com/shivasiddharth/pi-gcast-remote
#Enter the IP Addresses of your Google Cast devices
chromecasts_ip=['192.168.1.4','192.168.1.13']
#Enter the names of the Google Cast devices as in the Google App
chromecasts_name=['Living Room Speaker','Living Room TV']
sudo chmod +x /home/pi/pi-gcast-remote/scripts/service-installer.sh
sudo /home/pi/pi-gcast-remote/scripts/service-installer.sh
sudo systemctl enable gcastremote.service
To switch between the devices, press and hold the A button/key.