本帖最后由 bainiu 于 2022-12-26 19:13 编辑
这个是简单代码,不支持页面调试,但能实现人在感应。你对照修改参数,论坛里有教程。我是nodemcu 8266上接的。
esphome:
name: esphome-web-fdcx73
# 客厅人体存在
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "xxxxxxxxxxx"
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
- bssid: xx:xx:99:17:D5:xx
# Optional manual IP
manual_ip:
static_ip: 192.168.1.34
gateway: 192.168.1.1
subnet: 255.255.255.0
ap:
ssid: "Esphome-Web-Fdbd23"
password: "d9DQlmerqrewqWC4"
captive_portal:
binary_sensor:
- platform: gpio
id: motion
pin: D5
name: "ren_ti_chun_zhai"
device_class: motion
# Example configuration entry
sensor:
- platform: wifi_signal
name: "ke_ting_wifi_Signal"
update_interval: 60s
button:
- platform: restart
name: ke_ting_Reboot
id: reboot
|