Skip to content
jthegunner_

← All projects

ha-github-pulse

Home Assistant integration for GitHub account and repository activity: contributions, languages, CI state and custom queries

ActiveCI passing

★ 1 · Last push 27 Nov 2026

Open on GitHub

Releases

  1. v1.6.0

    Show changes

    Added

    • A Repairs notice when a refresh fails because GitHub's rate limit is used up, the token is refused, or GitHub does not answer properly for two refreshes in a row. It names the affected data group and, for a rate limit, when it resets, and disappears after the next successful refresh.

    Changed

    • Every sensor, binary sensor and event entity now has a fitting icon instead of Home Assistant's default eye. The CI state, the last workflow result and the "workflow running" sensor change their icon with their state, and custom query sensors use a code icon.
    • Repositories are now requested in batches of 10 instead of 50, so the first refresh of a long repository list no longer risks running into Home Assistant's startup limits.
    • When GitHub fails for one batch of repositories (for example with a 502), the other batches are still updated and the affected repositories keep their last values, instead of every repository sensor turning unavailable.

    [1.5.0] - 2026-11-27

    Added

    • Reconfigure can now replace the access token. The new token is checked against the enabled modules and must belong to the same GitHub account; leave the field empty to keep the current one.

    [1.4.0] - 2026-11-23

    Added

    • Optional repository traffic sensors: unique visitors, page views, unique cloners and clones over the last 14 days, the peak visitor day, the top referrer and top page (top 5 as attributes), the visitor trend (last 7 complete days against the earlier days) and cloners per visitor. They are disabled by default and fetch nothing until you enable one. GitHub shows traffic only for repositories you have write access to; for other repositories the sensors are unavailable.

    [1.3.0] - 2026-11-15

    Added

    • Optional Followers and Following sensors for your account. They are disabled by default and fetch nothing until you enable one.

    [1.2.4] - 2026-11-06

    Fixed

    • The contribution time zone is resolved once during setup through Home Assistant instead of being read from disk on the event loop. The options form validates it the same way.
    • Diagnostics no longer contain the GitHub account name: the entry title, unique ID, owner, repository names, and the name, query, variables and templates of custom queries are redacted.

    [1.2.3] - 2026-11-02

    Changed

    • The README describes the installation through the HACS search instead of a custom repository. Adding the repository by hand stays documented as a fallback.

    [1.2.2] - 2026-10-27

    Fixed

    • The most active hour and night owl score sensors no longer alternate between two values. Paginated GitHub responses that were answered with 304 Not Modified lost their link to the next page, so every other refresh analysed only the newest 100 events instead of 300.

    [1.2.1] - 2026-10-27

    Changed

    • New custom query sensors get an entity ID with the same prefix as the account's other entities, for example sensor.github_octocat_followers instead of sensor.followers. Existing query entities keep their entity ID; rename them in the entity settings to match.

    [1.2.0] - 2026-10-26

    Added

    • Per repository: commits and active days on the default branch this month, and the change versus last month and last year (like for like, so a partial month is never compared with a full one).
    • Per repository: pull requests and issues created this month.
    • These counts include every author, unlike the account sensors, and come from the existing batched query, so tracking a repository still costs no extra request.

    [1.1.0] - 2026-10-26

    Added

    • Adding repositories now offers a list of the most recently pushed repositories the token can read, with multi-select so several can be added at once. Typing a name still works, also when the list cannot be loaded.

    Changed

    • New integration icon: a blue badge with a lion that has gear eyes.

    Fixed

    • Adding a custom query no longer makes the account's other entities disappear. The query sensor used the account device, which Home Assistant then moved into the query's subentry. Query sensors now have no device, and an affected account device is moved back on startup. New query entities are named without the "GitHub " prefix; existing entity IDs are unchanged.

    [1.0.2] - 2026-10-26

    Changed

    • The longest-streak sensor is now named "Longest streak (last year)", because it covers the one-year window GitHub allows per request. Existing entity IDs are unchanged.

    [1.0.1] - 2026-10-26

    Changed

    • The setup form now states that a single token serves all modules and recommends a classic token with repo and read:org.
    • A classic token without the repo scope now gets a notice during setup that private data stays invisible, instead of passing silently.

    [1.0.0] - 2026-10-25

    Added

    • Workflow run tracking per repository: last result, runs today, queued runs, failure rate over 7 and 30 days, average duration and a running indicator.
    • Event entities and event-bus events for failed and recovered workflows, published releases, review requests and merged pull requests, with deduplication across restarts.
    • Automation blueprints for failed workflow runs and review requests.
    • Custom queries: add your own read-only GraphQL query as a sensor. Queries are validated (single query, cost cap, minimum interval), test-run before saving, and rendered with templates over value_json.
    • Optional rhythm sensors: most active hour and night-owl score, labelled approximate.
    • Optional work-in-progress sensors: average time to merge and stale pull requests.
    • Year in review: service github_pulse.year_in_review and an optional text sensor.
    • German translation.
    • CONTRIBUTING.md and a documentation pass.
    • Preset queries as starting points for custom queries.
    • Service github_pulse.query to run a read-only GraphQL query and get the result as a response.

    [0.1.0] - 2026-10-25

    First release.

    Added

    • Config flow with token type detection, per-module permission checks, reauthentication, reconfiguration, options and diagnostics.
    • Profile module: contributions, commits and pull requests this month, change versus the same span of last month and last year, busiest month, streaks, strongest weekday, optional review and issue counts.
    • Monthly history store with a configurable multi-year backfill (default three years).
    • Estimated language statistics (top language, shift versus last year) with commit-weighted and repository-count weighting.
    • Repositories module: repositories as config subentries, one batched GraphQL request for all of them, one device each with stars, forks, issues, pull requests, latest release, CI state and optional extras.
    • Search-based sensors for pull requests awaiting your review and your own open pull requests.
    • Opt-in import of the monthly history into long-term statistics.
  2. v1.5.0

    Show changes

    Added

    • Reconfigure can now replace the access token. The new token is checked against the enabled modules and must belong to the same GitHub account; leave the field empty to keep the current one.
  3. v1.4.0

    Show changes

    Added

    • Optional repository traffic sensors: unique visitors, page views, unique cloners and clones over the last 14 days, the peak visitor day, the top referrer and top page (top 5 as attributes), the visitor trend (last 7 complete days against the earlier days) and cloners per visitor. They are disabled by default and fetch nothing until you enable one. GitHub shows traffic only for repositories you have write access to; for other repositories the sensors are unavailable.

    Full changelog: CHANGELOG.md

  4. v1.3.0

    Show changes

    Added

    • Optional Followers and Following sensors for your account. They are disabled by default and fetch nothing until you enable one.

    Full changelog: CHANGELOG.md

  5. v1.2.4

    Show changes

    Fixed

    • The contribution time zone is resolved once during setup through Home Assistant instead of being read from disk on the event loop. The options form validates it the same way.
    • Diagnostics no longer contain the GitHub account name: the entry title, unique ID, owner, repository names, and the name, query, variables and templates of custom queries are redacted.

    Full changelog: CHANGELOG.md

  6. v1.2.3

    Show changes

    Changed

    • The README describes the installation through the HACS search instead of a custom repository, with an Open in HACS button. Adding the repository by hand stays documented as a fallback.

    Full changelog: CHANGELOG.md

  7. v1.2.2

    Show changes

    [1.2.2] - 2026-10-27

    Fixed

    • The most active hour and night owl score sensors no longer alternate between two values. Paginated GitHub responses that were answered with 304 Not Modified lost their link to the next page, so every other refresh analysed only the newest 100 events instead of 300.
  8. v1.2.1

    Show changes

    [1.2.1] - 2026-10-27

    Changed

    • New custom query sensors get an entity ID with the same prefix as the account's other entities, for example sensor.github_octocat_followers instead of sensor.followers. Existing query entities keep their entity ID; rename them in the entity settings to match.

