Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Understanding and Using Home Assistant Statistics

A comprehensive documentation site explaining how statistics are generated, stored, and used in Home Assistant. Includes practical SQL query examples for exploring and troubleshooting the database.

Published Site

https://drcoolzic.github.io/ha-statistics-doc/

Documentation Structure

Statistics Documentation

Section Description
Overview High-level map of all documentation sections
Part 1 — Foundational Concepts Entities, states, the recorder, and how they relate to statistics
Part 2 — Statistics Generation How HA compiles short-term and long-term statistics
Part 3 — Working with Statistics Dashboards, graphs, and UI display
Part 4 — Best Practices & Troubleshooting Choosing state_class, recorder config, common pitfalls
Part 5 — Find & Fix Statistics Errors Detect and repair data gaps, spikes, orphaned entries, and more
Appendix 1 — Mysterious Table Fields Deep dive into created_ts and mean_weight
Appendix 2 — Statistics Domains Statistics from non-sensor domains
Quick Reference Guide Cheat sheet with key concepts and decision tables
Glossary Terminology reference

SQL Examples

Section Description
States Queries Querying the states and states_meta tables
Statistics Queries Querying statistics and statistics_short_term tables
Error Detection Queries SQL queries to detect common statistics errors
SQL Tips Useful SQLite/MariaDB tips and techniques

Building Locally

The site is built with MkDocs using the Material theme.

pip install mkdocs-material
mkdocs serve

Then open http://127.0.0.1:8000 in your browser.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors