Github Flexi Card

April 29, 2026 · View on GitHub

GitHub Release GitHub All Releases Community Forum hacs_badge

Home Assistant card displaying data from Github integration

Overview

This card displays all the data provided by the GitHub integration. You can choose what data is shown and where it appears. Entity rows match the dimensions of standard rows from native cards (e.g. row height, icon/text margins, font sizes, etc.).

It works as both a standalone card (customn:github-flexi-card) and a entity row (custom:github-repo).

Note: If you only need a entity row, consider the simpler/lighter alternative by benct: github-entity-row

image

Breaking changes in v3.0.0

The card now uses repository names instead of entity IDs — a fundamental change to how the card is configured.

What changed

RemovedReplacementNotes
entities (card config)reposList of repository names (e.g. maxwroc/battery-state-card) instead of entity IDs
entity (repo config)repoRepository name instead of entity ID
auto (card config)(removed)Auto-discovery now happens automatically when repos is empty
custom:github-entitycustom:github-repoCustom element type renamed
Attribute sub-properties (e.g. latest_release_tag)Direct entity keys (e.g. latest_release)Entity attributes are no longer accessed via underscore notation

Migration guide

Before (v2.x):

type: 'custom:github-flexi-card'
title: My repos
entities:
  - sensor.maxwroc_battery_state_card_latest_release
  - entity: sensor.hideseek_mod_latest_release
    secondary_info: 'Released {latest_release_tag}'

After (v3.0.0):

type: 'custom:github-flexi-card'
title: My repos
repos:
  - maxwroc/battery-state-card
  - repo: maxwroc/hideseek-mod
    secondary_info: 'Released {latest_release.attributes.tag}'

If repos is omitted or empty, all GitHub repos added to Home Assistant will be auto-discovered.

Configuration

Default configuration

Please see the following file: default-config.ts

Card

NameTypeDefaultSinceDescription
titlestringv0.1.0Card header/title text
reposlist(Repo) | stringv3.0.0Repos to display. Accepts a list of repository name strings (e.g. maxwroc/battery-state-card). When empty, all GitHub repos are auto-discovered.
sortlist(SortOptions)v1.0.0Sort options (order matters). Each subsequent option acts as a tiebreaker when values from the previous one are equal.

+ Repo Properties - applied to all repos

Repo

NameTypeDefaultSinceDescription
repostring(required)v3.0.0Repository name e.g. maxwroc/battery-state-card

+ Repo Properties

Repo Properties

NameTypeDefaultSinceDescription
nameKString"{path}"v0.1.0Name override
secondary_infoKStringv0.1.0String to display underneath the repo name
attributeslist(Attribute)v0.1.0Repository attributes/entities to display
urlKString | boolv0.2.0URL to open on click/tap. When set to true, links to the repo homepage.
attribute_urlsboolv0.2.0When true, enables default URLs for all displayed attributes
attribute_colorstringvar(--primary-color)v2.0.0Color applied to all attributes (icons or labels)
iconstring"mdi:github"v0.2.0Override for repo icon
icon_colorstringv2.0.0Icon color override
compact_viewbooltruev1.0.0When false, displays larger icons and values

Attribute

NameTypeDefaultSinceDescription
namestring(required)v0.1.0Name of the attribute (please check the list below)
iconstringv0.1.0Icon override (there are default icons for most of the available attributes)
urlKString | boolv0.2.0URL to open on click/tap. Most attributes have default URLs, so you can simply use true.
labelKStringv0.5.0Label/text which will be shown instead of the icon
colorstringvar(--primary-color)v2.0.0Icon / label color

Attribute names

The GitHub integration creates multiple entities per repo. Since entity IDs can be translated, the card cannot rely on them. Instead, it automatically detects entities based on their translation_key value, which is language-agnostic. Because of this, there is a fixed list of supported repository attributes/entities you can use.

Available attribute names: forks, issues, latest_commit, latest_issue, latest_pull_request, latest_release, pull_requests, merged_pull_requests, stars, watchers, discussions, latest_discussion, latest_tag.

image

I recommend enabling all "Diagnostic" entities for your repo(s) on the devices page.

Sort options

NameTypeDefaultSinceDescription
bystring(required)v1.0.0Name of the attribute
ascendingboolfalsev1.0.0Whether to sort ascending or descending

KeywordString

A KeywordString is a string that can contain special keywords — repo attribute names enclosed in curly brackets. These keywords are replaced with their corresponding attribute values at render time.

E.g. "Card version {latest_release.attributes.tag}" becomes "Card version v1.5.0"

Special repo attributes available in KeywordStrings

NameDescription
pathRepository path e.g. maxwroc/github-flexi-card
ownerFirst part of repository path e.g. maxwroc for the maxwroc/github-flexi-card repo
repoSecond part of repository path e.g. github-flexi-card for the maxwroc/github-flexi-card repo

Converting keyword value

Keywords support simple functions to convert the values

