Commit Graph
129 Commits
Author SHA1 Message Date
Dermot Duffy f397596ed1 feat: Explicit answer/reject for inbound calls (#2504) 2026-06-30 17:45:13 -07:00
Dermot Duffy f18e4cd4b8 refactor: Unify substream actions into substream_{on,off} (#2497)
## Summary

- Collapse `live_substream_{on,off,select}` into a unified
`substream_{on,off}` pair, symmetric with `call_{start,end}`.
- Rename the `camera` field on the former `live_substream_select` to
`stream` (it always was a stream ID).
- Add optional `camera` field to both new actions for targeting a
non-selected base camera.
- YAML configs are migrated automatically; URL bookmarks must be updated
by hand.

## Migration

### Cycling between camera and substream (toggle button)

Before:
```yaml
tap_action:
  action: custom:advanced-camera-card-action
  advanced_camera_card_action: live_substream_on
```

After:
```yaml
tap_action:
  action: custom:advanced-camera-card-action
  advanced_camera_card_action: substream_on
```

### Selecting a specific substream

Before:
```yaml
tap_action:
  action: custom:advanced-camera-card-action
  advanced_camera_card_action: live_substream_select
  camera: camera.front_door_hd
```

After:
```yaml
tap_action:
  action: custom:advanced-camera-card-action
  advanced_camera_card_action: substream_on
  stream: camera.front_door_hd
```

### Turning the substream off

Before:
```yaml
tap_action:
  action: custom:advanced-camera-card-action
  advanced_camera_card_action: live_substream_off
```

After:
```yaml
tap_action:
  action: custom:advanced-camera-card-action
  advanced_camera_card_action: substream_off
```

### URL querystrings (manual update required)

| Before | After |
| --- | --- |
|
`?advanced-camera-card-action.live_substream_select=camera.front_door_hd`
| `?advanced-camera-card-action.substream_on=camera.front_door_hd` |
2026-06-30 17:45:13 -07:00
Dermot Duffy 15e335a647 feat: Add support for inbound "calls" from triggers (#2500) 2026-06-30 17:45:13 -07:00
Dermot Duffy abcba884e5 feat: Add 'call' support to improve 2-way audio experience (#2486)
Draws significant inspiration (and direct styling) from
https://github.com/dermotduffy/advanced-camera-card/pull/2447 . Thank
you @Maudfer !

BREAKING CHANGE:

The microphone condition previously bundled two unrelated signals —
whether a two-way-audio session was connected and whether the microphone
was muted. Connection state is now its own dedicated call condition, and
microphone is reserved purely for mute state. Configs are upgraded
automatically (the card rewrites affected conditions under overrides,
elements, and automations). If you maintain config by hand, convert as
follows:

If you only used connected:

# Before
```yaml
condition: microphone
connected: true
```

# After
```yaml
condition: call
call: true
```
If you used both connected and muted — they must be split into two
conditions, since they no longer live together:

# Before
```yaml
condition: microphone
connected: true
muted: false
```

# After
```yaml
condition: and
conditions:
  - condition: call
    call: true
  - condition: microphone
    muted: false
```
2026-06-30 17:45:13 -07:00
Dermot Duffy be7e7d79dc feat: Add UI optional UI locking when microphone is hot (#2484) 2026-06-30 17:45:12 -07:00
Dermot Duffy bc366626f1 refactor: Refactor media loading manager for improved robustness (#2464) 2026-06-30 17:45:12 -07:00
Dermot Duffy 47bcce93d3 feat: Add hardened error handling and retries (#2451)
- Closes #1830
 - Closes #2099
2026-06-30 17:45:12 -07:00
Dermot Duffy 1cd5520154 feat: Add proxying support for images (#2427)
- Closes #2418
2026-06-30 17:45:12 -07:00
Dermot Duffy 16ca8d79d2 fix: Log problems to the console as warnings (once) (#2414) 2026-06-30 17:45:12 -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
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
Dermot Duffy 24c6b98948 feat: Allow user generated notifications (#2401) 2026-03-07 20:47:24 -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 c398562d40 feat: Add PIP (Picture-in-Picture) support (#2391)
- Closes: #1657
2026-03-05 20:19:20 -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 497e6e88a0 perf: Variety of small type and performance fixes (#2367) 2026-02-22 15:02:14 -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 529500ed94 refactor: Migrate config schema from Zod v3 to Zod v4 (#2357) 2026-02-18 21:47:43 -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 93f1f08e51 feat: Make cameras optional (#2343) 2026-02-13 20:21:05 -08:00
Dermot Duffy 21f9469784 fix: Expose gallery and media views as media type agnostic (#2335) 2026-02-08 08:04:11 -08:00
Dermot Duffy f4e905a7fb fix: Improve review media filtering (#2322) 2026-01-24 16:22:12 -08:00
Dermot Duffy fc32727860 feat: Add support for Frigate reviews / detections [initial PR] (#2315)
- Add support for Frigate reviews / detections.
 - Add support for GenAI metadata.
- Significant internal refactor to more flexible "UnifiedQuery" to allow
mixing cameras with simple metadata and review metadata (e.g. a timeline
view of a Frigate camera with reviews, and a Reolink camera with simple
metadata).
 - Add support for folder media as camera media.

There are a few more PRs to commit prior to this going live, but
commiting this for now due to the scale of the change.

BREAKING CHANGE: `media_type` and `events_type` are retired under
`live`, `viewer` and `timeline` configuration sections, instead media
type is associated (once) with the camera under `media`.
2026-01-19 13:32:50 -08:00
phill b7ac8532cd fix: remote_control cannot be overridden (#2297)
### Problem
When configuration overrides are removed or changed for
`remote_control`, the automations previously registered by the card were
not updated, causing stale automations to remain active.

### Fix
Re-run the remote-control and automations loaders when the effective
configuration changes due to overrides so that automation
additions/removals reflect the current config.

#### What changed
- Modified: config-manager.ts
- Call `setKeyboardShortcutsFromConfig(this._api)`,
`setRemoteControlEntityFromConfig(this._api)` and
`setAutomationsFromConfig(this._api)` inside `_processOverrideConfig()`.
- Modified: `config-manager.test.ts`
- Added ConfigManager for test setup with real AutomationsManager and
ConditionStateManager
    - Added test constants to centralize test data
    - Expanded test coverage for override conditions:
        - loaders should re-run when overrides change 
        - remote-control loader with overrides

#### Testing
- Full test suite run locally: 229 files, 2852 tests — all passing (with
TZ forced to 'UTC') ✅
2025-12-27 12:42:43 -08:00
Dermot Duffy de42a1652f feat: Add support for overriding card border radius (#2298)
- Closes #2287


[skip ci]
2025-12-20 17:00:04 -08:00
Dermot Duffy f64690335b test: Improve timezone resilience / cleanliness of tests (#2279)
- Related: https://github.com/dermotduffy/advanced-camera-card/pull/2278
- Reported by @0x464e
2025-12-11 05:33:48 -08:00
Dermot Duffy 639c5c3e4b fix: Fix z-index rendering issue when card is expanded (#2274)
- Closes #2155
2025-12-09 23:45:07 -08:00
Dermot Duffy c9c7e93e19 fix: Ignore URL actions for other card IDs (#2272)
- Closes #2190
2025-12-09 20:22:22 -08:00
Dermot Duffy f8138c2377 fix: Race condition in remote control entity handling (#2267)
- Related #2244
2025-12-08 20:55:06 -08:00
Dermot Duffy a241e02594 fix: Touch gestures should count as card interactions (#2265)
- Closes: #2245
2025-12-08 18:43:28 -08:00
Dermot Duffy 3279481b0e feat: Add festive visual effects (#2252)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Introduces an effects system (fireworks, ghost, hearts, shamrocks,
snow), a new `effect` action, and optional date-based loading effects,
integrated into the card with docs, schema, editor, and tests.
> 
> - **Effects System**:
> - Add `EffectsController` and `advanced-camera-card-effects` host with
lazy-loaded effect modules (`fireworks`, `ghost`, `hearts`, `shamrocks`,
`snow`).
> - New base effect component with fade-in/out; SCSS and z-index
updates.
> - **Actions**:
> - New custom action `advanced_camera_card_action: effect` with
`effect_action` (`start`|`stop`|`toggle`).
>   - Wire into `ActionFactory` and add `EffectAction` executor.
> - **Card Integration**:
> - Mount effects host in `advanced-camera-card` and expose
`getEffectsControllerAPI()` via `CardController`.
> - Loading component can trigger date-based effects (e.g., New Year
fireworks) when enabled.
> - **Configuration & Editor**:
> - Add `performance.features.card_loading_effects` (default `true`)
alongside `card_loading_indicator`.
> - Update schemas, defaults, low-performance profile (disables
effects), and editor toggles.
> - **Docs & Examples**:
>   - Document `effect` action parameters and add menu example.
>   - Update performance docs with new option.
> - **Localization & Tests**:
>   - Update i18n strings for new performance option.
> - Add comprehensive tests for effects controller, action, factory,
config defaults/profiles, and utilities.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
cffd4304fe3bd22340316f9cec53e341379b1756. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-12-06 18:21:44 -08:00
Dermot Duffy 993e288c14 fix: Preserve parsers/matches on folder navigation (#2249)
- Closes #2231
2025-11-26 10:00:34 -08:00
Dermot DuffyandFelipe Santos 1f41781a84 feat: Add custom reload action to reload dashboard (#2217)
- Closes: #2215

---------

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
2025-10-14 07:37:50 -07:00
Dermot Duffy 7edaac079e fix: Timeline should should show folder media even without camera support (#2216)
- Closes #2205
2025-10-13 21:15:32 -07:00
Dermot Duffy 78dee9194f feat: Add timeline support for folder media (#2197)
- Closes #2106
2025-10-04 15:47:39 -07:00
Dermot Duffy 3b4752b257 feat: Triggers should fire on startup if entities are in an active state (#2095)
- Closes: #2087
2025-06-08 16:01:26 -07:00
Dermot Duffy f5918738e4 fix: Allow multiple date parsers to apply at the same folder hierarchy level (#2090)
- For: #1748
2025-06-06 14:30:55 -07:00
Dermot Duffy 956a2e523c feat: Add folder view to view folder media (#2077)
- Closes: #2068

Note: Renames existing `folder` view to `folders` [experimental
functionality]
2025-05-31 17:13:39 -07:00
Dermot Duffy c55a0f00fd feat: Allow matching of folders based on parsed date (#2074)
- For: #1748
2025-05-31 14:12:09 -07:00
Dermot Duffy dc63dcdab9 feat: Add or and template folder media matchers (#2071)
- For: #1748
2025-05-29 21:21:59 -07:00
Dermot Duffy c077f8bf70 feat: Add folder title matching and parsing (#2067)
This is a breaking change for users of the [experimental 'folder'
functionality](https://card.camera/#/configuration/folders).

Related: #1748
2025-05-27 07:50:51 -07:00
Dermot Duffy c4400194f5 fix: Allow multiple overrides to operate independently (#2063)
- Closes #1954
2025-05-24 16:14:09 -07:00
Dermot Duffy b97e1358d0 fix: Fix issue with media view incorrectly rejecting cameras (#2061)
For issue: #1748
2025-05-23 20:02:13 -07:00
Dermot Duffy c6a4c8aea2 feat: Implement basic general folder support (#2051)
- Related: #1748
2025-05-21 19:59:21 -07:00
Dermot Duffy e7a9e20c9e feat: Add support for template conditions (#1995)
- Closes:  #1988
2025-04-05 22:25:46 +01:00
Dermot Duffy b5eee5878a feat: Add out of the box support for Reolink PTZ (#1982)
- Closes: #1964
2025-03-26 21:26:02 -07:00
Dermot Duffy f6bb8001e3 fix: Allow entity to take remote control priority (#1981)
- Closes: #1958


[skip ci]
2025-03-24 18:24:56 -07:00