Files
flan dc427c1fcb
CI / Check / HACS (push) Failing after 1m37s
CI / Test / Unit (push) Successful in 2m37s
CI / Test / Dist / Firefox (push) Successful in 1m44s
CI / Test / Dist / WebKit (push) Successful in 1m10s
Manage labels / Labeler (push) Successful in 19s
CI / Test / Browser / Firefox (push) Successful in 5m25s
CI / Check / Code (push) Successful in 2m46s
CI / Test / Dist / Chromium (push) Successful in 1m7s
CI / Test / Browser / Chromium (push) Successful in 4m39s
CI / Build (push) Failing after 42s
CI / Test / Browser / WebKit (push) Successful in 3m36s
Semantic Release / get-next-version (push) Successful in 51s
Semantic Release / release (push) Skipped
docs: Use a plain semver line for fork releases
2026-09-04 18:03:37 +00:00

76 lines
2.5 KiB
Markdown

# Fork notes
A fork of [Advanced Camera Card](https://github.com/dermotduffy/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:
```yaml
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.
## Versioning
This fork has its own semver line, starting at `8.1.0` (upstream `v8.0.2` plus
the feature above). Tags are plain semver — HACS hides pre-release versions
unless the user has enabled beta versions, so a `-flan.N` style tag would make
the release invisible to HACS.
## Keeping up with upstream
```bash
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:
```bash
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.