当前位置:网站首页>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 .
边栏推荐
- [trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code
- 实例009:暂停一秒输出
- [cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl
- 剑指 Offer 05. 替换空格
- Explain task scheduling based on Cortex-M3 in detail (Part 1)
- Briefly talk about the identification protocol of mobile port -bc1.2
- STM32 outputs 1PPS with adjustable phase
- Negative pressure generation of buck-boost circuit
- QEMU demo makefile analysis
- 99 multiplication table (C language)
猜你喜欢
Talk about the function of magnetic beads in circuits
UE pixel stream, come to a "diet pill"!
Compilation warning solution sorting in Quartus II
FIO测试硬盘性能参数和实例详细总结(附源码)
STM32 --- serial port communication
Example 002: the bonus paid by the "individual income tax calculation" enterprise is based on the profit commission. When the profit (I) is less than or equal to 100000 yuan, the bonus can be increase
Example 009: pause output for one second
每日一题——替换空格
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
List of linked lists
随机推荐
实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Live555 push RTSP audio and video stream summary (III) flower screen problem caused by pushing H264 real-time stream
Charge pump boost principle - this article will give you a simple understanding
Arduino uses nrf24l01+ communication
STM32 virtualization environment of QEMU
Hardware 3 -- function of voltage follower
MySQL之MHA高可用集群
Some thoughts on extracting perspectives from ealfa and Ebeta
Weidongshan Internet of things learning lesson 1
Several implementation schemes of anti reverse connection protection of positive and negative poles of power supply!
Matlab2018b problem solving when installing embedded coder support package for stmicroelectronic
Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
Installation and use of libjpeg and ligpng
Soem EtherCAT source code analysis II (list of known configuration information)
[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...)
Meizu Bluetooth remote control temperature and humidity access homeassistant
Esphone Feixun DC1 soft change access homeassstant
How to write cover letter?