mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Move Platform StrEnum to const (#60857)
This commit is contained in:
@@ -4,8 +4,8 @@ from __future__ import annotations
|
||||
import ast
|
||||
from pathlib import Path
|
||||
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.requirements import DISCOVERY_INTEGRATIONS
|
||||
from homeassistant.setup import BASE_PLATFORMS
|
||||
|
||||
from .model import Integration
|
||||
|
||||
@@ -91,12 +91,11 @@ class ImportCollector(ast.NodeVisitor):
|
||||
|
||||
|
||||
ALLOWED_USED_COMPONENTS = {
|
||||
*{platform.value for platform in Platform},
|
||||
# Internal integrations
|
||||
"alert",
|
||||
"automation",
|
||||
"button",
|
||||
"conversation",
|
||||
"button",
|
||||
"device_automation",
|
||||
"frontend",
|
||||
"group",
|
||||
@@ -119,8 +118,6 @@ ALLOWED_USED_COMPONENTS = {
|
||||
"webhook",
|
||||
"websocket_api",
|
||||
"zone",
|
||||
# Entity integrations with platforms
|
||||
*BASE_PLATFORMS,
|
||||
# Other
|
||||
"mjpeg", # base class, has no reqs or component to load.
|
||||
"stream", # Stream cannot install on all systems, can be imported without reqs.
|
||||
|
||||
Reference in New Issue
Block a user