I’ve touched on this subject before in another thread, but never really bottomed it out.
I have some power issues here and there (the wonders of living in the styx (out in the boonies I think is the US version of that phrase), anyway, I digress.
With power going off here and there, you get a dirty shutdown of the Pi, which is not its favourite thing, and I believe this may be the cause of some of the spurious inputs that get created. So, I have a UPS for networking kit (I work from home) and could relatively easily hook up the 5v Pi power supply to UPS, stopping the dirty shut downs.
I would leave the 240v sensor in raw power, but the power that feeds the Pi into UPS.
Now previously it was suggested this would only sort of work, as the power is only read at boot? I can understand the voltage sensor input needs to be on raw power, but the one that powers the actual Pi, I cant see why it would matter, this only powers the Pi at 5v yes/No?