Send location in zones when using SEND_LOCATION_AS_ZONE_ONLY#6879
Merged
Conversation
21 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates location reporting so zone-only updates can send the new in_zones payload expected by newer Home Assistant Core versions, while preserving location_name compatibility for older servers.
Changes:
- Adds
inZonesto the update-location domain and wire models, including custom serialization support. - Computes all matching active zones for zone-only location updates and gates sending
in_zoneson Core>= 2026.6.0. - Persists and displays
in_zonesin location history through a Room schema bump.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
common/src/main/kotlin/io/homeassistant/companion/android/database/location/LocationHistoryItem.kt |
Adds persisted inZones, sharing output, and a Room converter. |
common/src/main/kotlin/io/homeassistant/companion/android/database/AppDatabase.kt |
Bumps Room database version and adds auto-migration 51→52. |
common/src/main/kotlin/io/homeassistant/companion/android/common/data/integration/UpdateLocation.kt |
Extends the location update DTO with inZones. |
common/src/main/kotlin/io/homeassistant/companion/android/common/data/integration/impl/IntegrationRepositoryImpl.kt |
Forwards inZones into the webhook request model. |
common/src/main/kotlin/io/homeassistant/companion/android/common/data/integration/impl/entities/UpdateLocationRequest.kt |
Adds in_zones to the custom request serializer/deserializer. |
common/schemas/io.homeassistant.companion.android.database.AppDatabase/52.json |
Captures the new Room schema with the in_zones column. |
app/src/main/kotlin/io/homeassistant/companion/android/settings/developer/location/views/LocationTrackingView.kt |
Displays stored zones in the developer location history row. |
app/src/full/kotlin/io/homeassistant/companion/android/sensors/LocationSensorManager.kt |
Computes matching zones and sends inZones for supported Core versions. |
jpelgrom
reviewed
May 26, 2026
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
Merged
7 tasks
bgoncal
added a commit
to home-assistant/iOS
that referenced
this pull request
Jun 3, 2026
<!-- 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 --> To fulfill the new requirements in core we need to send in_zones when we send a location update using zone only. See home-assistant/architecture#1387 for more details. Implemented in core home-assistant/core#171814 Android PR: home-assistant/android#6879 ## 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>
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.
Summary
To fulfill the new requirements in core we need to send
in_zoneswhen we send a location update using zone only. See home-assistant/architecture#1387 for more details. Implemented in core home-assistant/core#171814Checklist
Screenshots
Any other notes