home-assistant / home-assistant/android
Widget entity picker shows stale unique_id/object_id instead of registry-overridden friendly name
- Dominant language
- Kotlin
- Stars
- 3.9k
- Forks
- 1.1k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 81
Description
**Home Assistant Android app version(s):**
**Android version(s):**17
**Device model(s):**Pixel 9
**Home Assistant version:**Core 2026.7.4 / Frontend 20260624.6 / App 2026.6.5-full (22884)
**Last working Home Assistant release (if known):**
**Description of problem, include YAML if issue is related to notifications:**
## Description
After renaming a script entity via the UI (Settings > Entities > Name field,
plus changing the entity_id field), the Android widget's entity
autocomplete/suggestion list continues to show the old, no-longer-valid
entity_id instead of the current one — even though the web frontend and
dashboard correctly reflect the rename everywhere.
## Example
1. Created a script, originally named "Goodnight" → entity_id
`script.goodnight`.
2. Later renamed it via Settings > Entities to "Winter Night" → entity_id
changed to `script.winter_night`. Confirmed via
`.storage/core.entity_registry` that the registry correctly reflects
`entity_id: script.winter_night` with the new name.
3. Confirmed in the web UI / Developer Tools > States / dashboard that only
`script.winter_night` exists and works correctly (triggering it from a
dashboard button works as expected).
4. When adding a new Button widget on the Android home screen and typing
`script.` in the entity search field, the suggestion list still shows
`script.goodnight` (the old, renamed-away identifier) rather than
`script.winter_night`.
## Unclear / Needs Clarification
I did not conclusively test whether **selecting** the stale suggested entity
(`script.goodnight`) from the picker actually creates a widget that still
correctly resolves to and triggers the renamed entity (`script.winter_night`)
under the hood, or whether it creates a broken/non-functional widget. In my
case, after selecting a stale suggestion the resulting widget did not respond
to taps, but I can't rule out user error in that specific test. Manually typing
the current, correct entity_id (`script.winter_night`) instead of selecting
from the list also did not produce a working widget for me, though this may be
a separate issue.
Regardless of whether the widget ends up functional, showing a stale/renamed
entity_id in the autocomplete is confusing and inconsistent with what the rest
of the app displays.
## Workaround
Force-stopping the app, clearing app cache, and fully uninstalling/reinstalling
did not resolve the stale suggestion list. The only fix that worked was
manually editing `scripts.yaml` (changing the YAML key to match the desired
entity_id) and `.storage/core.entity_registry` (updating `unique_id` and
`suggested_object_id` to match), with Home Assistant Core stopped during the
edit. After restarting, the widget picker correctly showed the updated entity.
This required Docker/SSH access and manual JSON editing.
## Expected Behavior
The widget's entity autocomplete should reflect the current entity registry
state, consistent with the web frontend, rather than a stale/cached list.
## Environment
- Home Assistant Core in Docker (Synology NAS, Container Manager, host network mode)
- Home Assistant Android Companion App
**Companion App Logs:**
```
```
**Screenshot or video of problem:**
**Additional information:**
Contributor guide
Research direction
Start by reproducing the rename flow in the Android home-screen widget entity autocomplete and compare its suggestions with the current Home Assistant entity registry. Done means the picker shows the renamed entity_id, such as script.winter_night, and no longer offers the stale identifier script.goodnight; also verify whether selecting the result creates a working widget.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100