Repository navigation
Fix Gateway hilo_id and GraphQL device subscription updates - #499
Merged
ic-dev21 merged 4 commits intoNov 19, 2026
Merged
Conversation
Home Assistant relies on device `Disconnected` updates and `hilo_id` callbacks from GraphQL to mark entities unavailable when devices or the Zigbee Gateway go offline, but several schema and mapping bugs prevented those updates from reaching `HiloDevice` instances. Populate `hilo_id` on the Gateway device, request the missing Gateway identity fields in device subscriptions, and align `onAnyLocationUpdated` and reconnect resyncs with Hilo's Digital-Twin schema so Gateway and device connection state changes reliably update device availability and notify subscription callbacks.
Keep this change small and focused on Gateway identity and `onAnyDeviceUpdated` / reconnect-resync availability updates by deferring `onAnyLocationUpdated` schema changes to a separate PR, preserving `connectionStatus == "DISCONNECTED"` matching, and removing defensive type-narrowing branches and redundant test cases.
Deduplicate the case-insensitive Gateway `deviceType` check shared by `call_get_location_query` and `_handle_query_result` so the two call sites cannot drift apart.
Moustachauve
marked this pull request as ready for review
November 16, 2026 06:07
Remove the obsolete device_id == 0 Gateway fallback in Devices now that the Gateway populates hilo_id directly, revert unrelated Smart Meter and Gateway id-mutation changes to main, and drop the corresponding redundant tests.
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.
Home Assistant relies on device
Disconnectedupdates andhilo_idcallbacks from GraphQL to mark entities unavailable when devices or the Zigbee Gateway go offline, but missing Gateway identity fields and silent reconnect resyncs prevented those updates from reachingHiloDeviceinstances.Populate
hilo_idon the Gateway device, request its missing identity fields inonAnyDeviceUpdated, maponlineStatusin_build_gateway, forward updatedhilo_ids to callbacks after SSE reconnect resyncs, and remove the obsoletedeviceId == 0Gateway fallback now that Gateway readings match byhilo_id.