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

This commit is contained in:
Clyde Stubbs
2025-03-18 14:42:14 -05:00
committed by GitHub
parent afa481aeea
commit f993bb08c7
+3 -2
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