My living-room TV has a total of 2 HDMI ports (thanks, Samsung!) and I've got seven devices jostling for them. A switch is inevitable. But the three I've been through to date have all had the same issue: they have automatic input selection, and it sucks. The merest suggestion of a voltage on one of the other inputs when you're trying to watch Netflix and *BLAM* the screen flicks to blackness for a couple of seconds, generally at tense bits in thrillers. My current one will only let us use the Xbox when the SNES Classic Mini is switched on. Two of them have had IR remotes; the crappiest, least effective remotes and dismal reception. I've already got remotes for the TV, satellite receiver, amp, Blu-ray and Fire Stick and don't need yet another controller to lose down the back of the sofa.
There has to be a better way, right?
Well, indeed there is. You find a switch that doesn't have an automatic function, that happens to have an RS-232 port, and you build something to listen to MQTT so that you can control it in a bunch of novel ways.