Detecting 240v

I'm trying to design an Arduino-based central heating controller. I've worked out (I think) turning things on and off, but I'd like to be able to detect whether there is voltage across the terminals leading to the thermostat on the hot water tank. Has anyone got any advice for that? It's literally a 240v thermostat switch being supplied power. When cold enough, there'll be current and I want to detect that current to make decisions in software about whether to turn the hot water on or not.

Many thanks in advance.

Neil.

you can use something like this

which can also be made, just run your wire though it and it outputs 0-5 volts perfect for analog input

I'd like to be able to detect whether there is voltage across the terminals leading to the thermostat on the hot water tank.

I want to detect that current

Do you want to detect the Voltage or Current?

You can detect the voltage with an opto isolator which is monitored by the Arduino.