Home assi̇stant xi̇aomi̇ lywsd03mmc,mi̇ji̇a temperature and humi̇di̇ty sensor connect

hello. i have established a connection between the mijia sensor and the homeassitant via bluetooth. i can access the data. i see the data on the homeassitant main screen. my problem is that i want to transfer this data to the esp32 device and turn the heater on and off with the thermostat card. i do not know how to write code. i just use homeassistant by copy and paste. please help me.