Start mediastream from a switch til a Chomecast

Hey guys

I am total newbie at this and HA… I have had some succes with lights, switches, and camera integration til the Dashboard. I have Chromecasts installed, and would like too make an automation that start playing a media stream when turning af switch too on.

Can anyone point me in the right direction?

Claus