## Summary
- add optional microphone constraints for echo cancellation, noise
suppression, automatic gain control, and channel count
- request configured values as non-mandatory `ideal` constraints
- expose privacy-safe microphone capabilities, requested constraints,
and applied settings in card diagnostics
- document the new configuration and add schema, microphone manager, and
diagnostics tests
## Motivation
The card currently calls `getUserMedia()` with `audio: true`. This
leaves echo cancellation, noise suppression, automatic gain control, and
channel count implicit.
Browser and device behavior differs. Explicit processing defaults can
regress microphone gain or amplify noise on some devices. This change
therefore keeps all processing constraints optional and configurable.
## Configuration
```yaml
live:
microphone:
constraints:
echo_cancellation: true
noise_suppression: true
auto_gain_control: false
channel_count: 1
```
Configured values use `ideal` constraints. A browser can ignore
unsupported values. Card diagnostics show the browser capabilities, the
requested constraints, and the reported applied settings.
## Backward compatibility
- existing configurations still use `audio: true`
- no audio-processing defaults are added
- explicit `false` values are preserved
- diagnostic output excludes device and group identifiers
## Validation
- focused microphone, schema, and diagnostics tests: 46 passed
- full test suite: 7,177 passed
- lint passed
- format check passed
- typecheck passed
- unused-code check passed
- production build passed
The optional constraints were also tested successfully with an iOS Home
Assistant Companion client and a go2rtc-based full-duplex intercom. This
is a client microphone-processing change only. It does not add backend
audio denoise.
---------
Co-authored-by: dermotduffy <dermot.duffy@gmail.com>
Configuration
The card supports a myriad of configuration options for simple or complex setups.
Absolute minimum configuration
type: custom:advanced-camera-card
Minimal camera configuration
type: custom:advanced-camera-card
cameras:
- camera_entity: camera.office
Minimal folder configuration
type: custom:advanced-camera-card
folders:
- type: ha
Configuration blocks
Top-level configuration blocks
No top-level option is required. If cameras is omitted the card will still
render and can operate in image or folders views depending on configuration.
| Option | Description |
|---|---|
automations |
Take action when conditions are met. |
cameras |
Configures the cameras to be used in the card. Optional. If present, the first listed camera is the default. |
cameras_global |
Global defaults that apply to all cameras from the cameras section. |
card_id |
An optional ID to uniquely identify this card. For use when actions are being sent to card(s) via URL actions. Must exclusively consist of these characters: [a-zA-Z0-9_]. |
dimensions |
Configures the overall card dimensions. |
editor |
Configures the visual card editor. |
elements |
Add custom elements to the card. |
folders |
Configures folders to be used in the card. Optional. If present, the first listed folder is the default. |
image |
Configures the image view. |
live |
Configures the live view. |
media_gallery |
Configures the media gallery. |
media_viewer |
Configures the media viewer. |
menu |
Configures the card menu. |
overrides |
Override card configuration when conditions are met. |
performance |
Configures the card performance. |
profiles |
Apply pre-configured sets of defaults to ease card configuration. |
remote_control |
Configures how a card instance can be remotely controlled. |
status_bar |
Configures the card status bar. |
timeline |
Configures the timeline view. |
view |
Configures the default view and behavior of the card. |
Common configuration blocks
| Option | Description |
|---|---|
actions |
Configure actions. |
conditions |
Configure conditions. |