Files
homeassistant/esphome/smartplug1.yaml
2021-10-15 21:29:38 -04:00

62 lines
903 B
YAML

esphome:
name: smart_plug_1
platform: ESP8266
board: esp01_1m
wifi:
networks:
- ssid: !secret "wifi_ssid"
password: !secret "wifi_pass"
- ssid: "Jen B"
password: "shae1234"
ap:
ssid: "smart_plug_1_fallback"
password: "Fallback@!"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
# mqtt:
# broker: 192.168.0.30
# port: 1884
ota:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: True
name: "smart_plug_1"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "smart_plug_1_relay"
pin: GPIO12
id: relay
status_led:
pin:
number: GPIO5
inverted: yes
sensor:
- platform: wifi_signal
name: "smart_plug_1 WiFi signal"
update_interval: 60s
- platform: uptime
name: "Smart_plug_1_uptime"