esphome:
name: sonoffth10_1
board_flash_mode: dout
on_boot:
priority: -10
then:
- light.turn_on: blue_led
ESP8266:
board: esp01_1m
ota:
- platform: esphome
wifi:
ap:
logger:
api:
captive_portal:
webserver:
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff TH10_1 Button"
on_press:
- light.toggle: th10_1_relay
- platform: status
name: "Sonoff TH10_1 Status"
sensor:
- platform: wifi_signal
name: "Sonoff TH10_1 WiFi Signal"
update_interval: 60s
switch:
- platform: restart
name: "Sonoffth10_1 Restart"
output:
- platform: esp8266_pwm
id: TH10_1_blue_led
pin:
number: GPIO13
inverted: True
- platform: gpio
id: relay
pin: GPIO12
light:
- platform: monochromatic
name: "Sonoff TH10_1 blue LED"
id: blue_led
output: TH10_1_blue_led
- platform: binary
name: "Sonoff TH10_1 Relay"
id: th10_1_relay
output: relay