FuncExampleDescription
replace([old_string],[new_string]){latest_release|replace(Git,Proj)}Replaces occurrences of old_string with new_string in the value
conditional(){latest_release.attributes.tag|conditional()}Renders nothing if the value doesn't exist (by default, the raw keyword is shown)
round([number]){state|round(2)}Rounds the value to the specified number of decimal places

Configuration examples

Card

type: 'custom:github-flexi-card'
title: Github projects
repos:
  - repo: maxwroc/battery-state-card
    secondary_info: 'Released {latest_release}'
    url: true
    attributes:
      - name: stars
        url: true # default url to /stargazers
      - name: issues
        url: "https://my.custom.url/path"
      - name: forks
      - name: pull_requests
  - repo: maxwroc/hideseek-mod
    url: true # default url - repo homepage
    attributes:
      - stars
      - forks
  - repo: nicolo-ribaudo/tc39-proposal-url-editor-pro
    name: 'Url Editor Pro (v{latest_release})'
    secondary_info: '{latest_pull_request}'
    attributes:
      - stars
      - issues

Repo

Note: different type has to be used custom:github-repo

image

type: entities
title: Displayed as entity
show_header_toggle: false
entities:
  - sensor.home_assistant_v2_db
  - type: 'custom:github-repo'
    repo: maxwroc/battery-state-card
    secondary_info: 'Released {latest_release.attributes.tag}'
    url: true
    attribute_urls: true
    attributes:
      - stars
      - issues
      - forks
      - pull_requests
      - watchers
  - sensor.hassio_online
  - sensor.last_boot
  - sensor.processor_use

Card-level repo properties

Card-level repo properties let you apply the same settings to all repos at once.

image

type: 'custom:github-flexi-card'
title: Card-level repo properties
secondary_info: 'Released {latest_release.attributes.tag}'
url: true
attribute_urls: true
attributes:
  - stars
  - issues
  - watchers
  - forks
  - pull_requests
repos:
  - maxwroc/battery-state-card
  - maxwroc/hideseek-mod
  - nicolo-ribaudo/tc39-proposal-url-editor-pro

Labels instead of icons

image

type: 'custom:github-flexi-card'
title: Labels instead of icons
url: true
attribute_urls: true
attributes:
  - name: stars
    label: Stars
  - name: issues
    label: Issues
repos:
  - maxwroc/battery-state-card
  - maxwroc/hideseek-mod
  - nicolo-ribaudo/tc39-proposal-url-editor-pro

Compact view (disabling)

image

type: 'custom:github-flexi-card'
title: Big icons
url: true
attribute_urls: true
attributes:
  - watchers
  - stars
repos:
  - maxwroc/battery-state-card
  - repo: maxwroc/hideseek-mod
    compact_view: false
  - nicolo-ribaudo/tc39-proposal-url-editor-pro

Sorting

image

type: 'custom:github-flexi-card'
title: Sort by stars and forks (asc)
secondary_info: '{latest_release}'
url: true
attribute_urls: true
attributes:
  - watchers
  - stars
  - issues
  - forks
sort:
  - by: stars
  - by: forks
    ascending: true
repos:
  - maxwroc/battery-state-card
  - maxwroc/hideseek-mod
  - maxwroc/github-flexi-card
  - nicolo-ribaudo/tc39-proposal-url-editor-pro
  - repo: maxwroc/homeassistant
    secondary_info: null

How to install?

Install via HACS — look for the card in the Frontend plugins collection.

If you use YAML mode, remember to add a resource entry for the JS bundle in ui-lovelace.yaml:

resources:
  - url: /hacsfiles/github-flexi-card/github-flexi-card.js
    type: module

Automation

If you want to receive notifications whenever something changes with the repo you can use my automation as an example: https://github.com/maxwroc/homeassistant/blob/master/configuration/packages/github.yaml

Development

Card created based on lovelace-card-boilerplate

npm install
npm run build

For new features create your branch based on vNext and for fixes based on master.

Troubleshooting

If the card isn't rendering as expected or you want to inspect the data it receives from Home Assistant, enable the debug option.

Using the debug config

Add debug to your card or repo configuration. When enabled, the repo view is replaced with a diagnostic panel showing the resolved config, entity map, and all entity states.

ValueEffect
trueShows debug output for all repos
"owner/repo-name"Shows debug output only for the matching repo

The debug panel includes a Show / hide toggle and a Copy to clipboard button so you can easily share the data when reporting issues.

Card-level (all repos)

type: 'custom:github-flexi-card'
debug: true
repos:
  - maxwroc/battery-state-card
  - maxwroc/hideseek-mod

Single repo

type: 'custom:github-flexi-card'
repos:
  - repo: maxwroc/battery-state-card
    debug: true
  - maxwroc/hideseek-mod

Specific repo by name (card-level)

type: 'custom:github-flexi-card'
debug: "maxwroc/battery-state-card"
repos:
  - maxwroc/battery-state-card
  - maxwroc/hideseek-mod

Do you like the card?

Don't "buy me a coffee" — just star it on GitHub! That's enough to let me know you like it and will definitely motivate me to keep working on it and other cards.

battery-state-card | homeassistant-config | lovelace-card-boilerplate