Add error message to device registry helper (#118676)

This commit is contained in:
epenet 2024-06-03 09:58:02 +02:00 committed by GitHub
parent a87b422d3e
commit 891f9c9578
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -820,7 +820,9 @@ class DeviceRegistry(BaseRegistry[dict[str, list[dict[str, Any]]]]):
) )
if merge_identifiers is not UNDEFINED and new_identifiers is not UNDEFINED: if merge_identifiers is not UNDEFINED and new_identifiers is not UNDEFINED:
raise HomeAssistantError raise HomeAssistantError(
"Cannot define both merge_identifiers and new_identifiers"
)
if isinstance(disabled_by, str) and not isinstance( if isinstance(disabled_by, str) and not isinstance(
disabled_by, DeviceEntryDisabler disabled_by, DeviceEntryDisabler