Do not fail MQTT setup if switches configured via yaml can't be validated (#102320)

Add switch
This commit is contained in:
Jan Bouwhuis 2023-10-19 23:04:35 +02:00 committed by GitHub
parent 54c80491e3
commit ec1b3fe6fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 22 deletions

View file

@ -23,7 +23,6 @@ from . import (
lock as lock_platform,
number as number_platform,
sensor as sensor_platform,
switch as switch_platform,
update as update_platform,
water_heater as water_heater_platform,
)
@ -86,10 +85,7 @@ CONFIG_SCHEMA_BASE = vol.Schema(
[sensor_platform.PLATFORM_SCHEMA_MODERN], # type: ignore[has-type]
),
Platform.SIREN.value: vol.All(cv.ensure_list, [dict]),
Platform.SWITCH.value: vol.All(
cv.ensure_list,
[switch_platform.PLATFORM_SCHEMA_MODERN], # type: ignore[has-type]
),
Platform.SWITCH.value: vol.All(cv.ensure_list, [dict]),
Platform.TEXT.value: vol.All(cv.ensure_list, [dict]),
Platform.UPDATE.value: vol.All(
cv.ensure_list,