当前位置:网站首页>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 .
边栏推荐
- STM32 tutorial triple ADC interleaved sampling
- [tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)
- [cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl
- Soem EtherCAT source code analysis II (list of known configuration information)
- Summary of SIM card circuit knowledge
- 实例003:完全平方数 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少?
- Verilog -- state machine coding method
- MySQL之MHA高可用集群
- Soem EtherCAT source code analysis I (data type definition)
- Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
猜你喜欢

STM32 --- NVIC interrupt

Charge pump boost principle - this article will give you a simple understanding

Hardware and software solution of FPGA key chattering elimination

Example 009: pause output for one second

Why is 1900 not a leap year
![[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication](/img/08/7f28008a4aa999650998ba8dee5d8e.jpg)
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication

Compilation warning solution sorting in Quartus II

Example 010: time to show
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?

Bluebridge cup internet of things basic graphic tutorial - GPIO input key control LD5 on and off
随机推荐
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)
Array integration initialization (C language)
实例004:这天第几天 输入某年某月某日,判断这一天是这一年的第几天?
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
[trio basic from introduction to mastery tutorial 20] trio calculates the arc center and radius through three points of spatial arc
STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
Circleq of linked list
STM32 --- configuration of external interrupt
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
Sword finger offer 09 Implementing queues with two stacks
Example 010: time to show
Step motor generates S-curve upper computer
DCDC circuit - function of bootstrap capacitor
Use indent to format code
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Working principle and type selection of common mode inductor
Naming rules for FreeRTOS
【NOI模拟赛】汁树(树形DP)
实例010:给人看的时间