mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Fix allow_name_translation logic (#97701)
This commit is contained in:
parent
80d0f32237
commit
d78e39d568
@ -61,8 +61,9 @@ def allow_name_translation(integration: Integration) -> bool:
|
|||||||
"""Validate that the translation name is not the same as the integration name."""
|
"""Validate that the translation name is not the same as the integration name."""
|
||||||
# Only enforce for core because custom integrations can't be
|
# Only enforce for core because custom integrations can't be
|
||||||
# added to allow list.
|
# added to allow list.
|
||||||
return integration.core and (
|
return (
|
||||||
integration.domain in ALLOW_NAME_TRANSLATION
|
not integration.core
|
||||||
|
or integration.domain in ALLOW_NAME_TRANSLATION
|
||||||
or integration.quality_scale == "internal"
|
or integration.quality_scale == "internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user