Calibrating Home Assistant Sensors

Calibrating Home Assistant Sensors

To calibrate my temperature and humidity sensors, I placed them inside a glass jar and calibrated each one to match their collective average value.

Let s_n be each sensors current value in degrees C. Calculate the average value of all sensor readings using ave = average(s_1, s_2, s_3, s_n). The calibration value can then be derived using:

adjustment_s1 = s_1 - ave

This \delta adjustment value should be added to each sensor using value_template. I amended my template to round to 1 decimal place.



# Bed Room
- platform: mqtt
  name: "Bedroom Temp"
  friendly_name: "Temperature"
  device_class: temperature
  state_topic: "tele/son_bedroom_lamp/SENSOR"
  value_template: "0"
  unit_of_measurement: "°C"
- platform: mqtt
  name: "Bedroom Hum"
  friendly_name: "Humidity"
  device_class: humidity
  state_topic: "tele/son_bedroom_lamp/SENSOR"
  value_template: "0"
  unit_of_measurement: "Hum %"

The final values will not be exactly the same because each sensor’s decimal threshold is different. (The threshold is when a sensor would tick over from, say, 25.5C to 25.6C)

Sensor Calibration Screenshot