Window up and down button

Hello, the other day I acquired some devices to raise and lower the windows https://es.aliexpress.com/item/1005005801937241.html?spm=a2g0o.order_list.order_list_main.31.48f2194do1SBOE&gatewayAdapt=glo2esp
A priori they seemed to be compatible with the TUYA application and really work well, both the “button” (https://i.imgur.com/TTWzZdx.png) and in “position” (https://i.imgur.com/KHkiHdB.png) (this drag to a % and stay there). The problem is that in HA, it is not 100% compatible neither with TUYA nor with localTUYA. Let me explain: It works, it works, but the “POSITION” mode (https://i.imgur.com/KHkiHdB.png) never works perfectly, constantly if not always, it gets out of sync. I don’t know if it’s me that I don’t know how to make it work or what is the reason …

I bought them because I wanted to make the windows open from one hour and close from another. In between, I wanted to add a light sensor and go down or up to always keep more or less the same intensity (this is so that I do not burn the plants). But of course the automations only “work” with the “position” mode.

So, my idea was to create a system that simulates that I press the button “up” “stop” or “down” depending on the moment. The problem, is that I am a tremendous noob of this and everything is very complicated for me.

Could someone give me some advice or help me to know how to do this?

Thanks