Current Transformer to trigger ESP32

I need to determine whether a pump motor is running, and use that to trigger an ESP32. As luck would have it, the next day a colleague at work mentioned needing something similar for his home automation system. So, I created a video to describe the operation of the initial circuit that I created.
The current transformer shown is the CR8410-1000 from CR Magnetics.
Here’s the schematic:
This diagram includes the optional filter capacitor (in orange) shown in the video, this smooths out the waveform of the signal going into the ESP32.