这个时dht11的代码
esphome:
name: dht11
friendly_name: dht11
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dht11 Fallback Hotspot"
password: "JotMslTRGTr0"
captive_portal:
sensor:
- platform: dht
pin: 4
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"
update_interval: 60s
这些简单的代码刷进去ha直接就能发现你的esp8266
你先刷一次就明白了 |