feat: add problem detection framework for common problems (#2412)

Introduces a ProblemManager that detects and surfaces actionable issues
(stale config, legacy frigate-hass-card resources, slow/failed streams)
via status bar indicators and notification popups with fix actions.
This commit is contained in:
Dermot Duffy
2026-03-13 20:00:59 -07:00
committed by GitHub
parent 95faddd9a0
commit ab683df5e8
46 changed files with 2147 additions and 166 deletions
+34 -11
View File
@@ -2,23 +2,46 @@
## Highlighted Issues
### Duplicate versions / Duplicate element registrations / `Custom element not found: advanced-camera-card`
### Legacy dashboard resource detected
If your card appears to not load anymore (but was working previously), you're
seeing the version of the card changing between reloads, or seeing log entries
like:
You still have the old `frigate-hass-card.js` resource registered in your
dashboard (and not `advanced-camera-card.js`). Having both registered causes
duplicate element registration errors and unpredictable behavior. Symptoms
include the card not loading, the version changing between reloads, or log
entries like:
`Failed to execute 'define' on 'CustomElementRegistry': the name "focus-trap" has already been used with this registry window`
Verify that your dashboard resources contain only a single instance of the card
(for HACS users, you should see only `/hacsfiles/advanced-camera-card/`. If you
_also_ see `/hacsfiles/frigate-card/`, remove it, clear your caches and reload).
To fix:
Steps:
1. Edit your dashboard (click the three-dot menu in the top right) and select
**Manage Resources**.
1. Remove any entry referring to `frigate-hass-card`. You should only have a
single entry for `advanced-camera-card`.
1. Optionally, delete the `frigate-hass-card` directory on your filesystem if
present (e.g. `$HA_PATH/www/community/frigate-hass-card`), as long as an
`advanced-camera-card` directory exists there too.
1. Clear your browser cache and reload.
1. Edit your dashboard -> (Three dots menu) -> `Manage Resources`. Remove any line item that refers to `frigate-hass-card`. You should only have a single row entry for `advanced-camera-card`.
1. [Optionally] You can delete the frigate-hass-card directory on your filesystem if present, e.g. `$HA_PATH/www/community/frigate-hass-card`, as long as it has an `advanced-camera-card` directory there too.
1. Clear all your caches.
If you are an admin user and the card detects both resources are registered, an
alert icon will appear in the status bar -- clicking it will display a
notification with a button to automatically remove the legacy resource.
### Configuration upgrade available
If you see a notification that a configuration upgrade is available, it means
your card configuration uses an older format that can be automatically updated.
To upgrade:
1. Open your Home Assistant dashboard.
1. Click the pencil icon to enter edit mode.
1. Click the three-dot menu on your card and choose **Edit**.
1. In the card editor, click the **Automatic Upgrade** button at the top.
1. Review the changes and save.
If the automatic upgrade button is not visible, your configuration may already
be up to date. Try clearing your browser cache and reloading.
### Stream does not load