I use a combination of Leaf Spy Pro, Home assistant and a wifi Circuit breaker.
I set the upper limit and when reached power is turned off to the EVSE
image preview here
https://drive.google.com/file/d/18pXWz8IGeniuBiz8QWDUD_RE4uNGjSgq/view?usp=sharing