Commit Graph

1471 Commits

Author SHA1 Message Date
github-actions[bot]
a7da7e462e Update Localized Strings (#4637)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
2026-05-19 11:05:22 +02:00
Bruno Pantaleão Gonçalves
bc230f5134 Revert "Fix legacy iOS WebView safe areas" (#4636)
Reverts home-assistant/iOS#4632
2026-05-13 20:59:44 +00:00
Bruno Pantaleão Gonçalves
0b5880b31d Add "Assist prompt" option for CarPlay quick access (#4619) 2026-05-13 13:01:06 -03:00
github-actions[bot]
3ed4ddde32 Update Localized Strings (#4630)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
Co-authored-by: Bruno Pantaleão Gonçalves <5808343+bgoncal@users.noreply.github.com>
2026-05-13 10:54:18 -03:00
Bruno Pantaleão Gonçalves
54670a1690 Add DebugSwift via SwiftPM (#4633)
## Summary
- Add DebugSwift as a Swift Package dependency pinned through
`Package.resolved` at 1.15.0
- Link the DebugSwift product to the App target
- Initialize DebugSwift during app launch for Debug builds only
2026-05-13 09:57:00 -03:00
Bruno Pantaleão Gonçalves
58ea0a0ef8 Fix legacy iOS WebView safe areas (#4632)
## Summary
- fix oversized native status-bar spacing on iOS 15 by sizing the spacer
from the window scene status bar frame
- provide app-owned CSS safe-area variables to the frontend on iOS
versions prior to 16
- refresh the legacy safe-area values after layout changes, settings
changes, view appearance, and page loads

## Root cause
Issues #4499 and #4631 point to iOS 15 devices reporting inflated
safe-area values after recent WebView/status-bar changes. The frontend
then consumes those values through safe-area CSS variables, and in the
iPad report the native WebView is also laid out below an oversized
status-bar spacer.
2026-05-13 09:23:20 -03:00
Bruno Pantaleão Gonçalves
f1eac4aaf6 Normalize manual server URLs (#4627)
## Summary
- normalize manually entered server URLs by stripping path, query, and
fragment while preserving port and authority
- use the normalized base URL for onboarding auth and for the stored
manual server URL
- add tests covering auth URL construction, discovered manual URLs, and
the shared URL helper

## Root cause
Manual onboarding appended /auth/authorize to the full user-entered URL.
If the user entered a frontend route like /lovelace/0, the auth flow
loaded /lovelace/0/auth/authorize and never reached the expected
callback.
2026-05-13 09:15:23 -03:00
Bruno Pantaleão Gonçalves
797e1018c5 Log silent guard exits in custom widget AppIntents (#4629)
## Summary

Custom widget AppIntents
(`CustomWidgetToggle/Activate/PressButton/UpdateWidgetItemConfirmationStateAppIntent`)
used a single combined `guard` block with a silent `return .result()` on
failure. When a tap bailed out — wrong domain, missing parameters,
server lookup miss, no active URL — nothing was logged anywhere, which
made user reports like
[#4488](https://github.com/home-assistant/iOS/issues/4488) ("widget taps
do nothing on iOS 26.4+") impossible to triage.

Changes:

- Split each guard into separate checks with an `Current.Log.error(...)`
line per failure mode, so the widget-extension log now shows *which*
precondition failed.
- Extract the server/connection lookup into a small
`CustomWidgetIntentHelper.resolveConnection` so the three intents don't
duplicate the same boilerplate.
- When `Current.api(for: server)` returns nil (i.e. `activeURL()` is nil
— server unreachable from this network), dispatch a local notification
("Home Assistant could not be reached…") so the tap no longer silently
does nothing.

No behavior change for the success path. Failure paths still `return
.result()` — they just now leave evidence behind.
2026-05-13 08:59:21 -03:00
github-actions[bot]
d16aaf46f1 Update Localized Strings (#4620)
Automatically created by bgoncal.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
2026-05-12 22:37:06 -03:00
Bruno Pantaleão Gonçalves
ef6ee8ff7f Add cloudhook connection check to server settings (#4626)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-12 21:42:17 -03:00
Bruno Pantaleão Gonçalves
45e05e6666 Add confirmation dialog before executing tag (#4617)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
Before forwarding unknown tags to Home Assistant, present a confirmation
dialog.

Android implementation:
https://github.com/home-assistant/android/pull/6814

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="966" height="1004" alt="CleanShot 2026-05-07 at 15 56 54@2x"
src="https://github.com/user-attachments/assets/b7411e42-c2ec-473b-8241-c3280531737f"
/>


## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-05-08 10:55:40 +02:00
github-actions[bot]
a9c6d322f3 Update Localized Strings (#4614) 2026-05-08 09:02:52 +02:00
github-actions[bot]
b516cb80cf Update Localized Strings (#4610)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
2026-05-06 16:52:52 +00:00
Bruno Pantaleão Gonçalves
b821f58d5e Improve ​Car​Play ​Assist feedback and playback troubleshooting (#4613) 2026-05-06 18:26:34 +02:00
Bruno Pantaleão Gonçalves
bbdcd09309 Allow same mTLS cert for multiple servers (#4603)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
Fixes mTLS client certificate sharing across multiple servers when the
same .p12 / SecIdentity is assigned to more than one server.

- Store imported client certificate identities using a stable SHA-256
fingerprint of the leaf certificate instead of a server-specific
identifier.
- Update duplicate Keychain identity handling so re-importing the same
certificate migrates the existing item to the stable fingerprint-based
label.
- Avoid deleting a shared Keychain identity when removing or replacing a
certificate on one server if another configured server still references
it.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-05-04 11:58:19 +02:00
github-actions[bot]
a99cae49ac Update Localized Strings (#4596)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
2026-05-04 11:28:09 +02:00
Bruno Pantaleão Gonçalves
d77040fa07 Normalize ipv6 URL for host comparison in WKSecurityOrigin (#4602)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
The issue is the new WebView bridge origin check. It compares configured
URL hosts with WKSecurityOrigin.host and IPv6 can appear as fd00::abcd
in one API and [fd00::abcd] in another, so the bridge rejects valid
frontend messages. That blocks external auth and leaves the frontend
loading, while widgets still work.

This PR normalizes the url
## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-05-04 11:17:51 +02:00
Bruno Pantaleão Gonçalves
d3a608918c Improve camera player view gestures (#4592)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-30 17:29:14 +02:00
Bruno Pantaleão Gonçalves
f5f32ef40c Add app icon shortcuts configurator (#4588)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
As part of removing legacy iOS actions from the app completely, this PR
adds a way for the user to choose what to display in app icon long press
menu.
## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="3216" height="1890" alt="CleanShot 2026-04-30 at 11 35
28@2x"
src="https://github.com/user-attachments/assets/4680d7e4-4790-4f21-b4b4-b93f641ce769"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-30 17:26:44 +02:00
Bruno Pantaleão Gonçalves
3fa851512b Fix on-device STT not submitting after transcribing (#4590)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-30 15:29:10 +02:00
Bruno Pantaleão Gonçalves
fb2e82d3e0 [mTLS] Use session-level auth handling and avoid main queue (#4591)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 14:10:51 +02:00
github-actions[bot]
75aab681fe Update Localized Strings (#4580) 2026-04-30 09:32:18 +02:00
Bruno Pantaleão Gonçalves
4fdc06931e Replace Launcher Application.xib with code-based startup (#4577) 2026-04-30 00:07:28 +02:00
Bruno Pantaleão Gonçalves
37b4e7a355 Delete orphaned utilities and unused CarPlay protocol (#4578)
## Summary

Four pieces of dead code with zero inbound references in `Sources/` or
`Tests/`. Verified by `git grep` against `origin/main` after PRs
#4561–#4564 + #4576 landed.

| Item | Lines | Status |
|---|---|---|
| `Sources/App/Utilities/ScaledFont.swift` | 115 | Third-party Keith
Harrison dynamic-type utility, never referenced |
| `Sources/App/Utilities/VoiceShortcutsManager.swift` | 35 | `public
class` wrapping `INVoiceShortcut` lookup, never instantiated |
| `Sources/App/Utilities/InputAccessoryView.swift` | 37 | Custom
`UIView` subclass, never instantiated, no XIB/storyboard `customClass`
reference |
| `EntitiesStateSubscription` protocol in
`Sources/App/Scenes/CarPlaySceneDelegate.swift` | 5 | Declares
`subscribe()`/`unsubscribe()` with no conformers and no callers |

**204 lines deleted across 5 files** (3 source deletions, 1 partial
edit, 1 `project.pbxproj` cleanup). No behavior change.

## Verification

- `git grep` for each type name across `Sources/` and `Tests/` returns
only the file itself + the `project.pbxproj` entry.
- Searched for indirect references: XIB `customClass="X"`,
`NSStringFromClass`, `@objc` selectors, string-based UIKit nib loaders.
None found.
- `plutil -lint` confirms `project.pbxproj` parses.
- `swiftformat` + `rubocop -a` produce zero changes.

## Test plan

- [ ] CI build + tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-29 01:32:21 +00:00
Bruno Pantaleão Gonçalves
1b1289794d Drop Eureka dependency and dead UIKit form code (#4575)
## Summary

Now that PRs #4560–#4564 have migrated every Eureka-based settings
screen to SwiftUI, every remaining Eureka file on `main` is dead code.
This PR removes them, the Eureka pod, and the two Eureka-community
add-on pods.

**Reachability check before deleting:**

- `SettingsRootDataSource.swift` (the legacy Eureka settings root) has
zero inbound references. The active settings root is
`SettingsItem.swift`, which already routes to SwiftUI views
(`NFCListView()`, `ComplicationListView()`, etc.).
- The legacy `*ViewController.swift` files (`NFCListViewController`,
`ComplicationListViewController`, `SettingsDetailViewController`, etc.)
are reachable only from `SettingsRootDataSource` and from each other.
- The Eureka helper-row library (`Sources/App/Settings/Eureka/`) is used
only by those legacy view controllers.
- A handful of doc-comment mentions in active SwiftUI code (e.g. `//
SwiftUI replacement for ButtonRowWithLoading`) are not real references.
- Tests don't import Eureka. `ColorPickerRow` and `ViewRow` (Eureka
community pods) aren't referenced anywhere.

## What's removed

- `Sources/App/Settings/Eureka/` — 14 files (`HAFormViewController`,
helper rows, `AccountInitialsImage`)
- `Sources/App/Settings/MaterialDesignIcons+Eureka.swift` — `SearchItem`
conformance for the now-deleted `SearchPushRow`
- `Sources/App/Settings/SettingsRootDataSource.swift`
- `Sources/App/Settings/Settings/SettingsDetailViewController.swift`
-
`Sources/App/Settings/AppleWatch/Complication{List,FamilySelect,Edit}ViewController.swift`
- `Sources/App/Settings/NFC/NFC{List,Tag}ViewController.swift`
- `Sources/App/Utilities/{SearchPushRow,WebSocketStatusRow}.swift`
- `Eureka`, `ColorPickerRow`, `ViewRow` pods (Podfile + Podfile.lock)
- `import Eureka` from `SettingsSceneDelegate.swift`
- `-framework "Eureka"` from inlined `OTHER_LDFLAGS` in
`project.pbxproj`

24 files deleted, 4 modified. Pure dead-code removal — no behavior
changes.

## Stacked on #4563

This PR targets `claude/eureka-notification-categories-swiftui` (PR
#4563). After #4563 merges, GitHub will auto-rebase the base to `main`.

## Test plan

- [ ] CI lint + test passes
- [ ] Build succeeds with the smaller pod set
- [ ] Manual smoke test: open Settings → NFC, Settings → Complications,
Notifications → Categories — all SwiftUI screens still functional

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-29 02:58:54 +02:00
Bruno Pantaleão Gonçalves
814152e5c3 Migrate Notification category/action editors to SwiftUI (#4563)
## Summary
Migrate the notification category list and the category/action editors
to SwiftUI:
- `NotificationCategoryListView`: local insert/delete, Realm-observed
server categories section, navigation to editor.
- `NotificationCategoryEditorView`: required fields, server-controlled
read-only mode, hidden preview/summary text areas, reorder/insert/delete
action rows, YAML service-call preview, toolbar help,
preview-notification action.
- `NotificationActionEditorView`: required title/identifier, conditional
text-input fields, foreground/destructive/authentication toggles,
server-controlled read-only mode, YAML trigger preview.

Also adds three reusable components:
- `YamlPreviewSection` — replaces Eureka `YamlSection` within this
slice; generalises the inline version previously in `NFCTagView`.
- `NotificationIdentifierField` — SwiftUI text-field helper enforcing
identifier casing/validation (replaces
`NotificationIdentifierEurekaRow`).
- `RealmResultsObserver` — `ObservableObject` wrapping
`AnyRealmCollection` with a notification token (reusable by future
slices).

Deletes the three old `*Configurator.swift` / `*ViewController.swift`
files plus `NotificationIdentifierEurekaRow.swift`.

## Screenshots
_Pending — to be added before merge._

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Part of a five-PR Eureka → SwiftUI migration tracked in
`UIKitToSwiftUIMigration.md` (siblings: #4560, #4561, #4562, #4564). The
`Eureka`, `ColorPickerRow`, and `ViewRow` pods stay until all slices
land.

**Reconciliation with #4562:** this PR embeds
`NotificationCategoryListView` inside the old
`NotificationSettingsViewController` via `UIHostingController` so the
list is reachable while the parent screen is still Eureka. Once #4562
merges, `NotificationSettingsView` should link directly to
`NotificationCategoryListView` — the hosting-controller wrapper becomes
unnecessary.

`YamlSection.swift` and `RealmSection.swift` are retained — still used
by `ActionConfigurator`, `NFCTagViewController`,
`SettingsDetailViewController`, and `ComplicationListViewController`.

`bundle exec fastlane lint` passes. Not build-verified locally yet.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 02:16:27 +02:00
Bruno Pantaleão Gonçalves
3c2278d702 Remove dead HomeAssistantLogoView.xib (#4576)
## Summary

`Sources/App/Settings/HomeAssistantLogoView.xib` is dead — the XIB
declares a custom view class `HomeAssistantLogoView` from the
`HomeAssistant` module, but:

- No `HomeAssistantLogoView.swift` exists anywhere in the project
- Nothing loads the nib (no `UINib(nibName: "HomeAssistantLogoView"`, no
`Bundle.loadNibNamed("HomeAssistantLogoView"`)
- The only references to the name are the XIB file itself and its
`project.pbxproj` entries

Removes the XIB and its 4 `project.pbxproj` references.

## Test plan

- [ ] Build still succeeds
- [ ] No visual regressions in Settings (screen never rendered this XIB
anyway)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-29 00:08:55 +00:00
Bruno Pantaleão Gonçalves
aa962d04bf Migrate Apple Watch complications to SwiftUI (#4564) 2026-04-28 22:42:55 +02:00
Bruno Pantaleão Gonçalves
c59cd48a6d Migrate Notification settings + leaf screens to SwiftUI (#4562)
## Summary
Migrate the notification settings screen and its three leaf screens to
SwiftUI:
- `NotificationSettingsView`: permission status, learn-more link, sounds
/ categories / rate-limit / debug navigation, badge reset + auto-clear,
push ID share, push ID reset.
- `NotificationSoundsView`: imported / bundled / system segmented lists,
audio playback, swipe delete, `.fileImporter`, file-sharing + system
import, AKConverter progress HUD, alert handling.
- `NotificationRateLimitView`: pull-to-refresh on iOS, toolbar refresh
on Catalyst, 1-second reset countdown, retry state, parent
remaining-count callback.
- `NotificationDebugNotificationsView`: `UserDefaults`-backed toggles.

Removes the Eureka `row(for:)` extensions in
`NotificationRateLimitsAPI.swift`, deletes the four old
`*ViewController.swift` files, and rewires `SettingsItem.notifications`
and `NotificationManager.openSettingsFor` to the SwiftUI view.

## Screenshots
_Pending — to be added before merge._

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Part of a five-PR Eureka → SwiftUI migration tracked in
`UIKitToSwiftUIMigration.md` (siblings: #4560, #4561, #4563, #4564). The
`Eureka`, `ColorPickerRow`, and `ViewRow` pods stay until all slices
land.

**Reconciliation with #4563:** the categories PR temporarily embeds
`NotificationCategoryListView` inside the old
`NotificationSettingsViewController` via `UIHostingController`. This PR
deletes that controller entirely; after both merge, the
`categoriesDestination` in `NotificationSettingsView` should link
directly to `NotificationCategoryListView` from the categories PR.

`bundle exec fastlane lint` passes. Not build-verified locally yet.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 20:55:21 +02:00
Bruno Pantaleão Gonçalves
773c165e2c Migrate Actions settings + action editor to SwiftUI (#4561)
## Summary
Replace the Eureka actions list with `ActionsSettingsView` +
`ActionsSettingsViewModel` (value-type Realm snapshots, delete/reorder,
scene toggle + customize flow, server refresh). Replace
`ActionConfigurator` with `ActionConfiguratorView` using SwiftUI `Form`,
`IconPicker`, SwiftUI `ColorPicker`, the existing
`WidgetBasicButtonView` preview, and a new inline `ActionServerPicker`.
`SettingsItem.actions` is wired directly to the SwiftUI view and the
Eureka actions code is removed from `SettingsDetailViewController`.

## Screenshots
_Pending — to be added before merge._

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Part of a five-PR Eureka → SwiftUI migration tracked in
`UIKitToSwiftUIMigration.md` (siblings: #4560, #4562, #4563, #4564). The
`Eureka`, `ColorPickerRow`, and `ViewRow` pods stay until all slices
land.

`ServerSelectRow.swift` is intentionally kept in-tree because
`ComplicationEditViewController` still uses it — both come out once the
complications slice (#4564) merges.

Not build-verified locally yet; may surface access-level fixes (e.g.
internal synthesized initializers on Shared types) during build.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 18:55:45 +02:00
Ryan Warner
480dd6d298 Enable Live Activities on iPad (iPadOS 17+) (#4574)
## Summary

iPad has supported Live Activities since iPadOS 17 — the previous
`userInterfaceIdiom == .pad` guard in `LiveActivitySettingsView` was
incorrect. `areActivitiesEnabled` (the `ActivityAuthorizationInfo` API)
already returns the correct value on iPad, so no platform-specific gate
is needed.

Changes:

- Remove the `userInterfaceIdiom == .pad` branch from
`LiveActivitySettingsView` that showed a static "Not available on iPad"
label. iPad users now see the same enabled/open-settings states as
iPhone.
- Drop the `live_activity.status.not_supported` localisation key from
all 34 locale files and the generated `Strings.swift` accessor.
- Update a stale comment in `HAAPI.swift` that incorrectly stated iPads
report `false` for `areActivitiesEnabled`.

ActivityKit handles Dynamic Island availability transparently — the
island pill appears on iPhone 14 Pro/Pro Max and all iPhone 15 and later
models; on iPad and older iPhones it simply doesn't render, and the
activity shows on the Lock Screen only.

## References

- Apple docs confirming iPad support: [Displaying live data with Live
Activities](https://developer.apple.com/documentation/activitykit/displaying-live-data-with-live-activities)
- Companion docs PR: home-assistant/companion.home-assistant#1303

## Test plan

- [ ] On iPhone: Live Activities settings screen shows
enabled/open-settings as before
- [ ] On iPad (iPadOS 17+): settings screen no longer shows "Not
available on iPad"; shows enabled/open-settings
- [ ] On iPad (iPadOS 17+): Live Activities can be started and updated
from Home Assistant
- [ ] On iPad (iPadOS 16 or earlier): `areActivitiesEnabled` returns
`false`; open-settings button shown
- [ ] Verify `live_activity.status.not_supported` key is absent from all
`.lproj` files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 16:38:17 +00:00
Bruno Pantaleão Gonçalves
c4dd4f11b9 Migrate Location settings to SwiftUI (#4560)
## Summary
Replace the Eureka-based location settings screen with a SwiftUI
`LocationSettingsView` + `LocationSettingsViewModel`. Includes
permission status rows, background refresh, location history link,
manual location update, update-source toggles, and per-zone read-only
sections. Zone detail now uses an `MKMapView`-backed SwiftUI preview
with the zone radius overlay. `PermissionStatusRow.swift` and
`EurekaLocationRow.swift` are removed; permission/disabled-state logic
moves into the view model. `SettingsItem.location` is routed directly to
the SwiftUI view and the location setup (~270 lines) is trimmed from
`SettingsDetailViewController`.

## Screenshots

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#

## Any other notes
Part of a five-PR Eureka → SwiftUI migration tracked in
`UIKitToSwiftUIMigration.md`. The `Eureka`, `ColorPickerRow`, and
`ViewRow` pods stay until the remaining four slices land: actions
(#4561), notification settings (#4562), notification categories (#4563),
watch complications (#4564).

Build-verified locally on iOS simulator.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 15:44:23 +02:00
Bruno Pantaleão Gonçalves
0bb2d6296f Fix Safe area empty state (#4572)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-28 10:30:52 +00:00
nstefanelli
edc810d140 Fix kiosk mode brightness persisting after app backgrounds (#4506) (#4532)
## Summary

Fixes #4506.

When kiosk mode's screensaver dims `UIScreen.main.brightness` (or when
the managed-brightness setting is active) and the user taps a push
notification to open another app, the dim would persist system-wide — HA
only restored brightness when re-entering kiosk mode. Only re-opening HA
would bring it back.

This PR restores the user's original brightness (captured in
`enableKioskMode()`) when HA backgrounds, and re-applies the kiosk
brightness state when HA returns to foreground.

**Deliberate choice:** wired to
`UIApplication.didEnterBackgroundNotification`, **not**
`willResignActiveNotification`. This means a notification banner
dropping down, Control Center pulldown, or incoming-call alert alone
does NOT undo the kiosk dim — only actually leaving the app does.
Matches what users expect from a kiosk: the display stays dim unless
someone truly uses the device elsewhere.

## Behavior matrix

| Event | Kiosk state | Result |
|---|---|---|
| Notification banner drops (no app switch) | on + screensaver dim |
Stays dimmed |
| Tap notification → other app opens | on + screensaver dim | Restored
to pre-kiosk brightness |
| Tap notification → other app opens | on + ` brightnessControlEnabled `
| Restored to pre-kiosk brightness |
| Return to HA | on + screensaver still active | Re-dims |
| Return to HA | on + ` brightnessControlEnabled ` | Re-applies managed
level |
| Device locks/sleeps | on | Restored to pre-kiosk brightness |

## Implementation

Single file change in `Sources/App/Kiosk/KioskModeManager.swift`:

- ` appDidEnterBackground() ` — restore ` originalBrightness ` when
kiosk active
- ` appDidBecomeActive() ` — re-apply screensaver dim OR managed
brightness on return (depending on current state)
- Extracted ` applyBrightnessForActiveScreensaver() ` helper from `
showScreensaver() ` so foreground-reapply and initial-show share one
code path (DRY)

No new settings, no UI changes, no API additions, no unrelated file
touches.

## Tests

New file ` Tests/App/Kiosk/KioskLifecycleBrightness.test.swift ` (Swift
Testing, per project convention):

- ` backgroundRestoresOriginalBrightnessWhenScreensaverActive `
- ` foregroundReappliesScreensaverDim `
- ` foregroundReappliesManagedBrightnessWithoutScreensaver `
- ` lifecycleDoesNothingWhenKioskInactive `

Tests drive ` KioskModeManager.shared ` directly (there is no injectable
instance today). The setup helper snapshots ` Current.screenBrightness `
/ ` setScreenBrightness ` closures AND persisted kiosk settings, then
restores both on cleanup — so runs do not pollute the GRDB database or
leak state between tests.

## Follow-up candidate (not this PR)

If maintainers prefer, ` KioskModeManager ` could grow an injectable
initializer to allow testing without touching the shared singleton. I
did not do that here to keep the PR focused on the fix, but happy to
send a separate PR if you'd like that refactor.

## Test plan

- [x] Unit tests pass (` KioskLifecycleBrightnessTests ` — 4 cases)
- [x] Existing kiosk tests still pass (no regression from the `
showScreensaver() ` refactor)
- [x] ` bundle exec fastlane lint ` clean (SwiftFormat + SwiftLint +
Rubocop)
- [x] ` xcodebuild ` clean build (App target)
- [x] ` xcodebuild build-for-testing ` (test bundle compiles)

---------

Co-authored-by: Nick Stefanelli <nstefanelli@users.noreply.github.com>
2026-04-28 10:12:38 +02:00
github-actions[bot]
165d454793 Update Localized Strings (#4565)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
Co-authored-by: Bruno Pantaleão Gonçalves <5808343+bgoncal@users.noreply.github.com>
2026-04-28 08:07:23 +00:00
Bruno Pantaleão Gonçalves
7ac3fafb00 Redesign connection error details view (#4559)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="774" height="1350" alt="CleanShot 2026-04-24 at 16 23 54@2x"
src="https://github.com/user-attachments/assets/e154ae63-48ff-4c47-a0ae-ae761fc40f9c"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-24 17:24:57 +02:00
github-actions[bot]
34a42b5019 Update Localized Strings (#4556)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
Co-authored-by: Bruno Pantaleão Gonçalves <5808343+bgoncal@users.noreply.github.com>
2026-04-24 14:53:13 +00:00
Bruno Pantaleão Gonçalves
a934840e46 Add Mac onboarding sheet frame helper (#4558)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="3248" height="1968" alt="CleanShot 2026-04-24 at 16 02
41@2x"
src="https://github.com/user-attachments/assets/d82f36fd-64af-4568-82df-e6f9d0e0a9d9"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-24 16:29:56 +02:00
Bruno Pantaleão Gonçalves
3310bb6ada Fix mtls profile info request on macos (#4555)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-24 16:00:37 +02:00
Bruno Pantaleão Gonçalves
1ec9940ad1 Improve connection empty state UI (#4557)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="996" height="1508" alt="CleanShot 2026-04-24 at 14 38 13@2x"
src="https://github.com/user-attachments/assets/583c45c7-a4a6-4dda-92e9-bcee8fc04953"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-24 15:31:29 +02:00
github-actions[bot]
7c852db624 Update Localized Strings (#4551) 2026-04-23 11:12:43 +02:00
David Bishop
80924fe00c Add barometer as an entity that iPhone/some iPads expose (#4491) 2026-04-23 11:12:22 +02:00
Bruno Pantaleão Gonçalves
8c90c3f1e0 Avoid reconnection loop when disconnected (#4547)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-22 16:48:21 +02:00
Bruno Pantaleão Gonçalves
bd2847c104 Improve live activity UI (#4548)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="1206" height="2622" alt="Simulator Screenshot - Daily tester
2 - 2026-04-22 at 15 58 29"
src="https://github.com/user-attachments/assets/1ecea252-be42-44c6-a3c3-9bd28efc57dd"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-22 16:47:31 +02:00
Bruno Pantaleão Gonçalves
aba8915088 Fix [mTLS] macOS Menu Bar Text not showing (#4545)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-22 15:41:20 +02:00
Bruno Pantaleão Gonçalves
6e22a09338 Prevent duplicate error message when HA unreachable (#4546)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="1206" height="2622" alt="Simulator Screenshot - Daily tester
2 - 2026-04-22 at 14 43 08"
src="https://github.com/user-attachments/assets/66e0e557-5b69-4f8d-82c1-53dbf7fb4b9b"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-22 15:40:52 +02:00
github-actions[bot]
09bfa37213 Update Localized Strings (#4542)
Automatically created by zacwest.

Co-authored-by: Home Assistant Bot <hello@home-assistant.io>
2026-04-22 15:10:46 +02:00
Bruno Pantaleão Gonçalves
7f03811c17 Omit empty PKCS#12 passphrase and add tests (#4544)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
Avoid passing an explicit empty passphrase to SecPKCS12Import on macOS
by introducing ClientCertificateManager.pkcs12ImportOptions(password:).
importP12 now uses this helper so an empty password results in no
passphrase option being supplied. Added unit tests verifying both empty
and non-empty password behavior and imported Security in the test file.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-22 15:10:23 +02:00
Bruno Pantaleão Gonçalves
1d2f446541 Prevent live activity to crash due to access to webhooks in Environment (#4543)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-22 12:34:05 +00:00
Bruno Pantaleão Gonçalves
8f26f9e7d5 Restore servers from GRDB when empty keychain (#4523)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->



https://github.com/user-attachments/assets/e6c5eecb-4399-4e44-94e8-dc0b5ed8d744



## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2026-04-21 21:13:26 +02:00