I have a DHT11-sensor in my garage. But I notice that it is roughly 2°C off.
Is there a way to offset, so the entity always is 2°C offset from its reading?
My Yaml for it is:
substitutions:
name: esphome-web-0b9707
friendly_name: ESPHome01
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: dev
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
# Allow provisioning Wi-Fi via serial
improv_serial:
wifi:
# Set up a wifi access point
ap: {}
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp8266.yaml@main
import_full_config: true
# To have a "next url" for improv serial
web_server:
# TEMPTEXT
sensor:
- platform: dht
pin: GPIO4
temperature:
name: Temperature
humidity:
name: Humidity
model: dht11
update_interval: 30s
sensor:
#sensor: DHT22
- platform: dht
pin: GPIO22
model: AM2302
temperature:
name: "Badezimmer Temperature"
id: am2320_temp
accuracy_decimals: 1
filters:
- round: 1 # round to 1 decimal place mehr kann er nicht
- offset: 0.37 # noch in Arbeit
humidity:
name: "Badezimmer Humidity"
id: am2320_hym
accuracy_decimals: 1
filters:
- round: 1 # round to 1 decimal place mehr kann er nicht
- offset: 0.00 # noch in Arbeit
update_interval: 20s
I’ve experimented with these temperature sensors a lot; to then extent that I built a temperature controlled oven. The spec is +/- 2°C Yup, they can have an offset up to that amount. But also the measurement wil vary with the temperature. So its not just T=Tm + O! It’s T = S * Tm + O. S and O are specific to each device. Fortunately, S is usually pretty close to 1, but enought to be annoying.
These devices can be as much as 4°C off the actual temperature. Humidity also plays a small roll in the measurement. As I remember, they’re rated to be used from 0°C to 40°C. Mine, shielded from rain, only lasted a year in a garden environment. My experiments showed that the DHT12 was only slightly better than the DHT11.
The DHT style sensors were okay when all others were expensive and you didn’t really care that much about accuracy. Today, if you care at all about accuracy you should pick a better sensor.