You might like to check out Heating X2: Schedule Thermostats with Calendars.
The kit includes blueprints and a code generator to create all the YAML code for thermostat and zone control.
I solved the zone problem by
- A template sensor for each thermostat to determine if heat is demanded (set temperature is higher than ambient temperature)
- A group of these template sensors for each zone. The group is on if any one thermostat demands heat and off only if none do
- A simple automation that switches the zone valve on and off when the heat demand changes