How to start charging if i have 1 ór 2 divices (tablets) on a switch and stop charging if all are full?

I have an automation that starts and stops when i have 1 devicy pluged in, but not if i have 2 devices and 1 is full and the other not.

I have 1 switch where i can charge 1 or tablets. I don’t use them all the time.
I want to charge my battery’s (or 1) if 35% of the batterij is emty and stop if 1 or 2 devices are full.