{"id":46998942,"url":"https://github.com/dmoo500/ha-github-card","last_synced_at":"2026-04-22T05:05:23.144Z","repository":{"id":343711470,"uuid":"1178859994","full_name":"dmoo500/ha-github-card","owner":"dmoo500","description":"Home Assistant Lovelace card for GitHub integration","archived":false,"fork":false,"pushed_at":"2026-04-07T03:01:01.000Z","size":32664,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T05:08:44.149Z","etag":null,"topics":["github-card","hacs","homeassistant","lovelace"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmoo500.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-11T12:50:08.000Z","updated_at":"2026-04-07T03:00:58.000Z","dependencies_parsed_at":"2026-04-07T05:03:27.597Z","dependency_job_id":null,"html_url":"https://github.com/dmoo500/ha-github-card","commit_stats":null,"previous_names":["dmoo500/ha-github-card"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/dmoo500/ha-github-card","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmoo500%2Fha-github-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmoo500%2Fha-github-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmoo500%2Fha-github-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmoo500%2Fha-github-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmoo500","download_url":"https://codeload.github.com/dmoo500/ha-github-card/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmoo500%2Fha-github-card/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31539229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-card","hacs","homeassistant","lovelace"],"created_at":"2026-03-11T16:00:23.516Z","updated_at":"2026-04-08T04:01:52.315Z","avatar_url":"https://github.com/dmoo500.png","language":"TypeScript","readme":"# ha-github-card\n\n[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/hacs/integration)\n[![GitHub release](https://img.shields.io/github/v/release/dmoo500/ha-github-card)](https://github.com/dmoo500/ha-github-card/releases)\n[![License](https://img.shields.io/github/license/dmoo500/ha-github-card)](LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/dmoo500/ha-github-card)](https://github.com/dmoo500/ha-github-card/issues)\n[![GitHub stars](https://img.shields.io/github/stars/dmoo500/ha-github-card)](https://github.com/dmoo500/ha-github-card/stargazers)\n[![GitHub watchers](https://img.shields.io/github/watchers/dmoo500/ha-github-card)](https://github.com/dmoo500/ha-github-card/watchers)\n[![Last Commit](https://img.shields.io/github/last-commit/dmoo500/ha-github-card)](https://github.com/dmoo500/ha-github-card/commits/main)\n[![Maintained](https://img.shields.io/maintenance/yes/2026)](https://github.com/dmoo500/ha-github-card)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?logo=typescript)](https://www.typescriptlang.org/)\n\nA custom [Home Assistant](https://www.home-assistant.io/) Lovelace card that displays information from your GitHub repositories tracked via the official [GitHub integration](https://www.home-assistant.io/integrations/github/).\n\n![Card Preview](docs/card_preview.png)\n\n## Features\n\n- Table-like layout per repository: owner avatar, repo name, latest release tag\n- Fully configurable stat rows — up to 5 rows with 1–3 columns each\n- Available stats: Stars, Forks, Watchers, Issues, Pull Requests, Last Commit, Latest Release\n- **Conditional color rules** per stat column — color text or background based on threshold\n- Visual card editor with entity picker, row/column configurator and color rule builder\n- Owner avatar auto-derived from repository name\n- Compact layout option\n- Fully themed via HA CSS variables\n\n## Requirements\n\n1. [GitHub integration](https://www.home-assistant.io/integrations/github/) installed and configured in Home Assistant\n2. At least one repository added to the GitHub integration\n\n## Installation\n\n### HACS (recommended)\n\n[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=dmoo500\u0026repository=ha-github-card\u0026category=lovelace)\n\n1. Open HACS → Frontend → \"+ Explore \u0026 download repositories\"\n2. Search for **ha-github-card** and install\n3. Add the resource if needed: `/hacsfiles/ha-github-card/ha-github-card.js`\n\n### Manual\n\n1. Download `ha-github-card.js` from the [latest release](https://github.com/dmoo500/ha-github-card/releases)\n2. Copy it to `config/www/ha-github-card/ha-github-card.js`\n3. Add the resource in Settings → Dashboards → Resources: `/local/ha-github-card/ha-github-card.js`\n\n## Configuration\n\n### Via Visual Editor\n\nClick the edit button on a dashboard, add a new card, search for **GitHub Card**.\n\n![Editor — Entities \u0026 Rows](docs/editor_entites_rows_columns.png)\n\nUse the entity input to select any sensor from a GitHub repository device (e.g. `sensor.myrepo_watchers_count`). The card automatically aggregates all sensors from the same device.\n\nConfigure rows and columns freely — each row can have 1, 2 or 3 stat slots.\n\n#### Conditional Colors\n\n![Editor — Conditional Colors](docs/editor_conditional_colors.png)\n\nAdd color rules per stat slot. Each rule has:\n- **Text / BG** — apply the color to the value text or the cell background\n- **Operator** — `\u003e`, `\u003e=`, `\u003c`, `\u003c=`, `==`\n- **Threshold** — the numeric value to compare against\n- **Color** — any CSS color string\n\nThe first matching rule wins.\n\n### YAML\n\n```yaml\ntype: custom:ha-github-card\ntitle: GitHub\nentities:\n  - sensor.myrepo_watchers_count   # any sensor from the GitHub device works\nshow_avatar: true\nshow_header: true\nshow_header_icon: true\ncompact: false\nrows:\n  - [watchers, stars, last_commit]\n  - [pull_requests, issues]\n```\n\n### All Options\n\n| Option              | Type      | Default | Description                                                      |\n|---------------------|-----------|---------|------------------------------------------------------------------|\n| `title`             | `string`  | —       | Card header title                                                |\n| `entities`          | `list`    | `[]`    | One entity ID per GitHub repository (any sensor from the device) |\n| `show_avatar`       | `boolean` | `true`  | Show repository owner avatar                                     |\n| `show_header`       | `boolean` | `true`  | Show the card header bar                                         |\n| `show_header_icon`  | `boolean` | `true`  | Show the GitHub icon in the card header                          |\n| `compact`           | `boolean` | `false` | Compact layout with reduced padding                              |\n| `rows`              | `list`    | see below | List of rows, each a list of 1–3 slot keys                    |\n| `icons`             | `map`     | —       | Per-slot icon override (e.g. `stars: mdi:star-outline`)          |\n| `slot_colors`       | `map`     | —       | Per-slot conditional color rules (see below)                     |\n\n**Default rows:**\n```yaml\nrows:\n  - [watchers, stars, last_commit]\n  - [pull_requests, issues]\n```\n\n### Available Slot Keys\n\n| Key             | Description                    |\n|-----------------|-------------------------------|\n| `stars`         | Stargazer count               |\n| `forks`         | Fork count                    |\n| `watchers`      | Watcher count                 |\n| `issues`        | Open issue count              |\n| `pull_requests` | Open pull request count       |\n| `last_commit`   | Latest commit SHA + date      |\n| `last_release`  | Latest release tag            |\n| `none`          | Empty slot (hidden)           |\n\n### Conditional Color Rules\n\nColor rules can be defined per numeric slot. The first matching rule applies.\n\n```yaml\nslot_colors:\n  stars:\n    - op: \"\u003e=\"\n      value: 100\n      color: \"var(--success-color, #4caf50)\"\n      type: background\n    - op: \"\u003e=\"\n      value: 10\n      color: \"var(--warning-color, #ff9800)\"\n      type: text\n  issues:\n    - op: \"\u003e=\"\n      value: 20\n      color: \"var(--error-color, #f44336)\"\n      type: background\n    - op: \"\u003e=\"\n      value: 1\n      color: \"var(--warning-color, #ff9800)\"\n      type: text\n```\n\n**Rule fields:**\n\n| Field   | Type     | Description                                              |\n|---------|----------|----------------------------------------------------------|\n| `op`    | `string` | Operator: `\u003e`, `\u003e=`, `\u003c`, `\u003c=`, `==`                    |\n| `value` | `number` | Threshold to compare against                             |\n| `color` | `string` | CSS color — hex, named, or HA variable                   |\n| `type`  | `string` | `text` (default) or `background`                         |\n\nSupported slots for color rules: `stars`, `forks`, `watchers`, `issues`, `pull_requests`\n\n## Development\n\n```bash\nyarn install\nyarn build      # production build\nyarn type-check # TypeScript check\nyarn lint       # ESLint\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmoo500%2Fha-github-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmoo500%2Fha-github-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmoo500%2Fha-github-card/lists"}