mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Allow AUTO_LOAD to be a function (#4550)
This commit is contained in:
parent
32a0a60480
commit
ea17a92dbc
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,10 @@ class ComponentManifest:
|
|||
|
||||
@property
|
||||
def auto_load(self) -> list[str]:
|
||||
return getattr(self.module, "AUTO_LOAD", [])
|
||||
al = getattr(self.module, "AUTO_LOAD", [])
|
||||
if callable(al):
|
||||
return al()
|
||||
return al
|
||||
|
||||
@property
|
||||
def codeowners(self) -> list[str]:
|
||||
|
|
Loading…
Reference in a new issue