Guard bad entity ID in entity registry (#35271)
This commit is contained in:
1 parent
87d58a544b
commit
a330eba61c
2 files changed
+14
No files matched your search
@@ -241,12 +241,20 @@ async def test_loading_extra_values(hass, hass_storage):
|
||||
"unique_id": "disabled-hass",
|
||||
"disabled_by": "hass",
|
||||
},
|
||||
{
|
||||
"entity_id": "test.invalid__entity",
|
||||
"platform": "super_platform",
|
||||
"unique_id": "invalid-hass",
|
||||
"disabled_by": "hass",
|
||||
},
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
registry = await entity_registry.async_get_registry(hass)
|
||||
|
||||
assert len(registry.entities) == 4
|
||||
|
||||
entry_with_name = registry.async_get_or_create(
|
||||
"test", "super_platform", "with-name"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user