Published Dec 1, 2026, 2:00 AM EST Anurag is an experienced journalist and author who’s been covering tech for the past 5 years, with a focus on Windows, Android, and Apple. He’s written for sites like Android Police, Neowin, Dexerto, and MakeTechEasier. Anurag’s always pumped about tech and loves getting his hands on the latest gadgets. When he's not procrastinating, you’ll probably find him catching the newest movies in theaters or scrolling through Twitter from his bed. ESPHome makes it easy to connect sensors to Home Assistant using an ESP32, provided it supports the hardware you're using. I ran into this problem with the Winsen ZH03B, a laser dust sensor I wanted to use to monitor particulate levels in my room. Wiring it to an ESP32 was easy, but ESPHome didn't have a native component for this particular model. The sensor was sending data, but there was no ready-made way to turn it into readings Home Assistant could understand. I gave Claude Code its datasheet and my existing ESPHome configuration. The agent managed to write the missing code, and the sensor started reporting PM1.0, PM2.5, and PM10 on the first flash. It's now been running for weeks as an air quality monitoring device without me having to touch the setup. Claude Code built the missing ESPHome support The datasheet had everything it needed The ZH03B requires a 5V power supply and communicates over UART, so connecting it to an ESP32 is fairly simple. Its transmit pin connects to one of the ESP32's receive pins, and the sensor sends data at 9600 baud. However, the readings arrive as raw serial data, which ESPHome doesn't know how to interpret. The manufacturer's datasheet explains how this data is structured. The ZH03B sends 24-byte packets approximately once every second. Each packet begins with two specific bytes, 0x42 and 0x4D, followed by the actual measurements at predefined positions. The last two bytes contain a checksum that can be used to verify whether the received data is valid. Claude Code used this information to write the missing parsing logic in C++. The code identifies complete packets, verifies their checksums, extracts the relevant values, and converts them into PM1.0, PM2.5, and PM10 measurements that ESPHome can understand. Claude Code managed to do all of this within my existing ESPHome YAML configuration. It used ESPHome's built-in UART functionality to receive the data and created three template sensors to publish the measurements. Once the configuration was flashed onto the ESP32, Home Assistant recognized the measurements as regular sensor entities, just like those from any other supported ESPHome device. Claude Code also built a dedicated dashboard All three measurements in one place Getting the readings into Home Assistant solved the integration problem, but I still needed somewhere to display them. I asked Claude Code to create a dashboard for the ZH03B, and it put together a dedicated Particulate Monitor view. It has three cards across the top for PM1.0, PM2.5, and PM10, with the current concentrations displayed in µg/m³. Below them, there's a historical graph showing all three measurements in different colors. Home Assistant has all the necessary tools for building dashboards, so Claude Code didn't need to develop a separate frontend. It handled selecting the sensor entities, arranging the cards, configuring the graph, and giving the monitor its own place in the sidebar. I could have done all of this manually through Home Assistant's dashboard editor, but it would have been just more manual work for me. I also like that Claude built a dashboard that's fairly easy to read. The latest readings are visible as soon as I open it, and the historical graph takes up most of the screen. The readings are genuinely useful in Home Assistant I can monitor different particulate levels I picked the ZH03B because it measures three different particulate concentrations instead of providing a single air-quality score. PM1.0, PM2.5, and PM10 refer to airborne particles with diameters of up to 1, 2.5, and 10 micrometers, respectively. The sensor reports their concentrations in micrograms per cubic meter (µg/m³), and Home Assistant lets you monitor all three measurements separately. My main interest was monitoring the air quality in my room, particularly how the particulate levels change when I run my air purifier. With Home Assistant recording the measurements, I can look at how the values change throughout the day and compare readings from different periods. This gives me a way to investigate whether the purifier is making a difference and how quickly particulate concentrations change. There's also plenty of room to expand the setup. For example, I could create a Home Assistant automation that turns on the air purifier when PM2.5 crosses a certain threshold or sends a notification when particulate levels rise. An unsupported sensor I can actually use I've always found it difficult to build things involving hardware. I can still do a ton of things when it's just software, but getting hardware and software to work together is where I struggle. Surprisingly, Claude Code has made this much easier than I expected. I think tools like this will help more people take on the DIY projects they've always wanted to try.
I used Claude Code to build a Home Assistant integration for a device nobody supports, and it's been running for weeks
Full Article
Original Source
Read the full article at Xda-developers →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.