mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +02:00
Allow AUTO_LOAD to be a function (#4550)
This commit is contained in:
+4
-1
@@ -71,7 +71,10 @@ class ComponentManifest:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def auto_load(self) -> list[str]:
|
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
|
@property
|
||||||
def codeowners(self) -> list[str]:
|
def codeowners(self) -> list[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user