1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

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
21 changed files with 59 additions and 86 deletions

View File

@@ -34,7 +34,6 @@ from homeassistant.exceptions import (
)
from homeassistant.setup import async_start_setup
from homeassistant.util.async_ import run_callback_threadsafe
from homeassistant.util.enum import StrEnum
from . import (
config_validation as cv,
@@ -63,41 +62,6 @@ PLATFORM_NOT_READY_BASE_WAIT_TIME = 30 # seconds
_LOGGER = getLogger(__name__)
class Platform(StrEnum):
"""Available platforms."""
AIR_QUALITY = "air_quality"
ALARM_CONTROL_PANEL = "alarm_control_panel"
BINARY_SENSOR = "binary_sensor"
BUTTON = "button"
CALENDAR = "calendar"
CAMERA = "camera"
CLIMATE = "climate"
COVER = "cover"
DEVICE_TRACKER = "device_tracker"
FAN = "fan"
GEO_LOCATION = "geo_location"
HUMIDIFIER = "humidifier"
IMAGE_PROCESSING = "image_processing"
LIGHT = "light"
LOCK = "lock"
MAILBOX = "mailbox"
MEDIA_PLAYER = "media_player"
NOTIFY = "notify"
NUMBER = "number"
REMOTE = "remote"
SCENE = "scene"
SELECT = "select"
SENSOR = "sensor"
SIREN = "siren"
SST = "sst"
SWITCH = "switch"
TTS = "tts"
VACUUM = "vacuum"
WATER_HEATER = "water_heater"
WEATHER = "weather"
class AddEntitiesCallback(Protocol):
"""Protocol type for EntityPlatform.add_entities callback."""