Added esphome files

This commit is contained in:
2021-10-15 21:29:38 -04:00
parent 55b69f0b99
commit bd7e0768d6
5 changed files with 408 additions and 0 deletions

63
esphome/smartplug2.yaml Normal file
View File

@@ -0,0 +1,63 @@
esphome:
name: smart_plug_2
platform: ESP8266
board: esp01_1m
wifi:
networks:
- ssid: !secret "wifi_ssid"
password: !secret "wifi_pass"
- ssid: "Jen B"
password: "shae1234"
ap:
ssid: "smart_plug_2_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_2"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "smart_plug_2_relay"
pin: GPIO12
id: relay
restore_mode: ALWAYS_ON
status_led:
pin:
number: GPIO5
inverted: yes
sensor:
- platform: wifi_signal
name: "smart_plug_2 WiFi signal"
update_interval: 60s
- platform: uptime
name: "Smart_plug_2_uptime"