Probably not a built in integration, so you’ll have to work out how it works and do it via one of the built in integrations. But you are so vague about how it works that it is difficult to be any more specific.
Open the web page that controls the HDMI switch. Click on a control button. What url does it send?
Another thing - learn to post your code properly - see point 11 here.
And would a moderator please move this conversation to a new thread, as it has wildly deviated from whole home audio ![]()