Zigbee climate control with TRV, external temperature sensor and window sensor

Hi, Home Assistant community!
I’m using the ZigBee TRV connected via zigbee2mqtt TuYa TS0601_thermostat control via MQTT | zigbee2mqtt.io
And I can’t figure out how to properly configure it with the external temperature sensor
Xiaomi WSDCGQ11LM control via MQTT | zigbee2mqtt.io
and the window sensor
Xiaomi MCCGQ01LM control via MQTT | zigbee2mqtt.io

I’ve got a rough idea of what I want.
If the temperature more than 21C then close the valve
If the temperature less than 21C set heat mode
If the window is open - keep the valve closed.

But the TRV seems too smart there are a lot of modes and presets of which I’ve no idea how to use.


If anybody can share some experience configuring similar TRVs?