Skip to content
Projets

HA-Pulse/home-assistant-global-health-score

Voir sur GitHub

À propos

Le standard ouvert pour surveiller l’état des instances Home Assistant.

Systèmes et infrastructure

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+9
in 15 days
+15
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

HAGHS, a health score for your Home Assistant

The open standard for Home Assistant instance health monitoring.

Marketplace | HACS – Default GitHub Release Installs (opt-in analytics) GitHub Stars Buy Me a Coffee Website - hapulse.dev AI-Assisted


Quality gate status

Abstract

As Home Assistant matures into a mission-critical Smart Home OS, the need for a unified stability metric becomes paramount. HAGHS is a fully local, open-scoring framework designed to provide an objective Health Score (0-100). It differentiates between transient hardware load and chronic maintenance neglect, providing users with a "North Star" for instance optimization. All scoring logic is fully visible in the codebase, no hidden penalties, no black boxes. More at hapulse.dev.


Mission

  • Short-term: Establish HAGHS as the community standard for Home Assistant instance health monitoring.
  • Long-term: Propose HAGHS as a native HA Core feature, bringing unified health scoring to every Home Assistant installation by default. With user consent, HAGHS metrics should help the Home Assistant project understand how the software is being used and how healthy instances are across the ecosystem.

Featured In


Table of Contents

Detailed documentation


The HAGHS Standard

The index is calculated via a weighted average of two core pillars, prioritizing long-term software hygiene over temporary hardware fluctuations.

The Global Formula

$$Score_{Global} = \lfloor (Score_{Hardware} \cdot 0.4) + (Score_{Application} \cdot 0.6) \rfloor$$

Note: We use Floor Rounding (Integer) to ensure a "Perfect 100" is only achieved by truly optimized systems. A penalty drops the score below 100 unless the Config-Audit bonus offsets it in the application pillar; zombies, open repairs and overdue watched entities always cap the application score at 99.


Pillar 1: Hardware Performance (40%)

Short version. Every threshold, tier table and the component rules are in docs/scoring.md.

The hardware score is the average of the measured components: CPU, RAM, I/O (when the kernel provides it) and Disk.

  • Metric source: HAGHS reads Pressure Stall Information (PSI) from the Linux kernel where available and falls back to the CPU and RAM sensors you select. PSI measures stall time, classic sensors measure utilization, so each source has its own threshold tiers.
  • Storage: disk usage is detected automatically, with thresholds per storage type (SD card and eMMC by free GB, SSD by free percent).
  • Power: a reported Raspberry Pi under-voltage costs a flat 20 points.

All hardware details →


Pillar 2: Application Hygiene (60%)

Short version. Every rule, cap and exception is in docs/scoring.md.

Measures "maintenance debt". Every missing point prints a recommendation line and sets a matching rec_* flag.

Factor Points Rule
Zombie entities up to −20, caps at 99 Entities unavailable or unknown past the grace period (5 min, battery 60 min), scaled by their share. An availability signal, not a deletion list.
Updates and Core age −5 per update, −20 Core lag, at most −35 An update counts after HAGHS has seen that version pending for 7 days, also across restarts.
Integration health −5 per entry, at most −15 Config entries stuck in setup error, setup retry or failed unload.
Repairs −5 each, at most −10, caps at 99 Open repairs of other integrations; Home Assistant's "Ignore" takes one out.
Watched entities −5 each, at most −10, caps at 99 Opt-in: entities labelled directly with a stale watch label that have not reported for longer than the stale threshold (default 24 h).
Database −10, or −30 Above 1000 MB + 2.5 MB × entities, or above 2.5 times that limit.
Backup −30 Stale backup: a scheduled automatic backup older than 8 days, or the Google Drive Backup add-on's binary_sensor.backups_stale on; 30 points once.
Config audit up to +10 Recorder keeps at most 10 days (+5); user-set entity filter (+5).
Dead and empty devices none Informational: devices whose monitored entities are all unavailable, or that have no entity.

All application rules →


Configuration

Short version. Every option, the integration-entry exclusion and the external database setup are in docs/configuration.md.

HAGHS needs Home Assistant 2026.6 or newer. It is installed via the Marketplace (Home Assistant 2026.11 and later) or HACS (2026.6 to 2026.10) and configured via the UI.

1. Prerequisites

