1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01: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 GitHub
parent afa481aeea
commit f993bb08c7

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