cantabile_edge, cantabile_modbus, cantabile_eebus 0.1.1541: full source

This commit is contained in:
Setti Solutions S.R.L committed 2026-11-09 06:36:15 +02:00
1 parent 05802d6f87
commit 94f46db8f8
19 files changed
+863 -60

No files matched your search

+8
View File
@@ -342,6 +342,14 @@ class Controller:
log.info("weather forecast: %s", e)
state = self.model_state()
cands, net_load = state.pop("_cands", None) or {}, state.pop("_net_load", None)
# a battery bound to a building whose plan lapsed (building.py, A9.4): self-consumption only; said once
bound = (state.get("building") or {}).get("battery_bound") or {}
lapsed = bool(bound.get("lapsed"))
if lapsed and not getattr(self, "_bind_lapsed", False):
log.warning("building %s: its battery plan ended %s UTC and was not renewed: the battery runs in "
"self-consumption only (no grid charging) until the next one", bound.get("building"),
time.strftime("%d %b %H:%M", time.gmtime(bound.get("until") or 0)))
self._bind_lapsed = lapsed
plan = await solve(state, self.cfg.solve_timeout_s)
if "error" in plan:
self.plan_error = plan["error"]