Advertisement
jarekmor

Sonoff S20

Feb 6th, 2023 (edited)
943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.95 KB | None | 0 0
  1. esphome:
  2.   name: sonoff_s20
  3.   platform: ESP8266
  4.   board: esp01_1m
  5.  
  6. wifi:
  7.   ssid: "SSID"
  8.   password: wifi_password
  9.  
  10. logger:
  11. mqtt:
  12.   broker: 192.168.x.x
  13.   username: mqtt_user
  14.   password: mqtt_password
  15.   discovery: True
  16.  
  17. ota:
  18.   password: ota_password
  19.  
  20. binary_sensor:
  21.   - platform: gpio
  22.     pin:
  23.       number: GPIO0
  24.       mode: INPUT_PULLUP
  25.       inverted: true
  26.     name: "Sonoff S20 Button"
  27.     on_press:
  28.       - switch.toggle: relay  
  29.   - platform: status
  30.     name: "Sonoff S20 Status"
  31.  
  32. switch:
  33.   - platform: gpio
  34.     name: "Sonoff S20 Relay"
  35.     pin: GPIO12
  36.     id: relay
  37.  
  38. output:
  39.   - platform: esp8266_pwm
  40.     id: s20_green_led
  41.     pin:
  42.       number: GPIO13
  43.       inverted: true
  44.  
  45. light:
  46.  - platform: monochromatic
  47.    name: "Sonoff S20 Green LED"
  48.    output: s20_green_led
  49.  
  50.  
  51. sensor:
  52.   - platform: wifi_signal
  53.     name: "Sonoff S20 WiFi Signal"
  54.     update_interval: 60s
  55.   - platform: uptime
  56.     name: "Sonoff S20 Uptime"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement