Turn any heating setup into a smart, self-learning thermostat with auto-TPI.
GitHub RepoImpressions986
View on GitHub
@githubprojectsPost Author

Turn Any Heating Setup Into a Smart Thermostat That Actually Learns

You've probably tried to automate your home heating at some point. Maybe you wired up a few smart thermostats, wrote some Home Assistant automations to handle when you leave the house, and set up separate rules for each room. Then you realized you're now maintaining a small forest of scripts, each one fragile and specific to one piece of hardware. What you really want is one system that understands your house and adjusts itself without you having to micromanage it. That's exactly what Versatile Thermostat sets out to be—a virtual thermostat that sits on top of whatever heating hardware you already have, learns from how your home behaves, and handles the edge cases so you don't have to.

What It Does

Versatile Thermostat is a custom component for Home Assistant. It's a complete rewrite of the "Awesome thermostat" component, but with a lot more packed in. At its core, it's a virtual thermostat—meaning it doesn't control a physical thermostat directly. Instead, it takes any heating equipment you already have (radiators, heat pumps, air conditioners, whatever) and turns it into an intelligent system by managing the control logic centrally.

The architecture is straightforward: you create a Versatile Thermostat entity in Home Assistant, point it at your existing climate devices, and it handles the decision-making. It uses advanced algorithms like TPI (Time Proportional Interval) and auto-TPI, which means it doesn't just turn things on and off based on a simple temperature threshold. It learns how your home responds to heating and adjusts its behavior accordingly. The component natively handles common heating events: nobody home, activity detected in a room, an open window, or power load shedding. You don't need to write separate automations for each of those scenarios.

Why It's Cool

The real value here isn't just that it's a thermostat—it's the collection of thoughtful features that handle the messy reality of home heating. A few stand out:

  • Stuck valve detection. If you've ever had a TRV (thermostatic radiator valve) get physically stuck open or closed, you know how frustrating it is to diagnose. Versatile Thermostat now compares the commanded state with the real state of the valve and reports the root cause in an anomaly event. You can set up notifications or automated recovery actions based on that information. It's a small thing, but it saves you from chasing ghosts in your heating system.

  • Auto-relock after unlock. The lock feature lets you prevent accidental changes to your thermostat settings. But sometimes you need to temporarily adjust things—and then you forget to re-lock it. The new auto_relock_sec parameter handles that: set it to 30 seconds, and the thermostat automatically re-locks itself after you make your changes. It's a simple usability improvement that shows the developer understands how people actually use these systems.

  • Command resend for reliability. If your heating equipment is unreliable or your network is flaky, commands sometimes don't reach their destination. This feature detects when the actual state of a device doesn't match what the thermostat commanded, and automatically resends the command. It's not glamorous, but it makes a real difference in day-to-day stability.

  • Plugin mechanism (v10.0). The latest release introduces plugins, which means you can extend Versatile Thermostat with external integrations. The list of available plugins lives on the project's website, so you can add functionality without waiting for the core component to update. This is a smart architectural choice—it keeps the core lean while letting the community build what they need.

  • Timed preset restoration after restart. If you've ever set a temporary heating schedule (like "boost for 30 minutes") and then had Home Assistant restart, you know it usually forgets that preset. Versatile Thermostat now restores timed presets correctly after a restart, which is one of those quality-of-life fixes that makes you appreciate the attention to detail.

How to Try It

Versatile Thermostat is available through HACS (Home Assistant Community Store), which is the easiest way to install it. If you haven't set up HACS yet, you'll want to do that first.

  1. Add the repository to HACS: go to HACS > Integrations > the three dots in the top right > Custom repositories, and paste https://github.com/jmcollin78/versatile_thermostat with category "Integration".
  2. Install it from HACS like any other custom integration.
  3. Restart Home Assistant.
  4. Go to Settings > Devices & Services > Add Integration and search for "Versatile Thermostat".

You'll also want the companion UI card for the Lovelace dashboard, which is available as a separate repository: versatile-thermostat-ui-card.

The full documentation is on the Versatile Thermostat website, and the README has links to detailed guides for each feature, including heating failure detection, the lock feature, and the advanced command resend settings.

Final Thoughts

Versatile Thermostat is clearly built by someone who has dealt with the pain of home heating automation firsthand. It's not trying to be flashy—it's trying to be reliable and smart about the things that actually matter. If you're already running Home Assistant and you have multiple heating systems to manage, this is probably the best way to consolidate control without writing a thousand YAML automations. The learning features (auto-TPI) and failure detection give it an edge over simpler virtual thermostats, and the plugin system means it should keep getting better. Give it a try on a single room first—you'll probably want to roll it out everywhere within a week.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Last updated: June 12, 2026 at 08:33 AM