Is it possible to integrate this in home assistant?
I don’t feel this is applicable to a lot of people who are using home assistant.
I would say your best bet would be to have a micro web server using python that takes button requests so home assistant can send a CURL request or another command line function and it will hit your python server.
If you check out the configurator you should be able to make a button for the calls.
You could maybe write a component for this but since it can be done just using HA’s built in components it might be worth writing some new code for the tv box