1
0
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:
Franck Nijhof
2021-12-02 22:30:52 +01:00
committed by GitHub
parent fd8e7ae5d9
commit 6e220d5d17
6 changed files with 44 additions and 73 deletions

View File

@@ -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 = "*"