本帖最后由 koymeha 于 2022-7-22 17:49 编辑
用esp-01s刷了dht22的bin,显示这个温湿度的精度很不准确,小米的蓝牙温湿度传感器显示的是温度29℃,湿度67%;dht22 显示的是温度 11.10000 °C,湿度19.60000 %;是不是我哪里的操作有问题呢?dht22.yaml
esphome:
name: dht22
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "pGcJhvivzIiu34klA3yQm1frmkCvvV7X6MRnDz5aS6s="
ota:
password: "1"
wifi:
ssid: "****"
password: "**********"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dht22 Fallback Hotspot"
password: "cxF1eydU9CXR"
captive_portal:
sensor:
- platform: dht
pin: 2
temperature:
name: "温度"
id: "Living_Room_Temperature"
humidity:
name: "湿度"
id: "Living_Room_Humidity"
update_interval: 30s
复制代码
esphome dht22日志
[09:00:50][D][dht:048]: Got Temperature=11.1°C Humidity=19.6%
[09:00:50][D][sensor:124]: '温度': Sending state 11.10000 °C with 1 decimals of accuracy
[09:00:50][D][sensor:124]: '湿度': Sending state 19.60000 % with 0 decimals of accuracy
复制代码
------------------------------------------------------------------------接了4.7k的电阻已解决,而且发现dht11的精度跟dht22的相差不多。