The figure is indicative of one way of connecting the valves and is not binding.
The diverting valve has one inlet and two outlets. It accepts the hot water of the solar and if it is lower, eg. of
40 ° C leads it to the gas unit to heat it to the desired temperature we want. If the solar water is above 40 ° C, it leads directly to the consumption or the thermostatic valve.