Tuya-Convert might not be possible for this device if the manufacturer started using newest Tuya firmware since this template was published (2020-04-18).
Main device button is used to control the on/off of the USB ports and for that we need to setup a rule, otherwise the button will control the first relay instead.
Rule1 ON Button1#State DO Power4 2 ENDON
And enable it with
3 analog buttons also need a rule to control the relays, I’ve used range because the values have been stable.
Rule2 ON Analog#A0div10<30 DO Power3 2 BREAK ON Analog#A0div10<60 DO Power2 2 BREAK ON Analog#A0div10<80 DO Power1 2 ENDON
Then enable it with
Backlog Rule1 1; Rule2 1; Rule2 5