Hey everyone, I wanted to share my recent success in integrating custom sensors into Home Assistant using MQTT discovery. I’ve been working on monitoring my heating/cooling system, which isn’t a mainstream setup, so I had to get creative. I used a Modbus gateway to connect the system and previously relied on Node-RED for data handling. Now, I’m excited to bring this data into Home Assistant for a more seamless integration.
Initially, I faced some challenges with MQTT discovery not recognizing new sensors. After some research and trial and error, I figured out the correct configuration needed for both generic and binary sensors. I found that ensuring the JSON structure and MQTT topics were correctly formatted was key. Here’s a quick tip: always verify that your unique_id is consistent across both config and state topics to avoid discovery issues.
For anyone else working with custom sensors, I’d recommend starting with a working example and gradually modifying it to fit your needs. Also, using tools like MQTT Explorer to monitor your topics in real-time can be incredibly helpful for troubleshooting.
It’s been a rewarding process, and I’m now able to monitor multiple aspects of my system within Home Assistant. If you have any questions or need help setting up your own custom sensors, feel free to reach out! ![]()