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

Add image
This commit is contained in:
Jan Bouwhuis 2023-10-19 18:50:02 +02:00 committed by GitHub
parent 3853214496
commit d0341c9754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 25 deletions

View file

@ -20,7 +20,6 @@ from . import (
cover as cover_platform,
event as event_platform,
humidifier as humidifier_platform,
image as image_platform,
lawn_mower as lawn_mower_platform,
lock as lock_platform,
number as number_platform,
@ -74,10 +73,7 @@ CONFIG_SCHEMA_BASE = vol.Schema(
cv.ensure_list,
[humidifier_platform.PLATFORM_SCHEMA_MODERN], # type: ignore[has-type]
),
Platform.IMAGE.value: vol.All(
cv.ensure_list,
[image_platform.PLATFORM_SCHEMA_MODERN], # type: ignore[has-type]
),
Platform.IMAGE.value: vol.All(cv.ensure_list, [dict]),
Platform.LAWN_MOWER.value: vol.All(
cv.ensure_list,
[lawn_mower_platform.PLATFORM_SCHEMA_MODERN], # type: ignore[has-type]