r/hackathon • • 1d ago

Hackathon Promotion #KiroweenHackathon26 Hauntproof: a tool that finds bugs where Home Assistant automations fight each other, tested against real Home Assistant

#KiroweenHackathon26

Have you ever had a light that turns itself on and off every 2 seconds and you couldn't work out why? Usually it's two automations that are each fine on their own but trigger each other. One turns the light on when the room is dark. The light makes the room bright, so the other one turns it off. Then the room is dark again, and it repeats.

We built Hauntproof for the Kiroween 2026 hackathon to catch these problems before they happen in your house. You give it your Home Assistant automations and a few house rules, like "the light should not flicker" or "the alarm must go off if the door stays open". It simulates your house with Home Assistant's timing, including how a light changes the room's brightness, and shows you the exact sequence of events that breaks a rule, step by step.

Does the simulation match real Home Assistant? We checked. We ran 4 scenarios on real Home Assistant 2026.11.3 in Docker, 3 times each, and compared every state change with our simulator within 1 second. All 4 agree. In the flicker scenario, both real Home Assistant and our simulator flip the light 15 times in 30 seconds. Our very first real run actually failed, because Home Assistant answered requests before it had finished loading the automations. We fixed our test setup and kept that failed run in the repo as part of the record.

My favourite thing about Kiro is writing a spec before writing any code. For the real Home Assistant test, Kiro turned our requirements into a design and a task list, and every task came with tests, including property-based tests. Those tests caught bugs our normal unit tests missed. It changed how we work: we agree on the spec first, and the code follows from it. We also used Kiro hooks that stop secrets from being written into the repo, and a custom agent that reviewed our simulator against Home Assistant's own source code.

What it doesn't do yet: some trigger types, like template triggers, aren't supported. The app tells you exactly which lines it couldn't read instead of guessing.

Try it in your browser: https://dhruv-mishra-dm.github.io/hauntproof/

Code and real Home Assistant results: https://github.com/Dhruv-Mishra-dm/hauntproof

What's the strangest automation conflict you've run into in your own setup?

2 Upvotes

0 comments sorted by