I get the error below. I can’t do it the component way because the devices are on a different vlan.
WARNING (MainThread) [homeassistant.components.media_player.cast] Setting configuration for Cast via platform is deprecated. Configure via Cast component instead.