1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-22 18:48:14 +00:00

[core] Handle mis-typed platform name more cleanly (#8424)

This commit is contained in:
Clyde Stubbs 2025-03-19 06:42:14 +11:00 committed by Keith Burzinski
parent a8d33dd26a
commit d2c2439b97
No known key found for this signature in database
GPG Key ID: 802564C5F0EEFFBE

View File

@ -189,10 +189,11 @@ def _is_target_platform(name):
from esphome.loader import get_component
try:
if get_component(name, True).is_target_platform:
return True
return get_component(name, True).is_target_platform
except KeyError:
pass
except ImportError:
pass
return False