本帖最后由 八戒有点帅 于 2024-6-28 19:07 编辑
总算获取到温湿度了,先把我的代码贴上来。
esphome:
name: wsdj
friendly_name: wsdj
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "aaaaaaaafvymSKrgPPN42mkZRXUcbw9xUARHM="
ota:
password: "bbbbbbb2f78163a66140758ef2455f"
wifi:
ssid: "12aaa"
password: "12345678"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Wsdj Fallback Hotspot"
password: "ZRgW4nlaaagJ"
captive_portal:
web_server:
port: 80
i2c:
sda: D4
scl: D5
scan: true
id: bus_a
sensor:
- platform: sht3xd
temperature:
name: "temperature温度"
humidity:
name: "humidity湿度"
address: 0x44
update_interval: 10s
|