Detect 230 volt main supply in a cheap and easy way
With the circuit above, the main thing is sizing the rectifier and the resistor for the amount of power and current they would need to handle.

The 390k resistor looks ok, even with the LED shorted it only consumes roughly 1/8W max which is well within the heating tolerances of a 1/4W resistor,

One thing to consider is creepage and clearance of the 220V circuit, the traces need to be spaced adequately to meet IPC requirements if there going to be used in a product (and if there not, they still need to be spaced correctly for saftey).

A hall effect current sensor might be considered in this application instead of the circuit above. I'm not sure if it's cheaper, but it's easier, I'll let you do the pricing. The circuit would have lower loss (no rectifier), and fewer components, and still have isolation. If you had an ADC you could actually report the current to a microprocessor or use a comparator with a set voltage level to detect the current. 


Source: https://makerselectronics.com/product/current-sensor-module-acs712