mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
Add tag to _ENTITY_COMPONENTS
This commit is contained in:
@@ -65,7 +65,8 @@ _MODULES: dict[str, set[str]] = {
|
|||||||
"WeatherEntityDescription",
|
"WeatherEntityDescription",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
_PLATFORMS: set[str] = {platform.value for platform in Platform}
|
_ENTITY_COMPONENTS: set[str] = {platform.value for platform in Platform}
|
||||||
|
_ENTITY_COMPONENTS.add("tag")
|
||||||
|
|
||||||
|
|
||||||
class HassEnforceClassModule(BaseChecker):
|
class HassEnforceClassModule(BaseChecker):
|
||||||
@@ -92,7 +93,7 @@ class HassEnforceClassModule(BaseChecker):
|
|||||||
current_integration = parts[2]
|
current_integration = parts[2]
|
||||||
current_module = parts[3] if len(parts) > 3 else ""
|
current_module = parts[3] if len(parts) > 3 else ""
|
||||||
|
|
||||||
if current_module != "entity" and current_integration not in _PLATFORMS:
|
if current_module != "entity" and current_integration not in _ENTITY_COMPONENTS:
|
||||||
top_level_ancestors = list(node.ancestors(recurs=False))
|
top_level_ancestors = list(node.ancestors(recurs=False))
|
||||||
|
|
||||||
for ancestor in top_level_ancestors:
|
for ancestor in top_level_ancestors:
|
||||||
|
Reference in New Issue
Block a user