HASSMART 墙壁触摸开关刷ESPHOME
本帖最后由 jyz_0501 于 2020-2-28 03:51 编辑ESPHOME YAML配置,使用论坛三开开关!接线:3v3 -> VCC,TXD -> RX, RXD -> TX,GND -> GND
先按住微动开关,再将usb插入电脑,保持3秒以上,即可松开微动开关。如果不出意外,此时应该进入刷机模式了!
esphome:
name: '自定义英文主机名称'
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
wifi:
ssid: '你的WIFI名称'
password: '你的WIFI密码'
fast_connect: True
id: wifi
api:
password: ''
reboot_timeout: 0s
ota:
password: ''
logger:
switch:
- platform: gpio
name: 'hassmartch3_1_switch_1'
pin: GPIO12
id: relay_1
- platform: gpio
name: 'hassmartch3_1_switch_2'
pin: GPIO5
id: relay_2
- platform: gpio
name: 'hassmartch3_1_switch_3'
pin: GPIO4
id: relay_3
binary_sensor:
- platform: gpio
id: button_1
pin:
number: GPIO0
inverted: True
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle:
id: relay_1
- platform: gpio
id: button_2
pin:
number: GPIO14
inverted: True
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle:
id: relay_2
- platform: gpio
id: button_3
pin:
number: GPIO2
inverted: True
mode: INPUT_PULLUP
on_press:
then:
- switch.toggle:
id: relay_3
status_led:
pin: GPIO13
感谢分享! 刷了以后ha能发现,但是控制不了灯 缥缈的孤鸿 发表于 2019-11-7 22:48
刷了以后ha能发现,但是控制不了灯
不会啊。我一直在用着呢 dbh147717340 发表于 2019-11-8 12:57
不会啊。我一直在用着呢
我的刷了以后,触摸控制不了灯,HA里能找到,但是也不能控制灯 缥缈的孤鸿 发表于 2019-11-8 18:18
我的刷了以后,触摸控制不了灯,HA里能找到,但是也不能控制灯
你的是多少路的?是不是不同路PIN脚不同? dbh147717340 发表于 2019-11-12 23:59
你的是多少路的?是不是不同路PIN脚不同?
我是第一批众筹的触摸开关 缥缈的孤鸿 发表于 2019-11-13 09:44
我是第一批众筹的触摸开关
发你的配置来看看? dbh147717340 发表于 2019-11-15 21:42
发你的配置来看看?
esphome:
name: studylight
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
wifi:
ssid: 'xxxxx'
password: 'xxxxx'
api:
ota:
logger:
switch:
- platform: gpio
name: 'hassmart_1ch_2'
pin: GPIO12
id: relay1
binary_sensor:
- platform: gpio
id: button1
pin:
number: GPIO0
inverted: True
mode: INPUT_PULLUP
on_press:
- switch.toggle: relay1
status_led:
pin: GPIO13
用ESPhome 集成到 HA创建自动化和场景时方便多了~
页:
[1]
2