本帖最后由 peter5858 于 2020-3-29 11:07 编辑
這个是我实验过的,我想把复位改成触摸的更好,86面板买那种触摸式的直接上。
binary_sensor:
- platform: gpio
pin:
number: GPIO13 #触摸板#1(倒置)GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff T1 UK 3 Gang Touchpad 1"
on_press:
- switch.toggle: relay_1
- platform: gpio
pin:
number: GPIO14 #触摸板#2(倒置)GPIO9
mode: INPUT_PULLUP
inverted: True
name: "Sonoff T1 UK 3 Gang Touchpad 2"
on_press:
- switch.toggle: relay_2
- platform: gpio
pin:
number: GPIO12 #触摸板#3(倒置)GPIO10
mode: INPUT_PULLUP
inverted: True
name: "Sonoff T1 UK 3 Gang Touchpad 3"
on_press:
- switch.toggle: relay_3
- platform: status
name: "Sonoff T1 UK 3 Gang Status"
|