Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: soonoff02
- platform: ESP8266
- board: esp01_1m
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- ota:
- password: "6e6215be434b2d03621aef59f6fd2ebb"
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Soonoff02 Fallback Hotspot"
- password: "kVhKFGkUKhag"
- captive_portal:
- binary_sensor:
- - platform: gpio
- pin:
- number: GPIO0
- mode: INPUT_PULLUP
- inverted: True
- name: "Sonoff02 Basic Button"
- on_press:
- - switch.toggle: fakebutton
- switch:
- - platform: template
- name: "Sonoff02 Basic Relay"
- optimistic: true
- id: fakebutton
- turn_on_action:
- - switch.turn_on: relay
- - light.turn_off: led
- turn_off_action:
- - switch.turn_off: relay
- - light.turn_on: led
- - platform: gpio
- id: relay
- pin: GPIO12
- output:
- - platform: esp8266_pwm
- id: basic_blue_led
- pin:
- number: GPIO13
- inverted: True
- light:
- - platform: monochromatic
- name: "Sonoff02 Basic Blue LED"
- output: basic_blue_led
- id: led
- sensor:
- - platform: wifi_signal
- name: "Sonoff02 Basic WiFi Signal"
- update_interval: 60s
- - platform: uptime
- name: "Sonoff02 Basic Uptime"
- text_sensor:
- - platform: version
- name: "Sonoff02 Basic ESPHome Version"
Advertisement
Add Comment
Please, Sign In to add comment