binary_sensor:# 水浸 雨水 传感器-platform:gpiopin:number:GPIO2inverted:truename:"Water Overflow"# 红外传感器-platform:gpiopin:number:GPIO4name:"cook"device_class:motionsensor:-platform:dhtpin:GPIO5# D1 对应 GPIO5model:DHT
esphome: name: simple_led_control platform: ESP8266 board: d1_mini wifi: ssid: "YOUR_SSID" password: "YOUR_PASSWORD" # Enable logging logger: # Enable Home Assistant API api: ota: password: "OTA_PASSWORD" # Define a binary sensor for the button binary_sensor: - platform: gpio pin: ...
value+1binary_sensor:-platform:gpiopin:number:D2mode:input:truepullup:truename:my_binary_sensor...
esp8266使用esphome接入hass 对于生成配置文件的更改 此处nodemcu泛指集成的开发板,一般十几块钱一块 下方使用的是D1,对应的针脚是GPIO5 esp8266: board: nodemcuv2 binary_sensor: - platform: gpio pin: GPIO5 name: "红外传感器" device_class: motion 针脚定义参考图 参考官方文档 https://esphome.io/compone...
gpio id: relay_1 pin: D1 # 根据你的模块修改 GPIO 引脚 - platform: gpio id: relay_2 pin: D2 - platform: gpio id: relay_3 pin: D3 - platform: gpio id: relay_4 pin: D4 # 可选:如果你想为继电器添加开关实体 binary_sensor: - platform: gpio name: "Relay 1 Switch" pin: ...
"mdi:lock"output:'unlock'duration:500msbinary_sensor:#检测单元门呼叫rx引脚 gpio3-platform:gpioid...
tx_pin: GPIO19 rx_pin: GPIO18 baud_rate: 256000 parity: NONE stop_bits: 1 globals: - id: cpu_speed type: int restore_value: no initial_value: "0" ld2410: id: ld2410_radar #Configuration entities number: - platform: ld2410
password:"12345678"captive_portal:# Enable logginglogger:# Enable Home Assistant APIapi:# password: "1"ota:password:"123"web_server:port:80switch:-platform:gpiopin:GPIO0name:"书房灯1"id:relay2inverted:Truebinary_sensor:-platform:gpiopin:GPIO2name:"press_switch_lib1"device_class:openingfilters...
lambda'return 50.0 / 180.0;'# 除了远程控制外,我还接了一个开关,用于手动开门,为了避免误触,我设定开关是长按启动,并设置一个传感器用来接收开关信号binary_sensor:# 这里定义了一个二元传感器,也就是只有ON/OFF两个输出-platform:gpiopin:number:GPIO4inverted:True# 这里是将信号反转,因为我的开关是按下后...
binary_sensor:-platform:gpio pin:GPIO14name:"Physical Button (GPIO14)"id:gpio14_button filters:-delayed_on:50ms # 消抖滤波-delayed_off:50ms on_press:# 按下按键时切换GPIO5then:-switch.toggle:gpio5_switch # 控制GPIO5、GPIO4、GPIO12switch:# 主控开关(GPIO5)-platform:gpio ...