Hi,
I think that you can use an optoisolator, but in analog version...
Means, drive it with an serial resistor (dissipate power!!) or even an identical impedance capacitor(be care pls.with 250V AC capability!!), or a mx of both.
The LED current proportional outut current you can calibrate in AC/Linevoltage...
In all cases. its an analog solution; all inividual coupplers are to calibrate_current transfer ration are nonuniform & th serial capacitances have maybe +/-5% (or even +/-10%) tolerances...
Connect a revers polarised diode parallel with the LED for the AC modus.
K.