Skip to content

christinloehner/HAOS-Codeberg-Integration

Repository files navigation

Home Assistant Codeberg Integration

Home Assistant custom integration for tracking Codeberg repositories.

This integration targets Home Assistant 2026.4.0 and newer and is structured for installation through HACS from the GitHub mirror:

  • https://github.com/christinloehner/HAOS-Codeberg-Integration

Features

  • Track multiple Codeberg repositories from one account token
  • Sensor entities per repository for:
    • Stars
    • Watchers
    • Forks
    • Open issues
    • Open pull requests
    • Latest commit
    • Latest issue
    • Latest pull request
    • Latest release
    • Latest tag
  • Bundled Lovelace card:
    • custom:codeberg-flexi-card
    • custom:codeberg-repo

Installation

HACS

  1. Open HACS.
  2. Add the custom repository https://github.com/christinloehner/HAOS-Codeberg-Integration as type Integration.
  3. Install Codeberg.
  4. Restart Home Assistant.

Manual

  1. Copy custom_components/codeberg into your Home Assistant custom_components/ directory.
  2. Restart Home Assistant.

Setup

  1. In Codeberg, create a personal access token.
  2. Recommended token scopes:
  • read:user
  • read:repository
  • read:issue
  1. In Home Assistant, go to Settings -> Devices & services -> Add integration.
  2. Search for Codeberg.
  3. Paste the access token.
  4. After setup, add one or more repository subentries in owner/repo format.

Examples:

  • home-assistant/core
  • forgejo/forgejo

Notes

  • HACS currently requires a public GitHub repository. The project can still be developed on Codeberg and mirrored to GitHub for HACS.
  • Repository discussions are not currently exposed because Codeberg's documented Forgejo REST API does not expose discussion endpoints.
  • The bundled dashboard card is automatically registered for storage-mode dashboards.
  • If you use YAML Lovelace mode, add this resource manually:
lovelace:
  resources:
    - url: /codeberg/codeberg-flexi-card.js
      type: module

Dashboard Card

The integration ships with an adapted Codeberg version of github-flexi-card.

Card types:

  • custom:codeberg-flexi-card
  • custom:codeberg-repo

Example:

type: custom:codeberg-flexi-card
title: Codeberg Projects
repos:
  - christinloehner/FediSuite-Docker-Image
attributes:
  - stars
  - issues
  - pull_requests
  - forks
  - watchers
url: true
attribute_urls: true

Third-Party Attribution

The bundled dashboard card is based on maxwroc/github-flexi-card and adapted for Codeberg.

Repository URLs

  • GitHub mirror: https://github.com/christinloehner/HAOS-Codeberg-Integration
  • Codeberg primary repository: to be added

Support

Please report issues in the GitHub mirror issue tracker used for HACS distribution:

  • https://github.com/christinloehner/HAOS-Codeberg-Integration/issues

About

Home Assistant Integration for Codeberg Repositories

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors