Use Platform StrEnum in Hassfest manifest plugin (#68234)

This commit is contained in:
Franck Nijhof 2022-03-16 11:21:51 +01:00 committed by GitHub
parent 62c4fed549
commit aa82f96c16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ from awesomeversion import (
import voluptuous as vol import voluptuous as vol
from voluptuous.humanize import humanize_error from voluptuous.humanize import humanize_error
from homeassistant.const import Platform
from homeassistant.helpers import config_validation as cv from homeassistant.helpers import config_validation as cv
from .model import Config, Integration from .model import Config, Integration
@ -33,36 +34,25 @@ SUPPORTED_IOT_CLASSES = [
# List of integrations that are supposed to have no IoT class # List of integrations that are supposed to have no IoT class
NO_IOT_CLASS = [ NO_IOT_CLASS = [
"air_quality", *{platform.value for platform in Platform},
"alarm_control_panel",
"api", "api",
"auth", "auth",
"automation", "automation",
"binary_sensor",
"blueprint", "blueprint",
"button",
"calendar",
"camera",
"climate",
"color_extractor", "color_extractor",
"config", "config",
"configurator", "configurator",
"counter", "counter",
"cover",
"default_config", "default_config",
"device_automation", "device_automation",
"device_tracker", "device_tracker",
"diagnostics", "diagnostics",
"discovery", "discovery",
"downloader", "downloader",
"fan",
"ffmpeg", "ffmpeg",
"frontend", "frontend",
"geo_location",
"history", "history",
"homeassistant", "homeassistant",
"humidifier",
"image_processing",
"image", "image",
"input_boolean", "input_boolean",
"input_button", "input_button",
@ -72,18 +62,12 @@ NO_IOT_CLASS = [
"input_text", "input_text",
"intent_script", "intent_script",
"intent", "intent",
"light",
"lock",
"logbook", "logbook",
"logger", "logger",
"lovelace", "lovelace",
"mailbox",
"map", "map",
"media_player",
"media_source", "media_source",
"my", "my",
"notify",
"number",
"onboarding", "onboarding",
"panel_custom", "panel_custom",
"panel_iframe", "panel_iframe",
@ -91,25 +75,14 @@ NO_IOT_CLASS = [
"profiler", "profiler",
"proxy", "proxy",
"python_script", "python_script",
"remote",
"safe_mode", "safe_mode",
"scene",
"script", "script",
"search", "search",
"select",
"sensor",
"siren",
"stt",
"switch",
"system_health", "system_health",
"system_log", "system_log",
"tag", "tag",
"timer", "timer",
"trace", "trace",
"tts",
"vacuum",
"water_heater",
"weather",
"webhook", "webhook",
"websocket_api", "websocket_api",
"zone", "zone",