Advertisement
calas

ESPhome Sonoff basic

Aug 22nd, 2020
1,455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.12 KB | None | 0 0
  1. esphome:
  2.   name: XXXXXXX
  3.   platform: ESP8266
  4.   board: esp01_1m
  5.  
  6. wifi:
  7.   ssid: "LAN SOLO"
  8.   password: "XXXXXX"
  9.  
  10.   ap:
  11.     ssid: "XXXXXX Hotspot"
  12.     password: "XXXXXXX"
  13.  
  14. captive_portal:
  15. logger:
  16. api:
  17.   reboot_timeout: 0s
  18.   password: "XXXXXXX"
  19.  
  20. ota:
  21.   password: "XXXXXXXX"
  22.  
  23. web_server:
  24.   port: 80
  25.  
  26. #########################################################
  27.  
  28. binary_sensor:
  29.   - platform: gpio
  30.     pin:
  31.       number: GPIO14
  32.       mode: INPUT_PULLUP
  33.       inverted: True
  34.     id: button_1
  35.     on_press:
  36.       then:
  37.         - light.toggle: light_1
  38.     on_release:
  39.         - light.toggle: light_1
  40.        
  41.   - platform: status
  42.     name: "Stato sonoff Abat-Jour"
  43.    
  44. sensor:
  45.   - platform: wifi_signal
  46.     name: "WiFi Signal Abat-Jour"
  47.     update_interval: 60s
  48.    
  49. output:
  50.   - platform: gpio
  51.     pin: GPIO12
  52.     id: relay_1
  53.    
  54. light:
  55.   - platform: binary
  56.     name: "Abat Jour"
  57.     id: light_1
  58.     output: relay_1
  59.  
  60. status_led:
  61.   pin:
  62.     number: GPIO13
  63.     inverted: yes
  64.  
  65. text_sensor:
  66.   - platform: wifi_info
  67.     ip_address:
  68.       name: IP Sonoff Abat-Jour
  69.       icon: "mdi:lan"
  70.      
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement