Commit Graph
2489 Commits
Author SHA1 Message Date
Dermot Duffy 16ca8d79d2 fix: Log problems to the console as warnings (once) (#2414) 2026-06-30 17:45:12 -07:00
Dermot DuffyandYannik Lieblinger 3f5a35c7f6 fix: prevent infinite resize loop in media grid Masonry layout (#2413)
- Credit to @lieblinger.

---------

Co-authored-by: Yannik Lieblinger <yannik@lieblinger.de>
2026-06-30 17:44:49 -07:00
Dermot Duffy ab683df5e8 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.
2026-03-13 20:00:59 -07:00
Dermot Duffy 95faddd9a0 fix: Add support for Reolink number based zooming (#2408)
- Closes #2034
2026-03-13 19:55:27 -07:00
Dermot Duffy ebe6b2f8c6 fix: Status actions should not be clickable when status bar is hidden (#2406) 2026-03-08 21:00:54 -07:00
Dermot Duffy ae90b1ec1f chore: Merge main changes into dev (no-op) (#2405) 2026-03-08 20:47:06 -07:00
Felipe Santosanddermotduffy ee23cb2b9d fix: automations on microphone connect not working (#2403)
- Closes #2314

I used GPT-5.4 to investigate and generate this fix. I'm not sure if the
code is good, but I can confirm it works.

---------

Co-authored-by: dermotduffy <dermot.duffy@gmail.com>
2026-03-08 20:36:47 -07:00
Miguel Angel Nublaanddermotduffy 4fceade37c perf(grid): improve layout responsiveness and remove selection transitions (#2400)
This PR addresses performance issues in the media grid by disabling
resource-intensive CSS transitions and ensuring immediate layout
updates. Previously, the default `0.2s` transition duration for grid
reshuffling was causing browser overloads on devices with multiple live
video viewers, leading to stuttering and occasionally missing
short-lived video events.

## Changes

### 1. Disable Masonry Transitions
- Set `transitionDuration` to `0` in the Masonry configuration to
eliminate CSS-driven animations during layout.
- Set `stagger` to `0` to ensure all items move simultaneously and
instantly.
- Set `resize` to `false` in the Masonry config, as window resizing is
already efficiently handled by the controller's `ResizeObserver`.

### 2. Immediate Layout Updates
- Introduced a `_forceLayout()` method in `MediaGridController` that:
- Cancels any pending throttled layout calls to avoid redundant work.
- Triggers a browser reflow via `getBoundingClientRect()` to ensure all
element dimensions are synchronized before the next draw.
    - Forces an immediate Masonry layout.
- Integrated `_forceLayout()` into `selectCell()` and `unselectAll()` to
guarantee the grid updates at the exact moment a user interacts with it.

### 3. Test Alignment
- Updated `tests/components-lib/media-grid-controller.test.ts` to
reflect the changes.

## Performance Impact
By eliminating timed transitions, we significantly reduce the peak CPU
and GPU load during grid selection changes. This results in a much
snappier UI where video viewers snap into position instantly, preventing
the "shuttering" effect and ensuring that time-critical video playback
is not interrupted by heavy animation cycles.

---------

Co-authored-by: dermotduffy <dermot.duffy@gmail.com>
2026-03-08 20:35:52 -07:00
Dermot Duffy ae8b1134c9 fix: Don't show presets menu when there's a single preset (#2404)
- Closes: #2398
2026-03-08 12:55:01 -07:00
Dermot Duffy 6c46e36a87 docs: Improve doc interlinking (#2402) 2026-03-07 21:35:27 -08:00
Dermot Duffy 24c6b98948 feat: Allow user generated notifications (#2401) 2026-03-07 20:47:24 -08:00
Dermot Duffy 1d81e03b04 fix: Should faithfully use WebRTC card PTZ format data_* (#2396)
- Closes: #2385


BREAKING CHANGE: Requires configuration change (automatic upgrade
offered) to move from (e.g.) `data_left_stop` to `data_end_left`
2026-03-07 10:00:39 -08:00
Miguel Angel Nublaanddermotduffy a81d72375d fix(connection): re-initialize camera managers and event subscriptions on reconnect (#2389)
This PR fixes an issue where, after running the card for a few hours,
new events (such as thumbnails and triggers) would stop showing up.

This bug was caused by the Home Assistant connection dropping and
reconnecting in the background. Event subscriptions (such as Frigate
WebSocket events established via `hass.connection.subscribeMessage`) are
bound to the connection they were created on. When the connection drops,
those subscriptions are lost, and until now, they were not being
automatically recreated when the connection was restored.

This PR ensures that when a restored connection is detected, the card
properly re-initializes the camera and view components to re-establish
these background subscriptions.

1. HA Connection Reconnect Handling (`HASSManager`)
- Added logic to detect when the Home Assistant connection transitions
from disconnected back to connected.
- When restored, the card uninitializes the `CAMERAS`, `VIEW`, and
`INITIAL_TRIGGER` initialization aspects.
- This forces the system to recreate the camera managers and
re-subscribe to the relevant WebSocket event feeds in the next render
cycle, fixing the broken thumbnail/trigger feeds.

2. Centralized Camera Teardown (`InitializationManager`)
- Improved the teardown logic by moving the
`this._api.getCameraManager().destroy()` call directly into
`InitializationManager.uninitialize` when the `CAMERAS` aspect is
targeted.
- Removed duplicate `destroy()` calls scattered across `ConfigManager`
and `CardElementManager`.
- This ensures that whenever cameras are forced to re-initialize (such
as during a reconnection event), the old manager is safely destroyed in
a centralized, predictable way without memory leaks.

3. Testing
- Added tests in `hass-manager.test.ts` to verify the uninitialization
logic fires during a reconnection event.
- Updated `initialization-manager.test.ts` to verify that
`CameraManager.destroy()` is automatically called when uninitializing
cameras.

---------

Co-authored-by: dermotduffy <dermot.duffy@gmail.com>
2026-03-06 20:35:15 -08:00
Dermot Duffy 8223cae501 fix: Button style issue introduced by HA 2026.3 (#2392) (#2394)
- Closes: #2390
2026-03-06 07:39:32 -08:00
Dermot Duffy d5b40254b4 chore: Minor formatting and AI instructions update (#2393) 2026-03-06 07:28:37 -08:00
Dermot Duffy c398562d40 feat: Add PIP (Picture-in-Picture) support (#2391)
- Closes: #1657
2026-03-05 20:19:20 -08:00
Dermot Duffy ecc8ecfd7e fix: Change the not condition to exactly match the HA not condition (#2387)
BREAKING CHANGE: Changes the behavior of the `not` condition when there
is more than one condition present. Users who desire the previous
behavior should wrap their conditions in an `and` first.

 - Closes: #2383
2026-03-01 20:39:03 -08:00
Dermot Duffy 526acf7688 docs: Various small documentation improvements (#2386) 2026-03-01 20:23:59 -08:00
Dermot Duffy db0a747729 docs: Various minor doc improvements (#2384) 2026-03-01 14:49:01 -08:00
Dermot Duffy 37004f91fa chore: Improve AI instructions (#2381) 2026-02-28 21:16:12 -08:00
Dermot Duffy 9ac7fa3383 docs: Improve clarity of labels and zones parameters (#2380) 2026-02-28 20:55:28 -08:00
Dermot Duffy 5dc5e45631 chore: Update vscode task to kill previous instance (#2379) 2026-02-28 20:45:28 -08:00
Dermot Duffy ea86ad0016 feat: Implement support for gesture-based PTZ control (#2378)
- Closes: #1839
2026-02-28 20:36:53 -08:00
Dermot Duffy 40ad3b4460 fix: Issue with height not adjusting (downwards) to aspect ratio (#2375)
- Closes #2341
2026-02-23 19:54:43 -08:00
Dermot Duffy 753cf02d90 docs: Add special case warning for fullscreen condition (#2373) 2026-02-23 18:59:41 -08:00
Dermot Duffy d5e1e02328 fix: Add editor support for go2rtc metadata fetch timeout (#2372) 2026-02-22 19:39:55 -08:00
Dermot Duffy dd25e191ce fix: Propagate review filtered status (#2370) 2026-02-22 15:50:20 -08:00
Dermot Duffy 191b5a289a chore: Create initial Claude permissions (#2369) 2026-02-22 15:13:59 -08:00
Dermot Duffy 497e6e88a0 perf: Variety of small type and performance fixes (#2367) 2026-02-22 15:02:14 -08:00
dermotduffy 0f8c758d38 chore: Add AI instructions. 2026-02-21 20:39:15 -08:00
Dermot Duffy 87a85ce8d9 fix: Add missing capabilities to editor (#2366) 2026-02-21 19:58:15 -08:00
Dermot Duffy 5e867a8334 docs: Include reviews in examples update (#2365) 2026-02-21 16:26:02 -08:00
dermotduffy 615209fbde Merge branch 'main' into dev 2026-02-21 11:28:58 -08:00
Stefan KempingerandDermot Duffy 3eca6b790a docs: Clarify recorded clips button visibility in the Responding to fullscreen example (#2325)
Added capability "clips" to get button visibility for recorded clips
when using the `Responding to fullscreen` example.


This example is almost exactly my use case, but i spent quite some time
to find out exactly why the example killed my ability to watch recorded
clips.

---------

Co-authored-by: Dermot Duffy <dermot.duffy@gmail.com>
2026-02-21 11:25:03 -08:00
Dermot Duffy 504b027854 fix: Fix off-by-one thumbnail for folder media (#2364)
- Closes:
https://github.com/dermotduffy/advanced-camera-card/issues/2326
2026-02-21 11:17:07 -08:00
Dermot Duffy df3614f793 fix: Various editor / diagnostic improvements (#2363)
- Closes: #2360 
 - Closes: #2328
2026-02-21 09:31:10 -08:00
Dermot Duffy 6d5a76ac0a feat: Add documentation links from editor (#2362) 2026-02-20 10:07:38 -08:00
Dermot Duffy 46868ce08e perf: Various rendering performance improvements (#2359) 2026-02-19 21:25:33 -08:00
Dermot Duffy 0a67df9a25 refactor: Convert protected methods to private (#2358) 2026-02-19 20:47:59 -08:00
Dermot Duffy 529500ed94 refactor: Migrate config schema from Zod v3 to Zod v4 (#2357) 2026-02-18 21:47:43 -08:00
Dermot Duffy a15376602f feat: Allow 2-way audio detection to be skipped and timed (#2355)
- For #2313
2026-02-16 19:47:56 -08:00
dermotduffy f34c7e8ee1 Merge branch 'main' into dev 2026-02-16 15:01:17 -08:00
Dermot Duffy d90b062719 chore: Add support for next release branch (#2354) 2026-02-16 15:00:49 -08:00
Dermot Duffy 3ecd7eba3b chore: Add support for next release branch (#2354) 2026-02-16 14:58:19 -08:00
Dermot Duffy 7dbf058ab2 fix: Seek to the start of review media (#2353) 2026-02-16 14:52:11 -08:00
Dermot Duffy 282983cbba fix: Fix styling and severity in status bar (#2352) 2026-02-16 13:57:45 -08:00
Dermot Duffy 47880e4306 feat: Add ability to untrigger after fixed number of seconds (#2350)
- Related: #2342 


BREAKING CHANGE: Renames: `untrigger_seconds` to
`untrigger_delay_seconds`
2026-02-16 12:25:56 -08:00
dermotduffy 584521c78e Merge branch 'main' into dev 2026-02-15 19:28:38 -08:00
Dermot Duffy b1467dc4bd fix: Improve state handling to avoid stuck triggered cameras (#2348)
- Related:
https://github.com/dermotduffy/advanced-camera-card/issues/2342
2026-02-15 19:26:56 -08:00
Dermot Duffy c297bf801a test: Clarify testing configuration (#2347) 2026-02-14 14:55:17 -08:00