I couldn’t find this info on forums so i wanted to open feature request. Maybe someone knows a way to do it, but if it really doesn’t exists - here my 2 cents.
We should have a REST API endpoint when when called (and properly submitted) it will add and/or configure integration, without having to go through GUI.
I understand it’s a silly feature, perhaps. But my kid loves playing with roborock vacuum, and sometimes he accidentally resets WiFi (more often than not). I then have to go through hastle to re-integrate it with Mi Home app, then re-integrate it with Home Assistant, then extract cloud token and add it for xiaomi cloud map extractor.
The last part i managed to automate. I’ve tweaked Xiaomi Cloud Tokens Extractor to automatically update secrets file with new token and send it back to home assistant then reload the integration so xiaomi cloud map extractor can work with it.
It would be great if i could automate (re)adding of Miio integration via API endpoint too.