Files
advanced-camera-card/FORK.md
T

2.3 KiB

Fork notes

A fork of Advanced Camera Card, carrying one change on top of upstream main.

What this fork adds

cameras[].media.severities

Upstream issues review queries with no severity filter, so the thumbnail bar ("side ribbon"), the media gallery and the timeline show every Frigate review item — alerts and detections alike — regardless of what a camera is configured to alert on. Severity can only be narrowed interactively, in the media filter drawer, and that choice does not persist.

media.severities restricts review media to the listed severities, resolved into the default query the same way media.reviewed already is:

type: custom:advanced-camera-card
cameras:
  - camera_entity: camera.front_doorbell
    media:
      severities:
        - high
Value Frigate equivalent
high alert
medium detection
low (no equivalent)

An explicit severity chosen in the media filter drawer still wins, so the interactive filter keeps working. Unset means all severities, so a config that does not mention severities behaves exactly as upstream does.

Keeping up with upstream

git remote add upstream https://github.com/dermotduffy/advanced-camera-card.git
git fetch upstream
git merge upstream/main
yarn install --immutable && yarn typecheck && yarn lint && yarn test

dist/ is not committed (as upstream), so a merge should never conflict on build output.

Releasing to HACS

HACS installs this card from GitHub release assets, not from the branch. That is not a preference — gather_files_to_download() in HACS (custom_components/hacs/repositories/base.py) skips every file under dist/ whose basename does not start with dist, and this card's build emits a chunk named dist-<hash>.js. A branch install would therefore fetch that single chunk and nothing else.

To cut a release:

RELEASE_VERSION=<version> yarn build
gh release create <tag> dist/*.js --repo <mirror> --title <tag> --notes '...'

Every file in dist/ must be attached, advanced-camera-card.js included — HACS matches that name to decide the repository is release-based, then downloads all assets of the release.