How to program a digital2resistor converter

Hi. We have a district heating in our local community driven cinema, I am currently looking into improving the heating control. The problem is that the heat exchanger unit in the building is basically a open loop regulation where the temperature of the radiator water is based on the outside temperature. It is not very good at predicting the amount of heat required to heat the cinema. To “close the loop” it is possible to connect a PT1000 sensor monitoring the inside temperature. But in a big cinema room it is difficult to find a good placement for a single feedback sensor.

So by placing several sensors around the cinema room I can now calculate the mean temperature. I want to feed this to a unit simulating the PT1000 normally placed in the “living room”. I bought a simple 4 relay zigbee relay unit and fitted it with resistors so I can simulate all temperatures between 13° and 28° C
Screenshot_20240318_172840
I am quite new to HA, so I’m a little lost on how to program the relays given that all relays shorted simulates 13°, open relay 1 adds one degree, open relay 2 adds two degrees and so on. For example If the mean temperature is 19° K2 and K3 should be open

Thanks!