当前位置:网站首页>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 .
边栏推荐
- Simple design description of MIC circuit of ECM mobile phone
- [paper reading] the latest transfer ability in deep learning: a survey in 2022
- Explication de la procédure stockée pour SQL Server
- Working principle and type selection of common mode inductor
- MHA High available Cluster for MySQL
- Detailed summary of FIO test hard disk performance parameters and examples (with source 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?
- Relationship between line voltage and phase voltage, line current and phase current
- MySQL MHA high availability cluster
- Various types of questions judged by prime numbers within 100 (C language)
猜你喜欢
Introduction of air gap, etc
Take you to understand the working principle of lithium battery protection board
How to copy formatted notepad++ text?
My-basic application 2: my-basic installation and operation
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
99 multiplication table (C language)
MySQL之MHA高可用集群
Example 008: 99 multiplication table
[three tier architecture and JDBC summary]
实例010:给人看的时间
随机推荐
Take you to understand the working principle of lithium battery protection board
Problem solving: interpreter error: no file or directory
【论文阅读】2022年最新迁移学习综述笔注(Transferability in Deep Learning: A Survey)
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
Explain task scheduling based on Cortex-M3 in detail (Part 2)
Classic application of MOS transistor circuit design (1) -iic bidirectional level shift
OC and OD gate circuit
Several implementation schemes of anti reverse connection protection of positive and negative poles of power supply!
Working principle and type selection of common mode inductor
每日一题——替换空格
Cinq détails de conception du régulateur de tension linéaire
List of linked lists
[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...)
实例008:九九乘法表
Stm32--- systick timer
Simple design description of MIC circuit of ECM mobile phone
The firmware of the connected j-link does not support the following memory access
Google sitemap files for rails Projects - Google sitemap files for rails projects
Classic application of MOS transistor circuit design (2) - switch circuit design
Explication de la procédure stockée pour SQL Server