Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. esphome:
  2. name: socket_d
  3. platform: ESP8266
  4. board: esp8285
  5.  
  6. wifi:
  7. ssid: ...
  8. password: ...
  9. domain: ".lan"
  10.  
  11. logger:
  12.  
  13. api:
  14. password: '...'
  15.  
  16. ota:
  17. password: '...'
  18.  
  19. web_server:
  20. port: 80
  21.  
  22. switch:
  23. - platform: gpio
  24. pin: GPIO14
  25. internal: false
  26. id: relay
  27. name: "Bedroom fan"
  28. icon: "mdi:fan"
  29. on_turn_on:
  30. - switch.turn_on: blue_led
  31. - delay: 200ms
  32. - switch.turn_off: blue_led
  33. on_turn_off:
  34. - switch.turn_on: red_led
  35. - delay: 200ms
  36. - switch.turn_off: red_led
  37. - platform: gpio
  38. pin: GPIO3
  39. id: red_led
  40. inverted: true
  41. - platform: gpio
  42. pin: GPIO13
  43. id: blue_led
  44. inverted: true
  45.  
  46. binary_sensor:
  47. - platform: gpio
  48. name: button
  49. pin:
  50. number: GPIO1
  51. inverted: true
  52. on_press:
  53. - switch.toggle: relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement