Skip to content

feat(options): allow overriding outgoing video from pairing QR - #175

Queued
andreacasarin wants to merge 2 commits into
ha-vimar:mainfrom
andreacasarin:feat/video-enabled-option
Queued

andreacasarin wants to merge 2 commits into
ha-vimar:mainfrom
andreacasarin:feat/video-enabled-option

Conversation

@andreacasarin

Copy link
Copy Markdown
Contributor

What and why

On the Tab 7S Up reported in #172, View outside connected with working audio but the card waited indefinitely for video and Home Assistant Stream reported Stream has no video. The stored QR-derived video_enabled value was false, so outgoing offers omitted video. Changing only that stored value to true and restarting restored outdoor video.

Expose Enable video in outgoing calls in the Settings options form. Its initial value follows the pairing QR (or true for entries without the field); saved options take precedence through the existing entry setup and reload path. Preserve the existing value when a submission omits the field, and retain the submitted choice when validation fails. Incoming calls still mirror the peer's media offer.

This does not redefine the QR field's meaning or enable video unconditionally on audio-only entrances. The original decoded QR field has not been independently inspected on the reported device.

Related: #172. Independent of the other compatibility follow-up PRs.

Tested on

  • Elvox Tab 7S Up 40517, SW 2.1.0203, FW 1.06, HW 00-02, cloud TLS, Home Assistant Container: owner verified outdoor video after the equivalent stored-data change; the new options UI has not been deployed on this hardware.

  • Nine regression cases cover defaults, both override directions, saved SDP offers, preservation of unrelated options and omitted values, and validation-error redisplay. Eight fail against the original options flow; all pass with this change.

  • Full default suite: 2,185 passed, 1 skipped, 204 deselected; line and branch coverage 95.87%.

  • ruff check ., compileall, diff whitespace checks and PR changelog validation pass.

Docs

Docs: docs/CONFIGURATION.md and docs/CONFIGURATION.it.md; English and Italian UI strings synchronized.

Changelog

Changelog: Enhancements - Enable or disable video in outgoing intercom calls from Settings, including when the pairing QR initially disables it.

@lollox80

Copy link
Copy Markdown
Collaborator

Thanks @andreacasarin, another clear one. The diagnosis checks out: if video_enabled from the QR is false, our outgoing offer carries no video, so "View outside" connects with audio only and Stream reports Stream has no video. A setting that starts from the QR value and lets the owner override it is the right shape. Keeping incoming calls on the panel's own offer is right too.

Thanks again for following this up so thoroughly.

@Apeiv

Apeiv commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

LGTM. Default follows the QR, the saved option wins through the {**entry.data, **entry.options} merge into runtime.configure, and the update listener reloads, so the new SDP applies without a restart. The form default at options_flow.py:202 reads the current value, so existing entries don't get video flipped on their first save. Tests pass here, alone and merged with the other three.

@andreacasarin

andreacasarin commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Tested on a 40517, Home Assistant 2026.8.3 Container, with all four PRs installed together.

Verified option precedence: stored pairing data has video_enabled=False, saved option=True, and effective value=True. Outdoor video works. Disabling the option produces the expected no-video view; re-enabling it restores video (OFF → ON).

Screenshot 2026-10-13 at 14 28 22 Screenshot 2026-10-13 at 14 28 53 Screenshot 2026-10-13 at 14 29 29 Screenshot 2026-10-13 at 14 29 43 Screenshot 2026-10-13 at 14 29 54

Copy link
Copy Markdown
Collaborator

Reviewed: the option reaches runtime.configure({**entry.data, **entry.options}) → R.VIDEO_ENABLED → sdp._offered_kinds(), which only applies when we build the offer, so incoming calls keep mirroring the panel. The default follows the stored QR value, so nothing changes for existing entries unless the user saves a different choice; no "Before you update" needed. Tests cover both override directions, omitted field and validation-error redisplay, and your 40517 test confirms OFF → ON. Thanks!

One non-blocking nit: "video_enabled" is written as a literal in three places of options_flow.py; a KEY_VIDEO_ENABLED constant would match the other options, but qr_decoder already uses the literal, so fine to leave.

Merge order for 1.0.23: #171 → #174 → #173 → #175; I'll merge main into the later branches as we go.


Generated by Claude Code

Resolve the conflict in tests/test_config_flow_steps.py by keeping both
sides: the outgoing video option tests and the internal panel and import
summary tests from ha-vimar#173 and ha-vimar#174.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XMtKjPuZNEaX23BpL9AsaA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants