Water heating in boilers and electric boilers