54 lines
886 B
YAML
54 lines
886 B
YAML
esphome:
|
|
name: garage
|
|
platform: ESP8266
|
|
board: esp01_1m
|
|
|
|
wifi:
|
|
networks:
|
|
- ssid: !secret "wifi_ssid"
|
|
password: !secret "wifi_pass"
|
|
ap:
|
|
ssid: "smart_plug_1_fallback"
|
|
password: "Fallback@!"
|
|
|
|
captive_portal:
|
|
|
|
web_server:
|
|
port: 80
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
|
|
ota:
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO14
|
|
mode: INPUT_PULLUP
|
|
inverted: True
|
|
name: "Garage Door Sensor"
|
|
device_class: garage_door
|
|
|
|
switch:
|
|
- platform: gpio
|
|
pin: GPIO12
|
|
id: relay
|
|
- platform: template
|
|
icon: "mdi:arrow-up-down-bold-outline"
|
|
name: "Garage Door"
|
|
turn_on_action:
|
|
- switch.turn_on: relay
|
|
- delay: 15000ms
|
|
- switch.turn_off: relay
|
|
|
|
# - delay: 500ms
|
|
# - switch.turn_off: relay
|
|
|
|
sensor:
|
|
- platform: wifi_signal
|
|
name: garage_door_signal
|
|
update_interval: 15s |