Skip to content

Instantly share code, notes, and snippets.

@samuelmcconnell
Created November 1, 2021 13:51
Show Gist options
  • Save samuelmcconnell/38c6bd26cd1116abebe8127581b227dd to your computer and use it in GitHub Desktop.
Save samuelmcconnell/38c6bd26cd1116abebe8127581b227dd to your computer and use it in GitHub Desktop.
Sonoff TH16
esphome:
name: gecko-heater
esp8266:
board: esp01_1m
framework:
version: latest
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "redacted"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "gecko-Heater Fallback Hotspot"
password: "redacted"
captive_portal:
switch:
- platform: gpio
pin: GPIO12
name: "Gecko Tank Heater"
id: gecko_heater
binary_sensor:
- platform: gpio
pin:
number: GPIO0
inverted: True
id: gecko_heater_toggle
on_press:
then:
- switch.toggle: gecko_heater
sensor:
- platform: dht
model: SI7021
pin: GPIO14
humidity:
name: "Gecko Tank Humidity"
temperature:
name: "Gecko Tank Temperature"
update_interval: 10s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment