Voltage presence sensor needed

Hello,

If you just need an I/O you can use ESP board with an optocoupler, there are many solution that you can build yourself but I believe the easiest would be using an optocoupler like Amazon or Aliexpress.
On market these boards exists in 120VAC version I found this 120 VAC version.
The logical output will go to your ESP or other microcontroller that can be connected to your HA instance.

An ESPHome code example that should work in this post..

A similar solution is in this post, just using Tasmota instead of ESPHome.

Alternative is measuring current using ESP and CT Clamp (CT Clamp Current Sensor — ESPHome)
CT clamp and voltage measuring device are available also commercially example Shelly.

Please mind you are dealing with VAC be careful and if you are not sure recheck everything and if your are still not sure ask to someone that can help you.

1 Like