Skip to content

1. Walk through the code

The firmware is one ESPHome file: firmware/climate.yaml. You describe the hardware and behaviour in YAML; ESPHome turns that into firmware.

You don't need to memorise the file. The point is to know which block to open when you want to change something.

How the pieces connect

flowchart LR
  S["sensor<br/>SHT40"] -->|readings| A[api] -->|entities| HA[Home Assistant]
  S -->|readings| D[display]
  W[wifi] -->|page when unprovisioned| D
  W -.- N[(NVS)]

The display defaults to readings. The QR setup page appears only when no home Wi‑Fi is saved yet (first boot or after factory reset). A short drop keeps the readings page and turns the Wi‑Fi icon off. The dotted line is where the chip stores your home Wi‑Fi details (NVS), never this file.

The blocks

Where to change things

If you want to change… Open
Setup hotspot name or password ESP32 → substitutions
How often the sensor reads Sensors → update_interval
Screen colours, layout or text Display → pages
Which pins are used Sensors / Display (same pins as Wire)
Reset hold time Factory reset → binary_sensor

Next: ESP32