Custom integration that samples per-CPU load/frequency, computes rolling averages (1m/5m/15m), and exposes sensors directly in Home Assistant.
- Internal sampling loop (default
0.5s) - Home Assistant entity updates at a slower interval (default
15s) - Per-CPU sensors for:
- MHz averages (1m/5m/15m)
- Load % averages (1m/5m/15m)
- Capacity-Adjusted Load % averages (1m/5m/15m)
- Max MHz
- EPP
- EPB
Capacity-Adjusted Load % formula:
load_pct * (current_mhz / max_mhz)
- Copy
custom_components/cpu_capacityinto your Home Assistantconfig/custom_components. - Restart Home Assistant.
- Add integration: Settings -> Devices & Services -> Add Integration -> CPU Capacity.
- The integration reads only from
/procand/sys/devices/system/cpu/*. - If some CPUs do not expose max MHz, capacity-adjusted sensors for those CPUs are omitted.
Commits must follow the
Conventional Commits spec —
release-please uses commit prefixes (feat:, fix:, etc.) to drive version
bumps.
After cloning, install the hooks including the commit-msg hook (the default
prek install only wires up pre-commit-stage hooks):
uvx prek install --overwrite --hook-type pre-commit --hook-type commit-msg
Without --hook-type commit-msg, malformed commit messages won't be caught
locally — CI (Commitlint workflow) will still reject them.