Just noticed this in his post, which I missed before.
"This method is valid for both the original version of Xiaomi motion and the version of Aqara. In my case, I have modified 4 Xiaomi original versions and 4 Aqara versions and it works without any problems."