The standard calibrate_polynomial filter was not working for calibrating the temperature on a DHT22. I plugged my datapoints into Wolfram Alpha and got a cubic polynomial (0.0166222 x^3 - 4.19248 x^2 + 352.991 x - 9846.87) that perfectly matches my points, so I want to use that. When plugging it into a lambda filter, I get a few errors.
I figured out why it wasn’t working. My DHT-22 is sending the temperature in C, and HA is converting it to F. All of my calibration readings were in F, so ESPHome was applying F calibration to C readings.
My formulas were working perfectly, it was the data used to generate them that was the issue.