ACT-001: actuator-first sensor lifecycle
This commit is contained in:
@@ -10,6 +10,11 @@ class Settings:
|
||||
ha_token: str | None = None
|
||||
model_store: str = ".model_store"
|
||||
automation_store: str = ".automation_store"
|
||||
actuator_store: str = ".actuator_store"
|
||||
history_days: int = 14
|
||||
min_training_points: int = 24
|
||||
retrain_stale_hours: int = 24
|
||||
reconcile_interval_seconds: int = 900
|
||||
|
||||
@property
|
||||
def ha_configured(self) -> bool:
|
||||
@@ -22,4 +27,11 @@ def load_settings() -> Settings:
|
||||
ha_token=os.getenv("SILLYHOME_HA_TOKEN") or os.getenv("HA_TOKEN"),
|
||||
model_store=os.getenv("SILLYHOME_MODEL_STORE", ".model_store"),
|
||||
automation_store=os.getenv("SILLYHOME_AUTOMATION_STORE", ".automation_store"),
|
||||
actuator_store=os.getenv("SILLYHOME_ACTUATOR_STORE", ".actuator_store"),
|
||||
history_days=max(1, min(31, int(os.getenv("SILLYHOME_HISTORY_DAYS", "14")))),
|
||||
min_training_points=max(2, int(os.getenv("SILLYHOME_MIN_TRAINING_POINTS", "24"))),
|
||||
retrain_stale_hours=max(1, int(os.getenv("SILLYHOME_RETRAIN_STALE_HOURS", "24"))),
|
||||
reconcile_interval_seconds=max(
|
||||
60, int(os.getenv("SILLYHOME_RECONCILE_INTERVAL_SECONDS", "900"))
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user