Created
March 19, 2019 17:48
-
-
Save dattas/1549af84e273cdf673d750fb46607694 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: $devicename | |
platform: ESP8266 | |
board: esp01_1m | |
wifi: !include wifi.yaml | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
password: $api_password | |
ota: | |
password: $api_password | |
binary_sensor: | |
- platform: gpio | |
id: btn_relay | |
pin: | |
number: GPIO0 | |
mode: INPUT_PULLUP | |
inverted: True | |
filters: | |
- delayed_on: 100ms | |
- delayed_off: 100ms | |
on_press: | |
- switch.toggle: relay | |
switch: | |
- platform: gpio | |
name: $devicename_nice | |
pin: GPIO12 | |
id: relay | |
on_turn_on: | |
then: | |
- light.turn_on: led | |
on_turn_off: | |
then: | |
- light.turn_off: led | |
light: | |
- platform: monochromatic | |
output: basic_led | |
id: led | |
output: | |
- platform: esp8266_pwm | |
id: basic_led | |
pin: | |
number: GPIO13 | |
inverted: True | |
status_led: | |
pin: | |
number: GPIO13 | |
inverted: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment