当前位置:网站首页>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 .
边栏推荐
- Keil use details -- magic wand
- On boost circuit
- Shell script
- [trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
- Semiconductor devices (I) PN junction
- 实例005:三数排序 输入三个整数x,y,z,请把这三个数由小到大输出。
- Stm32--- systick timer
- WiFi wpa_ Detailed description of supplicant hostpad interface
- Use indent to format code
- [three tier architecture]
猜你喜欢
Count the number of inputs (C language)
如何写Cover Letter?
Tailq of linked list
Example 003: a complete square is an integer. It is a complete square after adding 100, and it is a complete square after adding 168. What is the number?
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
每日一题——输入一个日期,输出它是该年的第几天
Stm32--- systick timer
Nb-iot technical summary
Shell script
Talk about the circuit use of TVs tube
随机推荐
每日一题——替换空格
动力电池UL2580测试项目包括哪些
Cinq détails de conception du régulateur de tension linéaire
Bluebridge cup internet of things basic graphic tutorial - GPIO input key control LD5 on and off
Hardware 3 -- function of voltage follower
Sword finger offer 09 Implementing queues with two stacks
[paper reading] the latest transfer ability in deep learning: a survey in 2022
Example 009: pause output for one second
Shell script
[tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
Hardware 1 -- relationship between gain and magnification
Why is 1900 not a leap year
Anonymous structure in C language
2022.7.4-----leetcode.1200
Meizu Bluetooth remote control temperature and humidity access homeassistant
Ble encryption details
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
Example 004: for the day of the day, enter a day of a month of a year to judge the day of the year?
MySQL MHA high availability cluster
2020-05-21