All 14 releases on GitHub

README

Image: no description

GitHub Pulse

Get all your GitHub activity, inside Home Assistant.

GitHub API  →  sensors, events & history  →  dashboards & automations


🎯 What it is

GitHub Pulse turns your GitHub account into Home Assistant entities. It looks at the whole account, not only a single repository:

  • 📊 commits and pull requests this month, compared with last month and last year
  • 🗓️ your busiest month, contribution streaks and weekday rhythm
  • 🧑‍💻 the programming languages you use most, and how that changed over time (an estimate, see below)
  • 📦 per-repository stats, releases, CI state and workflow runs
  • 🔔 events for failed workflows, new releases and review requests
  • 🔧 your own GraphQL queries as sensors

You choose which parts to enable. That also decides which access token permissions you need.


📥 Installation

  1. In HACS, search for GitHub Pulse and download it.
  2. Restart Home Assistant.
  3. Go to Settings → Devices & services → Add integration → GitHub Pulse.
  4. Paste a personal access token and choose the modules you want.
  5. Use Add repository to pick one or more repositories from a list of those your token can read, or type owner/name.

Requires Home Assistant 2026.9 or newer.

Fallback: add it as a custom repository

If GitHub Pulse does not show up in the HACS search:

  1. Open HACS → ⋮ → Custom repositories.
  2. Add https://github.com/JtheGunner/ha-github-pulse with the category Integration.
  3. Install GitHub Pulse and restart Home Assistant.

🔑 Access token

You need one token. It serves every module you enable. A classic token with repo and read:org covers everything; the table shows the minimum per module.

Module Classic token Fine-grained token
👤 Profile no scope for public activity; repo + read:org adds private repositories Metadata read, one owner only
📁 Repositories repo for private repositories Metadata, Contents, Issues, Pull requests (read); Actions read if you track workflow runs

The setup checks the token against every module you select and tells you what is missing. The full endpoint list is in the permission matrix.

To replace the token, open the integration, choose Reconfigure and enter the new token. It must belong to the same GitHub account. Leave the field empty to keep the current token.

