Repository navigation
Hide a watch complication while the display is dimmed - #6079
Open
ViktorBarzin wants to merge 2 commits into
Open
ViktorBarzin wants to merge 2 commits into
ViktorBarzin wants to merge 2 commits into
Conversation
Adds a "Show when inactive" toggle to the complication builder's Customize sheet. When it is off, the complication shows the Home Assistant logo while the watch display is dimmed (wrist down, Always On) instead of its value. The setting already existed in the data model and is synced to the watch; nothing read it or let the user change it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
ViktorBarzin
marked this pull request as ready for review
October 16, 2026 13:41
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Privacy-sensitive behavior still needs validation on an Always On watch during wrist-down and wrist-up transitions.
1 open finding
What changed in this PR
Adds a “Show when inactive” setting to watch complications, using the existing stored preference to hide content while the Always On display is dimmed.
Changes:
- Adds a configuration toggle and explanatory text.
- Substitutes a privacy placeholder while dimmed, preserving the tap destination.
- Adds binding and light/dark snapshot tests.
| File | Description |
|---|---|
| Tests/App/Watch/WatchComplicationConfigurationSheetDimmedDisplay.test.swift | Tests toggle defaults, updates, and appearance. |
| Sources/WatchWidgets/WatchWidgetsEntryView.swift | Selects displayed content based on luminance. |
| Sources/WatchWidgets/WatchWidgetComplicationSnapshot.swift | Resolves the dimmed-display placeholder. |
| Sources/Shared/Resources/Swiftgen/Strings.swift | Adds the generated footer accessor. |
| Sources/App/Settings/AppleWatch/Complications/WatchComplicationConfigurationSheet.swift | Adds the toggle and binding. |
| Sources/App/Resources/en.lproj/Localizable.strings | Adds explanatory footer text. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /// Whether the complication keeps its content on the face while the watch display is dimmed (wrist | ||
| /// down, Always On). Global rather than per size, like the colors: it is a privacy choice about the | ||
| /// complication itself, so it sits after the per-size sections. Internal for its tests. | ||
| var dimmedDisplaySection: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

AI Policy
Select exactly one option that describes AI usage in this contribution:
Summary
Adds a Show when inactive toggle to the watch complication builder's Customize sheet. When it is off, the complication shows the Home Assistant logo while the watch display is dimmed (wrist down on an Always On watch) and its value again once the wrist is raised. I use it for a complication showing a value I don't want readable on my wrist at a glance.
Most of this was already in place:
WatchComplicationConfig.showWhenInactiveis stored, migrated and synced to the watch,WatchWidgetComplicationSnapshotcarries it, andWatchWidgetsEntryViewdocuments a "dimmed-display privacy placeholder". Nothing read the value and there was no way to set it. This change:nil, which still reads as shown, so nothing changes for existing complications.WatchWidgetsEntryViewreadsisLuminanceReducedand, when the display is dimmed and the complication is set not to show then, renders the built-in placeholder (the logo in circular, corner and rectangular, "Home Assistant" inline). The widget URL stays the real complication's.Tests: a unit test for the toggle's binding (including the
nildefault) and a light/dark snapshot of the new section. The watch-side switch lives in the widget extension, which no unit-test target builds.Screenshots
The new section at the end of the Customize sheet, from the recorded snapshot test:
I don't have a watch-face capture of the dimmed state yet; I'll add one from TestFlight.
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#1453
Any other notes
The full CI run (build, unit tests including the new snapshots, lint, patch coverage) passed on my fork before opening this.