Skip to content

Instantly share code, notes, and snippets.

@vforge
Created July 1, 2019 03:31
Show Gist options
  • Save vforge/2906e9a58f2e22a9ba0c002d427619f0 to your computer and use it in GitHub Desktop.
Save vforge/2906e9a58f2e22a9ba0c002d427619f0 to your computer and use it in GitHub Desktop.
esphome:
name: etekcity2
platform: ESP8266
board: esp01_1m
wifi:
ssid: xxxxx
password: yyyyyyy
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO14
mode: INPUT_PULLUP
inverted: False
name: "Etekcity 2 Basic Button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "Etekcity 2 Basic Relay"
pin: GPIO04
id: relay
status_led:
pin:
number: GPIO05
inverted: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment