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:
@@ -3,6 +3,8 @@ from __future__ import annotations
|
||||
|
||||
from typing import Final
|
||||
|
||||
from homeassistant.util.enum import StrEnum
|
||||
|
||||
MAJOR_VERSION: Final = 2021
|
||||
MINOR_VERSION: Final = 12
|
||||
PATCH_VERSION: Final = "0.dev0"
|
||||
@@ -16,6 +18,42 @@ REQUIRED_NEXT_PYTHON_HA_RELEASE: Final = "2022.1"
|
||||
# Format for platform files
|
||||
PLATFORM_FORMAT: Final = "{platform}.{domain}"
|
||||
|
||||
|
||||
class Platform(StrEnum):
|
||||
"""Available entity 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"
|
||||
|
||||
|
||||
# Can be used to specify a catch all when registering state or event listeners.
|
||||
MATCH_ALL: Final = "*"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user