Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: sonoff_s20
- platform: ESP8266
- board: esp01_1m
- wifi:
- ssid: "SSID"
- password: wifi_password
- logger:
- mqtt:
- broker: 192.168.x.x
- username: mqtt_user
- password: mqtt_password
- discovery: True
- ota:
- password: ota_password
- binary_sensor:
- - platform: gpio
- pin:
- number: GPIO0
- mode: INPUT_PULLUP
- inverted: true
- name: "Sonoff S20 Button"
- on_press:
- - switch.toggle: relay
- - platform: status
- name: "Sonoff S20 Status"
- switch:
- - platform: gpio
- name: "Sonoff S20 Relay"
- pin: GPIO12
- id: relay
- output:
- - platform: esp8266_pwm
- id: s20_green_led
- pin:
- number: GPIO13
- inverted: true
- light:
- - platform: monochromatic
- name: "Sonoff S20 Green LED"
- output: s20_green_led
- sensor:
- - platform: wifi_signal
- name: "Sonoff S20 WiFi Signal"
- update_interval: 60s
- - platform: uptime
- name: "Sonoff S20 Uptime"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement