Mini ESPHome Project: Your Own Control Module for Home Assistant

Mini ESPHome Project: Your Own Control Module for Home Assistant

Module 10 · Lesson 8

This lesson genuinely combines everything from Lessons 4 through 7 into a single, cohesive device, the ESP32 Office Monitor, a genuine mini project rather than another isolated exercise, and its own dashboard alongside your Zigbee devices.

What must already be working before this lesson

Confirm your BME280 sensor, button, and LED from Lessons 6 and 7 all still work correctly and reliably before combining them into one project. If any of the three is misbehaving at all, resolve it now, troubleshooting a combined project with an already-broken component is considerably harder than fixing it while isolated.

What ESP32 Office Monitor does

One device, one YAML file, reporting temperature, humidity, and pressure, reading a button's state, and controlling an LED, all from a single ESP32 board. This is genuinely your first complete, multi-function device built entirely from scratch.

Starter Zigbee kit alongside ESP: an entity map

Sketch a quick map in your notebook of every entity now active in your office, your Module 9 Zigbee devices and this new ESP32's five entities together. Seeing the full picture in one place makes the next section's dashboard considerably easier to plan.

One YAML: the project skeleton

Combine the six foundation sections from Lesson 4, the i2c and sensor sections from Lesson 6, and the binary_sensor and switch sections from Lesson 7, all into one file. Nothing here is new syntax, only combining pieces you've already written and tested individually.

YAML structure: what each section does

Foundation sections handle identity and connectivity, the i2c and sensor sections handle your BME280, and the binary_sensor and switch sections handle your button and LED, all coexisting peacefully in one YAML file without conflicting.

Compiling, uploading, first test

Compile and upload over OTA, this device already has working firmware from earlier lessons. Confirm all five entities appear, temperature, humidity, pressure, button, and LED switch, each behaving exactly as it did when tested individually.

Dashboard: Zigbee + ESPHome together

Build one dashboard card showing your Zigbee entities and your five new ESPHome entities together, a genuine, satisfying demonstration of two entirely different technologies working side by side under one unified interface.

Building the Office Monitor dashboard: step by step in HA

Create a new dashboard view titled "Office Monitor", add an entities card, and add all five ESPHome entities plus your existing Zigbee office entities to it, grouped clearly by function, sensors first, then controls.

Test after a Home Assistant restart

Restart Home Assistant itself and confirm every entity from this device reconnects automatically without any manual intervention, exactly the reliability test Module 8 taught you to run after any significant change.

Project documentation: what to record in your notebook

Record the device name, IP address, all five entity names, and the pins used for each component, a complete reference for this specific device that you'll appreciate having months from now.

Comparing readings: what two temperatures tell you

If you have both a Zigbee and an ESPHome temperature reading in the same room, comparing them over a few days gives a genuine sense of each sensor's accuracy and consistency, useful data for deciding which to trust for future automations.

When to consider the project closed

Consider this project closed once all five entities report reliably, survive a Home Assistant restart, appear on your dashboard, and are documented in your notebook. Nothing more is required before Lesson 9's diagnostics lesson.

Exercise: ESP32 Office Monitor + dashboard

Combine your sensor, button, and LED YAML into one file, flash it, build the Office Monitor dashboard, and confirm everything survives a restart.

Key takeaways

This mini project combines every YAML pattern from Lessons 4 through 7.

One dashboard now shows Zigbee and ESPHome entities together.

A restart test confirms genuine reliability, not just a one-time success.

Full documentation makes this device easy to maintain later.

With a complete working project behind you, Lesson 9 covers diagnosing problems calmly when something eventually does go wrong.

Bridge to Lesson 9: when something's not right

If any entity here misbehaves after combining everything, resist the urge to rewrite the whole file from scratch, Lesson 9 teaches a calm, systematic diagnostic process that isolates the actual cause considerably faster than starting over ever could.

A real story: the project that "just worked"

A reader in this course's community expected combining three previously separate YAML sections to cause at least one new problem, based on experience with other software projects where integration often reveals hidden bugs. Instead, the combined file compiled and worked correctly on the first attempt, since each individual piece had already been tested and proven working in isolation during Lessons 6 and 7. Their takeaway was that the incremental, test-as-you-go approach this course has used throughout genuinely pays for itself at moments exactly like this one.

Why this is a genuine milestone in the course

This is the first project in the entire course combining a sensor, an input, and an output into a single self-built device with its own dedicated dashboard, a genuinely complete demonstration of everything ESPHome makes possible, built from inexpensive components and your own understanding rather than a finished, purchased product.

What to do with this project going forward

Keep this device running as permanent infrastructure rather than dismantling it after this lesson, later modules in this course build automations that use exactly this kind of sensor and control combination, a working example already in place saves rebuilding it later.

Naming this combined device clearly

"esp32-office-monitor" is a considerably better long-term name than the earlier "esp32-office-test" you may have used in Lesson 4, since this device now genuinely serves a permanent purpose rather than being a disposable throwaway test. Renaming it at this stage, while it requires a fresh reflash, is well worth doing before this device becomes a permanent fixture in your smart home.

Merging YAML sections without introducing errors

When copying sections from three separate working files into one, paste each section fully, then use Validate before compiling, catching any indentation mismatch introduced during the copy-paste process itself rather than discovering it only after a lengthy compile attempt. This small habit, established back in Lesson 5, continues paying dividends here at genuinely the busiest YAML file this module has produced so far.

Reviewing the complete file line by line

Before compiling this combined file for the first time, read through it top to bottom once, confirming every section you expect is genuinely present and that no duplicate section, an accidental second wifi block, for instance, snuck in during the copy-paste process. A calm five-minute read now prevents a considerably more confusing troubleshooting session after a failed compile.

Why entities cards work well for this dashboard

An entities card, a simple list-style dashboard element, suits this project well because it displays several unrelated entity types, sensors, a binary sensor, and a switch, together in one clean, compact list without requiring separate specialized cards for each entity type. Later modules introduce more visually elaborate dashboard options, but a simple entities card is genuinely all this project needs today.

What a restart test actually proves

A restart test genuinely proves that your device's WiFi credentials, API connection, and entity definitions are all correctly and durably saved, not merely working by coincidence from a single successful boot. Many subtle configuration mistakes only reveal themselves after a restart, making this test a meaningfully more rigorous check than simply seeing entities appear once immediately after flashing.

Considering a second combined device later

Once this pattern feels comfortable, building a second combined device for another room, a bedroom monitor, say, follows the exact same steps with different pin numbers and a different device name, genuinely quick work once you've internalized this lesson's underlying process rather than treating it as a one-off exercise.

A note on power supply stability for a permanent device

Since this device now runs permanently rather than just during a testing session, plug it into a stable USB power source, a wall adapter rather than a laptop that regularly gets unplugged and moved, genuinely reduces the odds of unnecessary disconnections and keeps its uptime statistics meaningfully cleaner over the coming weeks and months.

Comparing this project's scope to a commercial multi-sensor

A commercial multi-sensor product bundling temperature, a button, and an indicator light in one enclosure would typically cost considerably more than this project's combined component cost, while offering meaningfully less flexibility than a device you fully understand and can freely extend yourself. This tradeoff, more effort upfront in exchange for lower cost and complete customization, is genuinely the core value proposition this entire module has been building toward since Lesson 1.

A closer look at organizing entities within the dashboard card

Within your entities card, list the three sensor readings first, temperature, humidity, and pressure, followed by the button's state, and finally the LED switch at the bottom, mirroring the natural order you'd actually check them in during a quick glance at your dashboard. This small ordering decision, while entirely cosmetic, makes a real difference in how quickly you can scan the card each time you open it.

Adding a card header and icon for clarity

Give your entities card a clear title, "Office Monitor", and consider assigning a distinct icon to the card itself, a small visual anchor that helps this card stand out at a glance once your dashboard eventually grows to include several similar cards for other rooms in later modules.

What to do if only some entities survive the restart

If some entities reconnect after a restart while others don't, check the device's log first, it typically shows a clear error for the specific component that failed to initialize, rather than treating the whole device as equally broken. This targeted approach, isolating the specific failing section rather than assuming the entire configuration is at fault, mirrors the calm diagnostic mindset Lesson 9 formalizes in much greater depth.

Timing this project around your other commitments

This lesson genuinely takes longer than most of this module's earlier lessons, since it involves combining, reviewing, and thoroughly testing three previously separate pieces of work rather than introducing something entirely new. Setting aside a full, uninterrupted session for this lesson, rather than squeezing it into a few spare minutes, tends to produce noticeably calmer, less error-prone results.

Reflecting on how far this module has come

Take a genuine moment here to appreciate the distance traveled since Lesson 1's purely conceptual introduction, from an empty ESPHome dashboard through a bare device, a working sensor, a button and LED, and now a single, complete, self-documented project running as permanent infrastructure in your smart home. That progression, one deliberate step at a time, is exactly the pace this entire course has followed since its very first lesson back in Module 1.

A note on future firmware updates to this device

Any future changes to this device, adding a sixth entity, adjusting an update interval, tweaking a friendly name, can now be made entirely through OTA, no USB cable required again unless something goes seriously wrong with the WiFi connection itself. This is a genuinely convenient position to be in, one that took real, deliberate work across seven earlier lessons to establish properly.

Sharing this project's YAML with the community

If you'd like feedback on your combined configuration, sharing it in this course's community space is entirely welcome, just remember to remove or replace your actual WiFi credentials first, the !secret references from Lesson 5 make this genuinely easy since your real password never appears directly in the shared file at all.

A brief comparison to Module 9's closing lesson

Module 9 closed with a stable, well-documented Zigbee mini smart home, three organized devices with clear naming and a calm troubleshooting process already in place. This lesson closes a genuinely comparable milestone for ESPHome, a complete, well-documented device that combines sensing and control, proving the same organizational discipline extends naturally across two entirely different smart home technologies.

A quick sanity check before moving on

Before closing this lesson, open your dashboard one final time and confirm every single value looks genuinely plausible, no NaN readings, no unavailable entities, and a button and LED that respond instantly and reliably to interaction. This final check, though it takes only a minute, is a habit worth carrying into every future project you build.

Celebrating a genuinely completed project

It's genuinely worth pausing here to appreciate what you've built, a fully custom smart home device, entirely your own design, running reliably alongside certified commercial products in the very same Home Assistant instance. Many readers who reach this exact point in the course describe it as the moment ESPHome finally clicked into place as something they could keep building with confidently, rather than merely following along one lesson at a time.

What this project teaches beyond ESPHome itself

Beyond ESPHome specifically, this lesson has quietly taught a genuinely transferable skill, combining several previously separate, individually tested components into one cohesive whole without introducing new bugs along the way. That skill, integration testing in miniature, applies well beyond smart home projects specifically, useful in essentially any hands-on technical project you might reasonably take on well into the future.

One last look at the notebook before Lesson 9

Flip back through your ESPHome notebook section one final time before starting Lesson 9, confirming every device, sensor, and pin number from this module so far is genuinely recorded accurately, this reference becomes considerably more valuable once Lesson 9's diagnostic work actually depends on it being genuinely complete and entirely correct.

Finished this lesson?