Move StrEnum to homeassistant.backports and move Platform to homeassistant.const (#60880)
Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
3188a364e2
commit
707fe67c00
21 changed files with 59 additions and 86 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue