Added esphome files
This commit is contained in:
63
esphome/smartplug2.yaml
Normal file
63
esphome/smartplug2.yaml
Normal 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"
|
||||
Reference in New Issue
Block a user