Tado-based heating energy tracker with daily estimation

Tado-based heating energy tracker with daily estimation

Hey everyone,

I built a small system to track and estimate heating energy consumption in Home Assistant using Tado thermostat valve positions — useful if you only receive actual consumption data once a month from your landlord or utility provider.

The problem

My landlord provides monthly kWh readings for central heating. Previously I just divided the total equally across all days. That’s obviously not very accurate — a cold week with lots of heating looks the same as a warm week.

The solution

Two Python scripts that write directly to the MariaDB statistics tables:

1. Monthly import — when you receive your actual kWh reading, it distributes the total across all days weighted by Tado valve activity. Days with warm outdoor temperatures and zero Tado activity (= central heating off in summer) get weight 0 automatically.

2. Daily estimation — runs every night at 03:00 and estimates the current month’s consumption in real time. It learns a calibration factor (kWh per Tado unit) from your historical actual readings. The more months of real data you have, the more accurate it gets. With just 1 month it already works reasonably well.

How the calibration works

For each month with actual data:

factor = actual_kWh / sum_of_daily_tado_averages

Newer months are weighted exponentially higher, so the estimate adapts over time.

Requirements

  • Home Assistant with MariaDB add-on
  • Tado integration (heating percentage sensors)
  • Outdoor temperature sensor (for summer detection)
  • pymysql Python package

GitHub

Full installation instructions, configuration, and both scripts:
:point_right: GitHub - groovyM/HA-Tado-Heating-Tracker: Tado-based heating energy tracker and estimator for Home Assistant · GitHub

Happy to answer questions or take suggestions for improvements!

Does it allow for the changing seasons on a sliding variable scale, or just summer/winter? Will it self learn to adapt to climate change?

Do you expect to come up against the post-purchase vendor restrictions Tado is becomingly renowned for?