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:
Marvin Wichmann 2021-12-03 09:31:17 +01:00 committed by GitHub
parent 3188a364e2
commit 707fe67c00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 59 additions and 86 deletions

View file

@ -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.