unify production app configuration and ML routes

This commit is contained in:
2026-06-11 21:07:58 +02:00
parent 4b3dc3b7af
commit 3bed5e790a
8 changed files with 127 additions and 74 deletions

View File

@@ -8,6 +8,7 @@ from dataclasses import dataclass
class Settings:
ha_url: str | None = None
ha_token: str | None = None
model_store: str = ".model_store"
@property
def ha_configured(self) -> bool:
@@ -18,4 +19,5 @@ def load_settings() -> Settings:
return Settings(
ha_url=os.getenv("SILLYHOME_HA_URL") or os.getenv("HA_URL"),
ha_token=os.getenv("SILLYHOME_HA_TOKEN") or os.getenv("HA_TOKEN"),
model_store=os.getenv("SILLYHOME_MODEL_STORE", ".model_store"),
)