没有连接任何接线,硬件是NodeMCU。见代码中文注释,删除该句以下的配置后,一切正常,可以连接wifi。
另外,不配置pin2作为输入或者输出,也是无法连接。
esphome:
name: e02
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "12345678"
wifi:
ssid: "xxxx"
password: "0123456789"
fast_connect: true
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "E02 Fallback Hotspot"
password: "123456789"
captive_portal:
web_server:
port: 80
switch:
- platform: gpio
pin: 14
name: "Switcher1"
id: Switcher1
- platform: gpio
pin: 12
name: "Switcher2"
id: Switcher2
- platform: gpio
pin: 13
name: "Switcher3"
id: Switcher3
- platform: gpio
pin: 15
name: "Switcher4"
id: Switcher4
binary_sensor:
- platform: gpio
pin: 2
name: "sensor0"
# 删除以下配置则一切正常
- platform: gpio
pin: 0
name: "sensor1"
- platform: gpio
pin: 4
name: "sensor2"
- platform: gpio
pin: 5
name: "sensor3"
片子是这个
|