1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Do not add entities with invalid device info (#98150)

This commit is contained in:
Erik Montnemery
2023-08-11 13:14:47 +02:00
committed by GitHub
parent a2cf08a1ea
commit 97f3199d6d
2 changed files with 22 additions and 13 deletions

View File

@@ -618,8 +618,13 @@ class EntityPlatform:
**device_info,
)
except dev_reg.DeviceInfoError as exc:
self.logger.error("Ignoring invalid device info: %s", str(exc))
device = None
self.logger.error(
"%s: Not adding entity with invalid device info: %s",
self.platform_name,
str(exc),
)
entity.add_to_platform_abort()
return
else:
device = None