it is also possible to use standard Tasmota button behaviour: one short press controls usb sockets, two short presses control first mains socket, three control second socket and four short presses control third mains socket. Also add a rule for long press to switch all sockets off:
rule1 ON button1#state=3 DO Backlog power1 0; power2 0; power3 0; power4 0 ENDON
Not sure what the analog is connected to, if any. Values stays between 950 and 990.