How to setup temperature sensor from 10k NTC Thermistor

I have NTC 10K b3950 Thermistor with characteristic below. How to setup temperature sensor based on this data?

||NTC 10K b3950|
|t °C|kOhm|
|-40|401,86|
|-35|281,58|
|-30|200,2|
|-25|144,32|
|-20|105,38|
|-15|77,9|
|-10|58,25|
|-5|44,03|
|0|33,62|
|5|25,92|
|10|20,17|
|15|15,84|
|20|12,54|
|25|10|
|30|8,04|
|35|6,51|
|40|5,3|
|45|4,35|
|50|3,59|
|55|2,98|
|60|2,49|
|65|2,09|
|70|1,76|
|75|1,49|
|80|1,27|
|85|1,09|
|90|0,93358|
|95|0,80537|
|100|0,69752|
|105|0,60642|
|110|0,52914|

there are a couple of ways to do it. both ways will take some work.

the first way, and the way I would do it, is to enter create a “best fit” line equation.

you can do that a couple of ways.

the first is assume that the line is fairly linear and use geometry to find the equation of the line in the “slope-intercept” form (y = mx + b)

or you could put all of those data points into an online calculator to give you the actual “best fit” equation.

you will then use that equation in a template sensor to return the temperature based on the resistance value in HA. (I assume you have the resistance values being fed into HA, right?)

the second way is to create a map of the temperature vs resistance in a template sensor and then use that map to return the value of the temperature based on the resistance value that is input into your system.

the problem with the map method is it needs discrete resistance points to correlate to the desired temp values. if the resistance value is analog (which I assume it is) then the mapper won’t work.

So I would go with the equation method.

There may be other ways but those are the ones I can think of off the top of my head.