本帖最后由 livebelive 于 2022-10-1 11:59 编辑
加入了 继电器控制 2410电源 检测到人体动作才启动2410 这样可以减少2410的发热情况 平时不工作 但这样的话 自动化 就没办法做人体存在和红外探测双触发了并且模块改成了 8266 收上没有 ESP32...
esphome:
name: pir
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "15b65847885f5da172db8f6985b9bbb1"
wifi:
ssid: '无线SSID'
password: '路由器密码'
manual_ip:
static_ip: 局域网固定IP地址
gateway: 局域网网管
subnet: 子网掩码(一般默认用255.255.255.0)
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Pir Hotspot"
password: "你自己用的密码"
captive_portal:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin: GPIO12
name: "2410_state"
device_class: presence
id: motion_1
# on_press:
# - switch.turn_on: motion_1_light
- platform: gpio
pin:
number: GPIO15
inverted: true
name: "lux_state"
device_class: light
id: motion_2
- platform: gpio
pin: GPIO13
name: "motion_state"
device_class: motion
id: motion_3
on_press:
- switch.turn_on: relay_1
switch:
- platform: gpio
pin: GPIO14
id: relay_1
name: "2410开关"
inverted: true
sensor:
# Wifi signal
- platform: wifi_signal
name: "ESP32S-WiFi Sensor"
update_interval: 60s
|