Basically this would be a block added to the tesla-coil that would give it a friendly/non-friendly detector, So that it would only zap hostile mobs. Keeping villagers and yourself safe.
I looked to see if something like this has been suggested before, couldn't find anything. So if I am inadvertantly posting an old idea, I apologise.