当前位置:网站首页>Esphone retrofits old fans
Esphone retrofits old fans
2022-07-05 08:28:00 【Sharing master】
I've been tossing about these two days esphome To access homeassistant, I feel that everything can be controlled ,
Material description :nodemcu One , One four-way relay ,200v to 3.3v Module one ,
1. Start with the code
esphome:
name: my_out
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "Xiaomi"
password: "1292993725"
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "1292993725"
ota:
password: "1292993725"
binary_sensor:
- platform: gpio
# The first button ( Internal references , Foreign hidden )
name: "key0"
# Whether to hide (true/false)
internal: true
pin:
# Use pin number 0
number: D1
mode: INPUT
filters:
- invert:
- delayed_on: 40ms
- delayed_off: 40ms
on_click:
- min_length: 50ms
max_length: 350ms
then:
- switch.toggle: switch_0
- platform: gpio
# The first button ( Internal references , Foreign hidden )
name: "key1"
# Whether to hide (true/false)
internal: true
pin:
# Use pin number 0
number: D2
mode: INPUT_PULLUP
#inverted: True
filters:
- invert:
- delayed_on: 40ms
- delayed_off: 40ms
on_click:
- min_length: 50ms
max_length: 350ms
then:
- switch.toggle: switch_1
- platform: gpio
# The first button ( Internal references , Foreign hidden )
name: "key2"
# Whether to hide (true/false)
internal: true
pin:
# Use pin number 0
number: D3
mode: INPUT
filters:
- invert:
- delayed_on: 40ms
- delayed_off: 40ms
on_click:
- min_length: 50ms
max_length: 350ms
then:
- switch.toggle: switch_2
- platform: gpio
# The first button ( Internal references , Foreign hidden )
name: "key3"
# Whether to hide (true/false)
internal: true
pin:
# Use pin number 0
number: D4
mode: INPUT
filters:
- invert:
- delayed_on: 40ms
- delayed_off: 40ms
on_click:
- min_length: 50ms
max_length: 350ms
then:
- switch.toggle: switch_3
switch:
- platform: gpio
id: switch_0
pin:
number: D5
inverted: yes
icon: "mdi:fan-off"
name: "close"
interlock: [switch_1,switch_2,switch_3]
- platform: gpio
id: switch_1
pin:
number: D6
inverted: yes
icon: "mdi:fan"
name: "1 block "
interlock: [switch_0,switch_2,switch_3]
- platform: gpio
id: switch_2
pin:
number: D7
inverted: yes
icon: "mdi:fan"
name: "2 block "
interlock: [switch_1,switch_0,switch_3]
- platform: gpio
id: switch_3
pin:
number: D8
inverted: yes
icon: "mdi:fan"
name: "3 block "
interlock: [switch_1,switch_2,switch_0]
- platform: template
name: "Gate Remote"
icon: "mdi:gate"
internal: yes
turn_on_action:
- switch.turn_on: switch_3
- delay: 500ms
- switch.turn_off: switch_3
# Example configuration entry
# Prevent relay #1 and relay #2 from being activated at the same time.
2. Follow the previous article to enter esphome Control interface , compile , Download to nodemcu
3. Follow the tutorial to connect
Be accomplished .
边栏推荐
- 每日一题——替换空格
- Imx6ull bare metal development learning 1-assembly lit LED
- Sword finger offer 05 Replace spaces
- [tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
- Zero length array in GNU C
- Briefly talk about the identification protocol of mobile port -bc1.2
- 2020-05-21
- Array integration initialization (C language)
- Weidongshan Internet of things learning lesson 1
- Explain task scheduling based on Cortex-M3 in detail (Part 2)
猜你喜欢

实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?

剑指 Offer 06. 从尾到头打印链表

Sword finger offer 05 Replace spaces

FIO测试硬盘性能参数和实例详细总结(附源码)
![[paper reading] the latest transfer ability in deep learning: a survey in 2022](/img/6b/b564fb7a6895329073fb5eaff64340.png)
[paper reading] the latest transfer ability in deep learning: a survey in 2022

Some thoughts on extracting perspectives from ealfa and Ebeta

Semiconductor devices (III) FET

NTC thermistor application - temperature measurement

Explain task scheduling based on Cortex-M3 in detail (Part 2)
![[cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl](/img/8a/702019b44c8e60dffbcd898330afcb.png)
[cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl
随机推荐
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
Shell script realizes the reading of serial port and the parsing of message
Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
Detailed explanation of SQL server stored procedures
Tailq of linked list
Verilog -- state machine coding method
Talk about the circuit use of TVs tube
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Use indent to format code
Installation and use of libjpeg and ligpng
Go dependency injection -- Google open source library wire
实例005:三数排序 输入三个整数x,y,z,请把这三个数由小到大输出。
剑指 Offer 09. 用两个栈实现队列
Vofa+ software usage record
STM32 single chip microcomputer - bit band operation
STM32 --- GPIO configuration & GPIO related library functions
实例009:暂停一秒输出
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
Explication de la procédure stockée pour SQL Server
Introduction of air gap, etc