Important
Fine-grained tokens belong to a single owner and cannot read Packages. Use a classic token if you need more.

Note
The repository traffic sensors only work for repositories you have write access to; GitHub shows traffic to no one else, and only for the last 14 days. A classic token with repo covers it. GitHub does not document a fine-grained permission for traffic, so if the sensors stay unavailable with a fine-grained token, use a classic one.


🧩 What you get

Part Entities
👤 Profile Contributions, commits and pull requests this month; change versus last month and last year (like for like); busiest month; current and longest streak; top language and language shift (estimated)
📁 Repositories One device per repository: stars, forks, open issues and pull requests, latest release, CI state of the default branch; commits and active days this month and the change versus last month and last year (like for like); pull requests and issues created this month; all counting every author
⚙️ Workflow runs Per repository, if you turn on Track workflow runs: last result, runs today, queued runs, failure rate over 7 and 30 days, average duration, and a binary sensor while a workflow runs
🔔 Events Event entities per repository (workflow failed or recovered, release published) and for your account (review requested, pull request merged), also fired on the event bus
🧪 Custom queries Your own read-only GraphQL query as a sensor, added under Add custom query. Rendered with templates over value_json. Presets included; see the guide
➕ Optional sensors Reviews, issues, active days, strongest weekday, watchers, release downloads, days since last commit or release, pull requests awaiting your review, most active hour and night-owl score (approximate, from GitHub's last 300 events), average time to merge (last 50 merged pull requests), stale pull requests (open, untouched for 14 days), year in review (one-line summary with the details as attributes), followers and following counts, repository traffic (unique visitors and cloners and page views and clones over the last 14 days, peak visitor day, top referrer and page, visitor trend, cloners per visitor; needs write access, see Access token)

Every entity has its own icon. The CI state, the last workflow result and the "workflow running" binary sensor change their icon with their state, and custom query sensors use a code icon. You can still override any icon per entity in Home Assistant.

Everything marked optional is created disabled. GitHub Pulse only fetches data that an enabled entity needs, so unused sensors cost no API calls.

Note
On the integration page, your account's device (for example GitHub octocat) appears under Devices that don't belong to a sub-entry. That heading comes from Home Assistant: the profile entities belong to the account itself, while repositories and custom queries are sub-entries. Nothing is misconfigured.

🛎️ Services

Service Purpose
github_pulse.get_history Returns the monthly series and language shares as a response, for scripts and templates
github_pulse.year_in_review Returns contributions, busiest month, top language (estimated) and longest streak of a year, with a one-line summary
github_pulse.query Runs a read-only GraphQL query and returns its data, errors and cost. Same validation and rate budget as custom query sensors; 30 s timeout, 200 kB result limit

📣 Events

Each event is also fired on the Home Assistant event bus, so any automation can react to it.

Event type Fired when Data
github_pulse_workflow_failed A workflow run of a tracked repository fails repository, workflow, branch, run_id, conclusion, url
github_pulse_workflow_recovered The first run succeeds after a failure same as above
github_pulse_release_published A tracked repository publishes a release repository, tag, name, url, prerelease
github_pulse_review_requested Someone asks you to review a pull request repository, number, title, url
github_pulse_pr_merged One of your pull requests is merged repository, number, title, url

History is never announced: on a fresh install the current state is only remembered.

🔧 Options

History depth (1 to 10 years, default 3), refresh intervals, contribution time zone, whether to include restricted contributions, language weighting, and an opt-in import of the monthly history into long-term statistics.

Tip
Charts for commits and language shares need no custom card: see the dashboard example.

Note
Why do totals differ from github.com, and why are some counts "restricted"? See visible and restricted contributions.

Note
If GitHub's rate limit is used up, the token is refused, or GitHub keeps failing to answer, a notice appears under Settings → Repairs and clears after the next successful refresh. The sensors keep their last known values meanwhile.

Note
Language statistics are estimated: GitHub provides language data per repository, not per commit. The estimate weights your commits by each repository's language mix.


🧩 Blueprints

Two automation blueprints ship in blueprints/automation/github_pulse. Copy them to config/blueprints/automation/github_pulse/ and create automations from them.

Blueprint Fires on
🔴 ci_failed.yaml github_pulse_workflow_failed, optionally filtered by repository and branch
👀 review_requested.yaml github_pulse_review_requested, optionally filtered by repository

🗺️ Roadmap

Possible next steps: more presets for custom queries. A Packages module is not planned: GitHub's API returns package names and versions but no download counts. See docs/concept-and-plan.md.


🤝 Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md for the project layout, conventions and the pull request process. Every behaviour change needs a test.

🛠️ Development

Requires Python 3.14 and uv.

uv venv --python 3.14 .venv
uv pip install --python .venv/bin/python -r requirements_test.txt
.venv/bin/ruff check . && .venv/bin/ruff format --check .
.venv/bin/mypy custom_components
.venv/bin/pytest

📜 Changelog

See CHANGELOG.md.


📄 License

Released under the MIT License.

Built for Home Assistant · data from the GitHub API