Automatic Switch to active device

Hi, is there a automatic switch to the active device. I have 2 devices (Kodi on PC and Kodi on LibreELEC RPi). Normally only one device is active at one time. Therefore would be good to have an automatic switch

No it would be highly inefficient to constantly check all hosts to do that, and consume battery for no reason.

You can automate for the conditions you want with the API and Tasker or Automate.

ok, thanks. Where I can find instructions to automate this via Tasker?

In the docs ?