Switches in ESPHome

  Рет қаралды 33,188

kian

kian

Күн бұрын

#esphome #home_assistant #switch
Learn how to use pins of ESP8266 and ESP32 development boards as switches in Home Assistant. This is done with ESPHome add on.
Simple Switch:
switch:
- platform: gpio
name: "Switch 1"
pin: xx
Define ID:
switch:
- platform: gpio
name: "Switch 1"
pin: xx
id: relay
- platform: gpio
name: "Switch 3"
pin: 5
restore_mode: RESTORE_default_ON
- platform: gpio
name: "Switch 4"
pin: 12
inverted: true
- platform: gpio
name: "Switch 6"
pin: 14
icon: "mdi:gate"
on_turn_on:
- delay: 2000ms
- switch.turn_off: relay
restore_mode (Optional): Control how the GPIO Switch attempts to restore state on bootup.
RESTORE_DEFAULT_OFF (Default) - Attempt to restore state and default to OFF if not possible to restore.
RESTORE_DEFAULT_ON - Attempt to restore state and default to ON.
RESTORE_INVERTED_OFF - Attempt to restore state inverted from the previous state and default to OFF.
RESTORE_INVERTED_ON - Attempt to restore state inverted from the previous state and default to ON.
ALWAYS_OFF - Always initialize the pin as OFF on bootup.
ALWAYS_ON - Always initialize the pin as ON on bootup.
Link of other tutorials:
Home Assistant integration with ESP32 flashed with ESPHome:
• Home Assistant integra...
Setup ESPHome with Home Assistant:
• Setup ESPHome with Hom...
Buy Me A Coffee:
www.buymeacoff...
#esp32 #esp8266 #nodemcu #development_board #esp #tasmota #wifi #tuya #inverted_switch #momentary_switch #icon #wled #automation #automations #blueprint #smart_home #home_automation #bms #iot #zwave #z_wave #zigbee #bluetooth #integration #add_on #peace #comfort #energy_saving #security #gpio #gpio_switch

Пікірлер: 23
@praannetwork
@praannetwork 2 жыл бұрын
I really needed this kind of tutorial to understand the whole thing and I am happy to let you know that this is very beginner friendly and the way you have described the whole thing has earned the subscribtion to your channel and would really love to see more of these like with the DHT sensors and also how to setup a 4/8/16 channel relay with the esphome and control the whole thing with home assistant. Kudos to your efforts and please keep up the good work.
@kian.smarthome
@kian.smarthome 2 жыл бұрын
Thanks a million for your compliment, I will upload more videos for sure. I bought a DHT sensor but I broke it, I will upload related video soon.
@erboy5546
@erboy5546 3 жыл бұрын
Thanks for this excellent video
@kian.smarthome
@kian.smarthome 3 жыл бұрын
You are welcome
@martinsteffens3400
@martinsteffens3400 2 жыл бұрын
Hello, many thanks for your easy undestanding Video! But one question, why are these GPIOs the best for using Switches? I want to create an ESP8266 Wemos D1 Mini with an 8ch relay card - does that work? Or should i take an ESP32 Board?
@kian.smarthome
@kian.smarthome 2 жыл бұрын
Hello, Thank you for your support. For switches you must use GPIOs. If I were you, I would use ESP32
@vigneshjothee9677
@vigneshjothee9677 2 жыл бұрын
Hi sir! I'm new to Home Assistant. Let's say I program my esp32 to control my physical switch with esphome and relay. Will the relay work onchange of the switch when home assistant is down / when my router is damaged. Kindly advice on this.
@kian.smarthome
@kian.smarthome 2 жыл бұрын
Hi, Yes
@anumsheraz
@anumsheraz 2 жыл бұрын
What if I want the switch to be triggered from a toggle button in home-assistant dashboard ?
@kian.smarthome
@kian.smarthome 2 жыл бұрын
create an automation in home assistant
@vpsrj
@vpsrj 2 жыл бұрын
Have you tried mcp23017 and momentary switches?
@hrishi1225
@hrishi1225 2 жыл бұрын
Can we use shift registers to increase the number of io pins and control it with SPI in ESPHome
@kian.smarthome
@kian.smarthome 2 жыл бұрын
I have to work on it to answer it
@inakiferreiramartin180
@inakiferreiramartin180 Жыл бұрын
Buenas tardes se puede utilizar un pulsador físico con robotdyn ac dimmer esphome en una placa esp 32. Gracias output: - platform: ac_dimmer id: dimmer1 gate_pin: 23 zero_cross_pin: number: 22 mode: input: true min_power: 30% light: - platform: monochromatic output: dimmer1 name: luz parez default_transition_length: 50ms
@kian.smarthome
@kian.smarthome Жыл бұрын
I gave to get one robotdyn to test to get sure about the lines and how to do it
@PiyushNikam
@PiyushNikam 2 жыл бұрын
Hi Can you please make a video on removing ESPHOME and flashing factory firmware onto a NODEMCU
@kian.smarthome
@kian.smarthome 2 жыл бұрын
Hi, Sure, but I need time
@PiyushNikam
@PiyushNikam 2 жыл бұрын
@@kian.smarthome okay sir! Thanks for replying 😃
@kian.smarthome
@kian.smarthome 2 жыл бұрын
@@PiyushNikam Sir, Have you watched this? kzbin.info/www/bejne/nX2ZimyVhNRridU Is it helpful?
@PiyushNikam
@PiyushNikam 2 жыл бұрын
@@kian.smarthome yes, I have watched it. Its helpful and awesome! But I was having a doubt that will it work on the ESPHOME or not. Its great sir!
@kian.smarthome
@kian.smarthome 2 жыл бұрын
@@PiyushNikam there mustn't be any issue.
@mohammax2
@mohammax2 2 жыл бұрын
سلام فارسی هم بزارید
@kian.smarthome
@kian.smarthome 2 жыл бұрын
سلام دوست عزیز، مخاطب فارسی زبان خیلی خیلی کم هست. شما میتونید از امکانات گوگل برای زیرنویس فارسی استفاده کنید
Assign Static IP to Home Assistant
1:47
kian
Рет қаралды 15 М.
Getting started with ESPHome
15:24
Let's Automate
Рет қаралды 48 М.
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 33 МЛН
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 16 МЛН
DIY Smart Lights - Home Assistant
15:17
Noah Smith Electrocutes Himself
Рет қаралды 6 М.
Themostat with ESP32 in Home Assitant
14:13
kian
Рет қаралды 28 М.
how to use switch button by esphome for home assistant
16:42
KinCony IoT
Рет қаралды 5 М.
DIY ESPHome Multisensor - Temp, Humidity, RGB LED, Motion and LUX
27:16
This is SO Much Better! Getting Started with ESPHome 2021
29:42
Everything Smart Home
Рет қаралды 332 М.
Monitoring Voltage with ESPHome, D1 Mini ADC, and Home Assistant
23:07
Smart IR remote control
14:28
kian
Рет қаралды 32 М.
How to use ESPHome without Home Assistant
15:41
Csongor Varga
Рет қаралды 33 М.