How to make thermostat with 2 heaters working in shifts

I have 200 liters water boiler with 2 heating elements:

  1. There is a big pipe inside to heat up the water from main heating system of a house. To launch this heat exchange I just need to switch on the pump 100W.
  2. There is a 6kW electric heater installed in the boiler if main house heating system is not working.

I have cheap electricity from 23pm to 7am and I want to create smart scenario:

Put thermostat on the dashboard with temperature scale from 10 to 70 degrees Celsius.
Below the scale there should be 3 small buttons:
pump icon, electric heater icon and main ON/OFF button.


  1. Main button is ON.
  2. Chosen temperature on the scale is higher than actual water temperature.
    3.1) Time is from 7am to 23pm.
    Then by default heat exchanger pump should be ON and electric heater should be OFF.
    3.2) Time is from 23pm to 7am.
    Then by default heat exchanger pump should be OFF and electric heater should be ON.

If sometimes main heating system is OFF during summer, then it should be possible also to switch electric heater ON from 7am to 23pm manually and it should be automatically OFF after short period. Usually 15 minutes is enough.

Something like this, but here thermostat with 2 heaters switching on simultaneously with a small delay to avoid high jumps in electric system.

How to make it?