I have an esp01s with relay that opens my garage door. It uses the NO side of the relay. Everything is working, but when the ESP is unplugged (i.e. power off), it triggers the garage door. Is "closed" the natural state of the relay? Or, is it my config? This is what I'm using in ESP Home:
name: garage-door-opener
friendly_name: Garage door opener
min_version: 2024.11.0
name_add_mac_suffix: false
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
switch:
- platform: gpio
pin: GPIO0
id: relay
name: "Garage door"
icon: "mdi:garage"
on_turn_on:
- delay: 500ms
- switch.turn_off: relay