1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-13 15:23:49 +01:00

[core] Update helpers for new auto load functionality

This commit is contained in:
Jesse Hills
2025-10-07 17:38:11 +13:00
parent ac566b7fd6
commit 317ce77197

View File

@@ -529,7 +529,16 @@ def get_all_dependencies(component_names: set[str]) -> set[str]:
new_components.update(dep.split(".")[0] for dep in comp.dependencies)
# Add auto_load components
new_components.update(comp.auto_load)
auto_load = comp.auto_load
if callable(auto_load):
import inspect
if inspect.signature(auto_load).parameters:
auto_load = auto_load(None)
else:
auto_load = auto_load()
new_components.update(auto_load)
# Check if we found any new components
new_components -= all_components