I had been trying to find a neat solution for the raspberry pi zero that sits behind my TV to run pyCEC and interface to home assistant. I also had a problem that I don’t have many HDMI ports on my TV and could not waste one on the pi. This is the solution I came up with:
Yes, exactly that. The pyCEC / Home Assistant integration has existed for ages. I have a 2016 55" 4K HDR Samsung TV which is a year too early to support SmartThings but is too good a panel to justify replacing when it works fine as a screen. Adding this makes it HA controllable.
I do what you have suggested with a Unifi doorbell and Viewport. When the doorbell rings it turns the TV on (if it is not already), switches input to the viewport, switches the viewport to a view of the doorbell, then 20 seconds later switches it all back.
This case was just a way to tidy it all up and not lose an HDMI input.
Have a look here for more info about pyCEC and Home Assistant.