I made a Thermostat based on a ESP32 devKit board.
On the same thermostat I also connected a BME280 sensor.
I have four rooms where I placed four Xiaomi Bluetooth Temperature/Humidity sensors and four ESPresence beacons (used to trace my position inside the house).
In this way I have the possibility to know where I am and the temperature and humidity of the target room.
The Xiaomi sensors send via bluetooth the updates to a Bluetooth Proxy (esphome based) strategically placed and connected to my HomeAssistant server.
The updates coming from the Xiaomi sensors are received by HomeAssistant server.
In the HomeAssistant I defined a "template" temperature sensor that updates its temperature value using the ESPresence updates,
publishing the current temperature of room where I actually am.
The Thermostat reads the template sensor updates to activate/deactivate the heating mode.
Only in case the homeassistant is not reachable, the thermostat uses the local BME280 values.
That thing to be implemented will be to add also thermostatic valves to partialize the heating in the rooms where I am not.