add full detectors config to api model dump

works around the way we use detector plugins so we can have the full detector config for the frontend
This commit is contained in:
Josh Hawkins 2026-02-06 09:34:56 -06:00
parent d1422f295b
commit 5d518bfa65

View File

@ -125,6 +125,10 @@ def config(request: Request):
config: dict[str, dict[str, Any]] = config_obj.model_dump( config: dict[str, dict[str, Any]] = config_obj.model_dump(
mode="json", warnings="none", exclude_none=True mode="json", warnings="none", exclude_none=True
) )
config["detectors"] = {
name: detector.model_dump(mode="json", warnings="none", exclude_none=True)
for name, detector in config_obj.detectors.items()
}
# remove the mqtt password # remove the mqtt password
config["mqtt"].pop("password", None) config["mqtt"].pop("password", None)