Web automation with home assitant

Hi everyone.
I have a proprietary home automation system that no longer meets my needs because it only manages lights and shutters.
Luckily this system is mqtt enabled and I used this method to migrate to home assistant using the proprietary system only as a dumb executor of home assistant commands. In turn, the system then returns the status updates via mqtt to the home assistant, maintaining synchronization between the two systems.
This is fine for normal operations for example when I press the physical switches on the wall. The issue comes when I press the global switches that turn off all the lights and close all the covers in my house. This physical action is not reported on MQTT events on the network causing a misalignment in home assistant .
What I know is that the proprietary system has a web interface (php and javascript) and when I navigate to the main screen and press the cover or switch menu it sends all the mqtt updates related to all the selected devices (shutters or lights).
This is the chance I have to realign my home assistant!

I would like to interact with it via web automation by simulating page navigation and clicks to allow the proprietary system to trigger the necessary mqtt messages.
Now the question for you guys… is this the best way to achieve my goal? what would you suggest?
I don’t think using tools like Selenium or Puppeteer will be an easy solution due to permissions and containers structures and also I did not find many topics about integration of this tools with home assistant .
Can you share your experience or point my on the right way?

Thank you