while looking for the same i came across this blog https://forum.xda-developers.com/showpost.php?p=77826453&postcount=2
it mentions a Cross platform Remote Control http://mireco.hopto.org/
the remote works for my projector the Xiaomi Wemax one pro. It should work for the MI as well.
the code for the remote is JS so it seems it can be leveraged by home assistant.
im planing to integrate it with node red.
hope this helps