Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.75 KB | None | 0 0
  1. esphome:
  2.   name: hassio
  3.   platform: ESP8266
  4.   board: esp01_1m
  5.  
  6. wifi:
  7.   ssid: "DaRouter_Lounge"
  8.   password: "secret"
  9.  
  10. # Enable logging
  11. logger:
  12. # Enable Home Assistant API
  13. api:
  14. ota:
  15. web_server:
  16.   port: 80
  17.  
  18. binary_sensor:
  19.   - platform: gpio
  20.     pin:
  21.       number: GPIO0
  22.       mode: INPUT_PULLUP
  23.       inverted: True
  24.     name: "Hassio Button"
  25.     on_press:
  26.       - switch.toggle: relay
  27.     internal: true
  28.  
  29. switch:
  30.   - platform: gpio
  31.     pin: GPIO12
  32.     id: relay
  33.     restore_mode: ALWAYS_ON
  34.     internal: true
  35.            
  36.   - platform: template
  37.     name: "Hassio Power Cycle"    
  38.     turn_on_action:
  39.     - switch.turn_off: relay
  40.     - delay: 5000ms
  41.     - switch.turn_on: relay
  42.    
  43. time:
  44.   - platform: sntp
  45.     id: sntp_time
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement