Intgrating independent thermometer and theromostat (valve)

It is probably a question already asked, but I could not find a specific answer for my problem.
I installed some Tuya thermostatic valves on my heaters, which communicate via zigbee with the bridge on which I patched the Tasmota firmware, connected to HASS.
The practical problem is that the temperature detected by the valve rises immediately when the heater turns on. For example, if I set the ignition value to 20 degrees, and the temperature drops from 20 to 19, the valve opens and the heater starts to heat up, but after 2 minutes the valve thermometer detects 24 degrees even if I still have 19 degrees in the room, and turns off the heater. Result: the temperature continues to drop, after a while there are 15 with continuous ignitions of a few minutes, useless.
There is certainly the chance of forcing the detected temperature, so yes I can set -5 so that the valve correctly detects the 19 degrees of the room, instead of 24. But then, while the room heats up, 24 degrees are always left around the radiator, the valve always detects 19 because it subtracts the correction value, and keeps it on until there are REALLY 24 in the room. Result: it collapses with heat.
It is not a problem with the valve, unfortunately for how the heater is placed (behind the door, with the valve towards the inside of the niche) the temperature is really that, nearby.
So I bought a zigbee thermometer, and now fun begins :slight_smile:, since I have to configure HASS. The ideal solution would be to send the valve the correction value to be set on the valve, subtracting the temperature detected by the valve from that detected by the thermometer.
For example, always assuming that you have set the desired temperature to 20 degrees:
the temperature in the room drops to 19, the radiator starts to heat up, the valve detects 24 but the temperature is still 19: very well, HASS sends them -5 (i.e. 19-24) so ​​the valve correctly detects 19 and keeps the radiator on.
the temperature in the room rises to 21, the valve again detects 24. This time HAAS sends them -3 (ie 21-24) which correctly shows the valve the temperature of 21, and so the valve closes the supply.
The problem is that I can’t find how to set the automation by sending the correction value to the valve when one of the two temperatures changes, does anyone know how to start me towards the solution? Thank you very much