Where the Linux kernel provides PSI, nothing is needed. Otherwise add the built-in System Monitor integration and enable its processor and memory usage entities (disabled by default). Database size and disk usage are detected automatically.

2. Installation & Setup

  1. Home Assistant 2026.11 and later: open Settings > Marketplace, search for HAGHS and select Install; the setup opens right away, no restart needed (continue with step 3). 2026.6 to 2026.10: download HAGHS in HACS and Restart Home Assistant.
  2. Go to Settings > Devices & Services > Integrations > Add Integration and search for HAGHS.
  3. Follow the setup mask: CPU and RAM sensors (only used without PSI), storage type, ignore labels and patterns, optionally a database size sensor for an external database.

Change any of it later in Settings > Devices & Services > Integrations > HAGHS > Configure; changes apply immediately, no restart required.

All configuration options →


Label Configuration (Smart Whitelisting)

Short version. Label tips, conditional ignore labels, automations, pattern-based ignore and stale reporting are in docs/configuration.md.

Three ways keep an entity out of the score:

  1. Disable the entity; disabled entities never count.
  2. Apply an ignore label to an area, device, entity or update entity. The haghs_ignore label is created during setup; list further labels in HAGHS > Configure > Ignore labels.
  3. Use a glob pattern for entities without a unique ID, which cannot carry a label.

All label options →


Sensor Attributes

Short version. The full list of all attributes with types and meaning is in docs/attributes.md.

The most used attributes for dashboard cards, automations, and templates:

Attribute Type Description
hardware_score int Hardware pillar score (0–100).
application_score int Application pillar score (0–100).
recommendations string Advisor lines naming what costs points or needs a look, or a healthy message.
zombie_count int Total number of zombie entities.
zombie_entities list Entity IDs of zombies, at most 100.
zombie_reasons dict Why each listed zombie is reported; only config_entry_missing strongly points to an orphaned entity.
pending_updates list Names of pending updates, listed at once and counted after 7 days.
repair_count int Number of open repair issues counted toward the score.
integration_unhealthy_count int Number of config entries stuck in setup error, setup retry or failed unload.
db_size_mb float Current database size in MB.
psi_available bool True when PSI provides both CPU and memory data.
cpu_ram_source str/null Where CPU and RAM come from: psi, sensors, partial or none.
stale_watch_count int Number of overdue watched entities.

All attributes →


Roadmap

Planned features, declined items, and completed milestones live in ROADMAP.md. The roadmap follows the HAGHS philosophy: local-only, system-health focus, HA Core compatibility.


UI Integration

Short version. Installation, entity ID and the Lite vs. Pro comparison are in docs/cards.md.

HAGHS provides all data as sensor attributes; two ready-to-use dashboard cards show them. Both are wired to sensor.system_ha_global_health_score.

HAGHS Lite v1.4 (Quick Check): a compact card for a fast overview, score, sub-scores, and actionable links. Configuration: docs/cards/lite.yaml.

HAGHS Lite v1.4 dashboard card

HAGHS Pro v1.4 (Command Center): a comprehensive dashboard with full score breakdown, grouped zombies, database monitoring, recorder health, and deep-links. Configuration: docs/cards/pro.yaml.

HAGHS Pro v1.4 dashboard card

All card details →


FAQ

Short version. All questions and full answers are in docs/faq.md.

Why is my score so low? Check the Advisor recommendations in the dashboard card. They tell you exactly where penalties come from (e.g., "5 update(s) pending", "Stale backup detected").

Can I delete all zombie entities? No, not without checking them. A zombie only means that the entity has been unavailable or unknown for longer than the grace period. Check its integration, device and config entry first; zombie_reasons tells you why each one is listed.

Why did my score change after an update? The release summaries list the behavior changes per release. The recommendations and rec_* flags show which factors cost points right now.

Does HAGHS send any data to external servers? No. All data collection is strictly local. No outbound network traffic is ever initiated by this integration.

How does PSI work and why does HAGHS use it? PSI (Pressure Stall Information) is a Linux kernel feature that measures how long tasks wait for CPU, memory, or I/O, rather than how busy a resource is. HAGHS uses it where available and falls back to classic utilization sensors otherwise.

All questions →


Changelog

Short version. A summary of every release is in docs/changelog.md.

Every change in detail: CHANGELOG.md.

All release summaries →


AI Disclosure: While the architectural concept and logic are my own, I utilized AI to assist with code optimization and documentation formatting.

Explorer des projets similaires

Chargement…