Gravity: EC Sensor with integrated PT1000

G'day!
I'm using the above sensor with ESPHome.
I can get the EC side working fine with calibration etc, but the inbuilt temp sensor is causing me a few issues.
With some linear interpolation, this formula seems close for my desired range, but I don't think it is right.
Can anyone list the correct one?
temperature = 9.915 + 0.01674 * voltage_mV
My full code in case it helps anyone else: https://community.home-assistant.io/t/code-for-dfrobot-ec-sensor-with-integrated-temperature-probe/930263
Thanks in advance.
https://community.home-assistant.io/t/code-for-dfrobot-ec-sensor-with-integrated-temperature-probe/930263/3

OK, so seems it was the linear temperature coefficient in the source code that was resulting in exponential drift over time. This sensor's response is definitely non-linear!
I've transcribed the source code into C++ and made lambda sensors for ESPHome using an ESP32S3 with ADS1115 running from the 3V3 rail.
I really think I needed to use either a linear voltage regulator or provide a reference voltage for the ADS1115. The webpage for this product does suggest you might want to explore this, but
I do think it's obligatory for responsive readings without smoothing. I suspect the linear approach in the source code is a reasonable approximation, but as a fluctuation of 0.01'C has a significant impact on the eventual salinity, it's useless without automating the calibration every few hours.
I tried that approach first by simply automating the cal_slope calculation from a reference temperature, but at that point, you may as well just use the reference temperature for all calculations instead.
Managed to smooth the PT1000 enough to be able to get an internal reading that I can trust, but at a cost of it being slightly less responsive to change.
Opted to simply do both, so EC and salinity are derived from the EC probe + internal/external temperature. This enables a sanity check on the readings, which a I intend to let this probe have full control over my mains water supply, is important!
I'm using this in a marine aquarium so 53000uS/cm translates to 35ppt at 25'C. Single point calibration at 53000uS/cm uses the external temperature so it can enter a value to match my Hanna probe. The supplied calibration solution should NOT be used for this application as it will only significantly increase your margin of error.
The external reference temp is supplied by Home Assistant from a more reliable temperature sensor.
Anyway, found a few random posts for people asking for help to try and get this working, but no valid solutions.
My stable config can be found here
Hope it helps the next person - As you can see, I can get the PT1000 to stay within +/-5uS/cm


OK, so didn't help that I was given the wrong source code with the probe. Didn't contain anything for the temp sensor so no wonder I was struggling!
This seems to work, though I've added a button to calibrate against a known temp as I'm using a fixed offset of -2.87 for now.
Again, feel free to reply if this could be better!
float voltage_mV = id(temp_voltage).state;
float voltage = voltage_mV / 1000.0;
const float GDIFF = 30.0/1.8; // ~16.67
const float VR0 = 0.223;
const float G0 = 2.0;
const float I = 1.24 / 10000.0; // 0.000124
float Rpt1000 = (voltage/GDIFF + VR0) / I / G0;
float temperature_raw = (Rpt1000 - 1000.0) / 3.85;
// Apply calibration offset
float temperature = temperature_raw + id(temp_cal_offset).state;
