Fix EntityWidgetConfigure build - #7264
Merged
Merged
Conversation
jpelgrom
approved these changes
Jul 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Entity Widget configuration flow to match the updated GetEntitiesForDisplayUseCase API (post-#7007), unblocking compilation by switching call sites and tests to the new snapshot(...) method and the updated EntityDisplayItem construction.
Changes:
- Update
EntityWidgetConfigureViewModelto usegetEntitiesForDisplay.snapshot(serverId)instead of the previous call form. - Update unit/UI tests and preview state to construct
EntityDisplayItemviaEntityDisplayItem(entity)(instead of the removed.from(...)). - Adjust ViewModel tests to mock
getEntitiesForDisplay.snapshot(...).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/test/kotlin/io/homeassistant/companion/android/widgets/entity/EntityWidgetConfigureViewModelTest.kt | Updates mocks/helpers to use snapshot(...) and EntityDisplayItem(entity) construction. |
| app/src/test/kotlin/io/homeassistant/companion/android/widgets/entity/EntityWidgetConfigureScreenTest.kt | Updates test state to use EntityDisplayItem(ENTITY) instead of EntityDisplayItem.from(...). |
| app/src/main/kotlin/io/homeassistant/companion/android/widgets/entity/EntityWidgetConfigureViewModel.kt | Switches entity loading to getEntitiesForDisplay.snapshot(serverId). |
| app/src/main/kotlin/io/homeassistant/companion/android/widgets/entity/EntityWidgetConfigureScreen.kt | Updates preview state to use the new EntityDisplayItem(previewEntity1) constructor. |
jpelgrom
disabled auto-merge
July 28, 2026 07:03
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
We've merged #7007 but it was not up to date on main and we end up into a build that is not building because of that. This Pr fix this by simply using the new methods available in the use case.
Checklist
Select exactly one option that describes AI usage in this contribution: