This is my project to get some temperature humidity sensors setup at home.
I was inspired by the LWN article on ESPHome and by the blog of Chris
The shell script creates a python virtual environment to work in, the rest is standard ESPHome stuff.
esphome:
name: dht-11
build_path: ./builds/dht-11
platform: ESP8266
board: thingdev
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
# Enable over the air updates
ota:
password: !secret ota_password
mqtt:
broker: !secret mqtt_broker
username: !secret mqtt_username
password: !secret mqtt_password
port: !secret mqtt_port
# Set to true when finished testing to set MQTT retain flag
discovery_retain: false
sensor:
- platform: dht
pin: 13
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"
update_interval: 60s
model: DHT11
ESP-01 (blue PCB) | ESP-01S (black PCB) |
---|---|
512kB flash | 1MB flash |
Red power LED | No power LED |
Blue LED on TX | Blue LED on GPIO2 (low = on) |