Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions custom_components/hilo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,22 @@ async def async_init(self, scan_interval: int) -> None:

# Step 4: Build device list (websocket devices + gateway REST + callbacks)
await self.devices.update()
# The cloud returns a null identifier for some devices (observed for
# the gateway since ~2026-09-10). Every entity constructor builds
# unique_ids as f"{device.identifier.lower()}-..." and would crash
# with AttributeError, killing the whole sensor platform. Coerce to
# the empty string, which is what the cloud used to return and what
# existing device-registry entries and entity unique_ids were built
# from. Also handled in python-hilo for older payloads.
for dev in self.devices.all:
if dev is not None and dev.identifier is None:
LOG.warning(
"Device %s (type %s) has no identifier from the cloud, "
"coercing to empty string",
dev.name,
dev.type,
)
dev.identifier = ""

# Step 5: Initialize GraphQL
await self.graphql_helper.async_init()
Expand Down
Loading