Sonoff mains and uart


I’m just starting up with esphome. I’m reading all over the place that the Io pins of sonoff devices have their DC ground connected to mains line and will totally blow up my PC of I connect to the device while it is connected to mains.

Would that still hold true if I’m using an optocoupled uart dongle?

Also can someone point me to an explanation on how and why it is floating? Does this mean that I could somehow connect mains to the Io pins directly to handle them as inputs? I’m guessing no.