Send a serial command and read the response as a sensor

I want to use a resistance output to my Home Assistant and found a product that can generate a resistance output for many different RTDs.

Resistance output simulator for all standard RTD

However I am not that used to Home Assistant, what is the best way to integrate this?

I want to send serial AT commands to control the resistance, thus faking the outdoor or indoor temperature of my heating system, to make it run less when energy is expensive and more during lower priced.

Anyone have experience of integrating and controlling output devices with serial input?