I'm no expert, but a failure of the diverter valve (the motorised valve) should not cause the boiler to keep switching on and off. The most common symptoms of such a failure (assuming you have a combi boiler, i.e. no hot water tank and there is hot water on demand) are things like the central heating coming on when you turn on the hot tap. A combi boiler will only switch itself off through the application of the timer (which you have already checked); when there's no demand for hot water (i.e. when you turn off the central heating or the hot tap); or when it overheats. Intermittently coming on and going off is known as 'cycling' and was the problem I had, which turned out to be caused by a furred-up heat exchanger within the boiler (this is the apparatus by which the heat from the gas flame is transferred to the cold water coming into the boiler). Because the heat exchanger was furred up, it couldn't transfer the heat quickly enough to the cold water running through it, resulting in temporary overheating and the saftey cut-out operating. Then, as the heat exchanger cooled below the overheat temperature, the boiler would come on again, heat a bit of water, get too hot and cut out. This on/off cycle was repeated and meant that I didn't get meaningful heating or hot water. Unfortunately, a new heat exchanger is expensive and has to be fitted by a Gas Safe registered engineer.
Your problem might not be the heat exchanger, but if it is, I am a bit surprised that the plumber you consulted has referred you straight to an electrician. It could be that the problem is in the printed circuit board within the boiler (hence the electrician), but from my (very limited) experience of combi boilers, the motorised valve wouldn't have been high on my list of things to investigate.
In all matters of this kind, however, you must consult a competent and qualified engineer. My answer above is only intended as a pointer to what might be the cause.