devices.esphome.io

Sonoff TH10

Sonoff TH10

Device Type: plug
Electrical Standard: au
Board: esp8266

GPIO Pinout

PinFunction
GPIO0Push Button (HIGH = off, LOW = on)
GPIO12Relay and Red LED
GPIO13Blue Status LED

Basic Configuration

# Basic Config
esphome:
name: sonoffth10_1
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
on_boot:
priority: -10
then:
- light.turn_on: blue_led
wifi:
ssid: "ssid"
password: "wifi_password"
ap:
ssid: "ap_ssid"
password: "ap_password"
domain: ".domain.com"
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key
ota:
password: "ota_password"
web_server:
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
Edit this page on GitHub