Is there a way to automate psudo calibrating multiple sensors?

I have a system with multiple sensors - 8 each temperature, pressure and humidity.

while I am not to bothered about genuine accuracy of these it would be nice if they all agreed with each other.

I know I can manually calculate and add offsets to each sensor but I am hoping there may be a way to automate the process.

all of the sensors are in a dynamic system of airflows being monitored however when the airflow is stopped the box they are in will reach an equilibrium and its at this point the offsets could be set.

I have a rough outline of how this could be done but no idea how to go about doing it.

my thoughts are something like : (for temperature)

if fans are off for 2 hours then start the process

take readings from all 8 sensors and store them and calculate the average

using the average calculate the required offset for each sensor then use this offset until the next time the process runs.

is this something that can be done in the device or would it have to be done in HA? either way has anyone got any idea how I could accomplish this? or do I just need to suck it up and do it manually.

If you’re using Esphome, you don’t need to apply offsets constantly. The calibrate linear and calibrate polynomial functions are intended for this scenario.

You just take at least 2 readings (ideally more) across a verified range and apply the calibration.
Any difference between devices from then on would be an actual difference.

Only downside is you need to do it manually, but you’d only ever need to do it once.

If I had thought to do this while everything was on the bench that would have worked but not easy for the pressure and humidity side.

The unit is a house air handling unit so I only have atmospheric variations to work with now its built.

I guess manual will be the way to go but I will have to keep ane eye out for the biggest variations to use which will take time which is why I was looking to do this as the purpose is to see the variation between different areas rather than accurate absolute readings.

The unit is a MVHR ststem so the sensors are to determine things like pressure variance before and after filters to let me know when they need changing and temperatures across the heat exchanger to work out efficiency of heat transfer. Thats why absolute accuracy isnt so important as comparative differences.

I see a lot of snapshots and spreadsheets in my future😪

I think you could do it automagically if you were really keen to write a fairly large config with a fair amount of lamdas.

Probably “less effort” to do manually.

I reckon you might use some combination sensors, some moving average filters, delta filters, and some copy/template sensors, amongst other things.

Humidity calibration can be done with salt in a container, however pressure is a bit more tricky to calibrate.

Not really, which is why I suggested calibration instead of offsets. With calibration, you can take readings at extreme ends of the scale, and the code will figure out the values in between.
Eg. For temperature, you calibrate at 0 (ice water) and 100 (boiling water), plus a couple of other points for accuracy (30 & 60).
You don’t really need to stick to the ranges that your sensors will be exposed to.