Simplify MQTT PLATFORM_CONFIG_SCHEMA_BASE (#72589)

pull/72598/head
Erik Montnemery 2022-05-27 15:09:43 +02:00 committed by GitHub
parent 371dfd85c8
commit 35bc6900ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 20 deletions

View File

@ -190,26 +190,7 @@ MQTT_WILL_BIRTH_SCHEMA = vol.Schema(
)
PLATFORM_CONFIG_SCHEMA_BASE = vol.Schema(
{
vol.Optional(Platform.ALARM_CONTROL_PANEL.value): cv.ensure_list,
vol.Optional(Platform.BINARY_SENSOR.value): cv.ensure_list,
vol.Optional(Platform.BUTTON.value): cv.ensure_list,
vol.Optional(Platform.CAMERA.value): cv.ensure_list,
vol.Optional(Platform.CLIMATE.value): cv.ensure_list,
vol.Optional(Platform.COVER.value): cv.ensure_list,
vol.Optional(Platform.DEVICE_TRACKER.value): cv.ensure_list,
vol.Optional(Platform.FAN.value): cv.ensure_list,
vol.Optional(Platform.HUMIDIFIER.value): cv.ensure_list,
vol.Optional(Platform.LIGHT.value): cv.ensure_list,
vol.Optional(Platform.LOCK.value): cv.ensure_list,
vol.Optional(Platform.NUMBER.value): cv.ensure_list,
vol.Optional(Platform.SCENE.value): cv.ensure_list,
vol.Optional(Platform.SELECT.value): cv.ensure_list,
vol.Optional(Platform.SIREN.value): cv.ensure_list,
vol.Optional(Platform.SENSOR.value): cv.ensure_list,
vol.Optional(Platform.SWITCH.value): cv.ensure_list,
vol.Optional(Platform.VACUUM.value): cv.ensure_list,
}
{vol.Optional(platform.value): cv.ensure_list for platform in PLATFORMS}
)
CONFIG_SCHEMA_BASE = PLATFORM_CONFIG_SCHEMA_BASE.extend(