Reshape boiler data
Deploy Solar Relay / deploy (push) Successful in 1m7s

This commit is contained in:
franzz committed 2026-11-03 01:48:01 +01:00
1 parent 9e0230731b
commit e7905c667d
10 files changed
+224 -27

No files matched your search

+4
View File
@@ -51,6 +51,7 @@ class InverterConfig:
boiler_pin: str = "pin1"
request_timeout_seconds: float = 5
min_request_interval_seconds: float = 4
boiler_threshold_w: float = 2000
@dataclass(frozen=True)
@@ -163,6 +164,9 @@ def load_config(path: Path) -> Config:
raise ValueError("inverter.boiler_pin must be pin1, pin2, pin3 or pin4")
_number(inverter.request_timeout_seconds, "inverter.request_timeout_seconds", 0.1)
_number(inverter.min_request_interval_seconds, "inverter.min_request_interval_seconds", 4)
_number(inverter.boiler_threshold_w, "inverter.boiler_threshold_w", 0.01)
if inverter.boiler_threshold_w > 99_999_999.99:
raise ValueError("inverter.boiler_threshold_w exceeds the stored watts range")
upload = UploadConfig(**data.get("upload", {}))
if not isinstance(upload.url, str):
raise ValueError("upload.url must be a string")