cantabile_edge, cantabile_modbus, cantabile_eebus 0.1.676: full source
This commit is contained in:
1 parent
3edd015039
commit
d48b9aff87
32 files changed
+4633
-133
No files matched your search
@@ -48,7 +48,18 @@ The building's requests (building.py, state["building"]): a load limit on
|
||||
the grid import and a thermostat cap are constraints with a penalty (binding
|
||||
far above any price, flexible with a price), a shift request a soft target
|
||||
(the window's import lowered by its kWh against the house's own net load).
|
||||
|
||||
The owner's preferences (preferences.py, a device's "pref"): a room's
|
||||
target per step from its schedule (in place of the occupied hours) at the
|
||||
comfort cost, and a "must" as a floor (heating) or limit (cooling) with the
|
||||
penalty MUST_EUR_K, inside the bounds and under a building's thermostat cap; a
|
||||
car's ready-by time and energy (a must at EV_MUST_EUR_KWH, a prefer valued
|
||||
at its max_ct per kWh with min_kwh at EV_SHORT_EUR_KWH); a battery's
|
||||
reserve as its floor per step. The plan's "prefs" says per preference
|
||||
whether it is met; with state["prefs_cost"] its "prefs_cost" the cost of
|
||||
each must (pref_costs: the plan made again without it).
|
||||
"""
|
||||
import copy
|
||||
import json
|
||||
import math
|
||||
import sys
|
||||
@@ -67,6 +78,13 @@ COMFORT_EUR_KH = 2.0 # EUR per K and hour below (heating) or above (cooling
|
||||
# while someone is home: above any price (0.30 let a room cool by 1.3 K
|
||||
# at a 40 ct peak); pre-heating in cheap hours still pays
|
||||
EV_SHORT_EUR_KWH = 1.0 # EUR per kWh the car lacks at departure
|
||||
EV_MUST_EUR_KWH = 5.0 # EUR per kWh a car lacks at a "must" ready-by (preferences.py): above any price,
|
||||
# below a building's binding load limit (50) and the grid operator's (500)
|
||||
MUST_EUR_K = 20.0 # EUR per K and slot across a room's "must" (preferences.py): 80 EUR per K·h, so the
|
||||
# heat a room holds (C kWh/K) is not worth letting it fall even at 3 EUR/kWh; it stays
|
||||
# inside the bounds and under a building's cap, so those still win
|
||||
COST_SOLVE_S = 8.0 # s at most per extra plan for a must's cost (pref_costs)
|
||||
COST_MAX = 6 # musts costed per plan at most
|
||||
LIGHT_EUR = 0.002 # EUR per step for a closed cover while someone is home in daylight
|
||||
CHANGE_EUR_KW = 0.002 # EUR per kW a device's power changes from one step to the next: smooth
|
||||
# plans (equal prices would otherwise give any order, and a charger or
|
||||
@@ -245,7 +263,13 @@ class Model:
|
||||
soc0 = cap * min(max(float(st["soc_pct"]), 0.0), 100.0) / 100.0
|
||||
mean_price = sum(self.s["price_import"]) / self.T
|
||||
soc, prev, ch, dis = [], soc0, [], []
|
||||
pref = d.get("pref") # the owner's reserve per step (preferences.py)
|
||||
floors = []
|
||||
for t in range(self.T):
|
||||
lo_t = lo_pct
|
||||
if pref and not (pref.get("off") is not None and pref["group"][t] == pref["off"]):
|
||||
lo_t = min(max(lo_pct, pref["floor_pct"][t]), hi_pct)
|
||||
floors.append(lo_t)
|
||||
c = self.var(0.0, max_ch)
|
||||
x = self.var(0.0, max_dis)
|
||||
z = self.var(0.0, 1.0, integer=True)
|
||||
@@ -255,7 +279,7 @@ class Model:
|
||||
under = self.var(cost=PENALTY_LIMIT / cap * 100) # Wh below the floor, per % of the battery
|
||||
over = self.var(cost=PENALTY_LIMIT / cap * 100)
|
||||
self.h.addConstr(e - prev - self.dt * eff * c + self.dt / eff * x == 0)
|
||||
self.h.addConstr(e + under >= lo_pct / 100.0 * cap)
|
||||
self.h.addConstr(e + under >= lo_t / 100.0 * cap)
|
||||
self.h.addConstr(e - over <= hi_pct / 100.0 * cap)
|
||||
self.flows[t] += [(-1, c), (1, x)]
|
||||
soc.append(e)
|
||||
@@ -267,7 +291,7 @@ class Model:
|
||||
self.h.addConstr(prev + short >= min(soc0, hi_pct / 100.0 * cap))
|
||||
self.smooth([c - x for c, x in zip(ch, dis)])
|
||||
self.devices[d["id"]] = ("battery", {"ch": ch, "dis": dis, "soc": soc, "cap": cap, "max_dis": max_dis,
|
||||
"floor_wh": lo_pct / 100.0 * cap})
|
||||
"floor_wh": lo_pct / 100.0 * cap, "floors": floors})
|
||||
|
||||
def room(self, d, cooling: bool, gains):
|
||||
p, st, b = d["params"], d["state"], d["bounds"]
|
||||
@@ -284,6 +308,8 @@ class Model:
|
||||
internal = self.hourly(p.get("internal_gain_w") or 0.0)
|
||||
solar = float(p.get("solar_m2") or 0.0)
|
||||
ghi = self.s.get("ghi_w_m2") or [0.0] * self.T
|
||||
pref = d.get("pref") # the owner's schedule and overrides (preferences.py)
|
||||
cap = (self.s.get("building") or {}).get("thermostat_cap")
|
||||
for t in range(self.T):
|
||||
if switched:
|
||||
u = self.var(0.0, 1.0, integer=True)
|
||||
@@ -302,7 +328,23 @@ class Model:
|
||||
self.h.addConstr(tt - (1 - a) * prev - sign * self.dt / c * cop / 1000.0 * pw
|
||||
- self.dt / c / 1000.0 * gain == a * self.s["t_out"][t] + self.dt / c / 1000.0 * fixed)
|
||||
occ = self.s["occupied"][t + 1] if t + 1 < self.T else self.s["occupied"][t]
|
||||
target = min(max(comfort if occ else other, lo), hi)
|
||||
want, must = (comfort if occ else other), None
|
||||
if pref:
|
||||
want, must = pref["target"][t], pref["must"][t]
|
||||
if pref.get("off") is not None and pref["group"][t] == pref["off"]:
|
||||
want, must = pref["base"][t], None # pref_costs: the plan without this group
|
||||
target = min(max(want, lo), hi)
|
||||
capped = bool(cap) and cap["from_step"] <= t < cap["to_step"]
|
||||
if must is not None:
|
||||
# a bound inside the bounds in force, and under a building's cap
|
||||
mv = min(max(must, lo), hi)
|
||||
if capped:
|
||||
mv = max(mv, cap["value"]) if cooling else min(mv, cap["value"])
|
||||
cross = self.var(cost=MUST_EUR_K)
|
||||
if cooling:
|
||||
self.h.addConstr(tt - cross <= mv)
|
||||
else:
|
||||
self.h.addConstr(tt + cross >= mv)
|
||||
miss = self.var(cost=COMFORT_EUR_KH * self.dt)
|
||||
under = self.var(cost=PENALTY_LIMIT)
|
||||
over = self.var(cost=PENALTY_LIMIT)
|
||||
@@ -312,8 +354,7 @@ class Model:
|
||||
self.h.addConstr(tt + miss >= target)
|
||||
self.h.addConstr(tt + under >= lo)
|
||||
self.h.addConstr(tt - over <= hi)
|
||||
cap = (self.s.get("building") or {}).get("thermostat_cap")
|
||||
if cap and cap["from_step"] <= t < cap["to_step"]:
|
||||
if capped:
|
||||
miss_cap = self.var(cost=cap["penalty"] * self.dt)
|
||||
if cooling:
|
||||
self.h.addConstr(tt + miss_cap >= cap["value"]) # cooling: not below the cap
|
||||
@@ -345,6 +386,11 @@ class Model:
|
||||
imin = max(float(p["min_current_a"]), b["current_a"][0])
|
||||
dep = departure_step(self.s, str(st.get("departure") or p["departure"]))
|
||||
need = float(st["need_wh"]) if st.get("need_wh") is not None else float(p["need_wh"])
|
||||
pref = d.get("pref") # the owner's ready-by (preferences.py)
|
||||
if pref:
|
||||
dep, need = int(pref["dep_step"]), float(pref["need_wh"])
|
||||
if pref.get("off"):
|
||||
need = 0.0
|
||||
powers, total = [], Lin()
|
||||
for t in range(self.T):
|
||||
if t >= dep or imax < imin:
|
||||
@@ -357,10 +403,21 @@ class Model:
|
||||
self.flows[t].append((-1, pw))
|
||||
powers.append(pw)
|
||||
total += self.dt * pw
|
||||
short = self.var(cost=EV_SHORT_EUR_KWH / 1000.0)
|
||||
self.h.addConstr(total + short >= need)
|
||||
if pref and pref["how"] == "prefer":
|
||||
# a kWh is worth max_ct to the owner (without one: today's), min_kwh at any price
|
||||
worth = EV_SHORT_EUR_KWH if pref.get("max_ct") is None else max(0.0, pref["max_ct"]) / 100.0
|
||||
short = self.var(cost=worth / 1000.0)
|
||||
self.h.addConstr(total + short >= need)
|
||||
mwh = min(float(pref.get("min_wh") or 0.0), need)
|
||||
if mwh > 0:
|
||||
short_min = self.var(cost=EV_SHORT_EUR_KWH / 1000.0)
|
||||
self.h.addConstr(total + short_min >= mwh)
|
||||
else:
|
||||
short = self.var(cost=(EV_MUST_EUR_KWH if pref else EV_SHORT_EUR_KWH) / 1000.0)
|
||||
self.h.addConstr(total + short >= need)
|
||||
self.smooth([p for p in powers if p is not None])
|
||||
self.devices[d["id"]] = ("ev", {"power": powers, "volts": volts, "dep": dep})
|
||||
self.devices[d["id"]] = ("ev", {"power": powers, "volts": volts, "dep": dep,
|
||||
"pmax": imax * volts if imax >= imin else 0.0})
|
||||
|
||||
def cover(self, d, room_ids):
|
||||
p, b = d["params"], d["bounds"]
|
||||
@@ -463,16 +520,198 @@ def plan(s: dict, time_limit: float = 30.0) -> dict:
|
||||
if e is not None and (not entries or _key(entries[-1]) != _key(e)):
|
||||
entries.append({"t": start + t * step, **e})
|
||||
devices[d["id"]] = entries
|
||||
energy = sum(m.eur_wh(t, pi[t]) * x(m.gin[t]) - m.eur_wh(t, s["price_export"][t]) * x(m.gout[t])
|
||||
for t in range(T))
|
||||
market = market_plan(s, m, x)
|
||||
energy += sum(c["cost_eur"] for c in market)
|
||||
energy = energy_of(s, m, x, market)
|
||||
out = {"v": 1, "made": int(time.time()), "start": start, "step_s": step, "status": status,
|
||||
"solve_s": round(time.time() - t0, 2), "devices": devices, "flex": flexibility(m, x),
|
||||
"cost_eur": round(energy, 2), "baseline_eur": round(baseline(s, m, x), 2),
|
||||
"price_note": s.get("price_note", ""), "sources": s.get("sources", {})}
|
||||
if market:
|
||||
out["market"] = market
|
||||
if any(d.get("pref") for d in s["devices"]):
|
||||
out["prefs"] = pref_feedback(s, m, x)
|
||||
if s.get("prefs_cost"):
|
||||
out["prefs_cost"] = pref_costs(s, energy, t0 + time_limit)
|
||||
return out
|
||||
|
||||
|
||||
def energy_of(s, m, x, market=None) -> float:
|
||||
"""The plan's cost for power (EUR): the grid's import less its feed-in,
|
||||
and the market's contracts."""
|
||||
pi, pe = s["price_import"], s["price_export"]
|
||||
e = sum(m.eur_wh(t, pi[t]) * x(m.gin[t]) - m.eur_wh(t, pe[t]) * x(m.gout[t]) for t in range(m.T))
|
||||
return e + sum(c["cost_eur"] for c in (market if market is not None else market_plan(s, m, x)))
|
||||
|
||||
|
||||
def _when(s, ts: float) -> str:
|
||||
return datetime.fromtimestamp(ts, timezone.utc).astimezone(ZoneInfo(s.get("tz") or "UTC")).strftime("%a %H:%M")
|
||||
|
||||
|
||||
TOL_K = 0.3 # a room's target counts as met within this
|
||||
TOL_PCT = 0.5 # a battery's reserve
|
||||
TOL_WH = 50.0 # a car's energy
|
||||
|
||||
|
||||
def pref_feedback(s, m, x) -> list[dict]:
|
||||
"""Per preference (a room's block, boost or away; a car's next ready-by;
|
||||
a battery's reserve): met or not in the plan, and in a few words why.
|
||||
Fields: control, group, kind, how, label, met (None: not in the
|
||||
plan's 48 h, or not plugged in), detail, and per kind the numbers."""
|
||||
out = []
|
||||
start, step, T = s["start"], s["step_s"], m.T
|
||||
for d in s["devices"]:
|
||||
pref = d.get("pref")
|
||||
if not pref:
|
||||
continue
|
||||
kind, v = m.devices.get(d["id"], (d["kind"], None))
|
||||
if kind in ("heating", "cooling") and v:
|
||||
out += _room_feedback(s, d, pref, v, x, kind == "cooling")
|
||||
elif kind == "battery" and v:
|
||||
for gi, g in enumerate(pref["groups"]):
|
||||
ts = [t for t in range(T) if pref["group"][t] == gi]
|
||||
f = {"control": d["id"], "group": g["group"], "kind": "battery", "how": "must", "label": g["text"]}
|
||||
if not ts:
|
||||
out.append(dict(f, met=None, detail="not in the next 48 h"))
|
||||
continue
|
||||
soc = [100.0 * x(v["soc"][t]) / v["cap"] for t in ts]
|
||||
worst = min(range(len(ts)), key=lambda k: soc[k] - v["floors"][ts[k]])
|
||||
miss = v["floors"][ts[worst]] - soc[worst]
|
||||
met = miss <= TOL_PCT
|
||||
f.update(met=met, min_pct=round(min(soc), 1), floor_pct=round(v["floors"][ts[worst]], 1))
|
||||
if not met:
|
||||
f["detail"] = f"{soc[worst]:.0f} % at {_when(s, start + (ts[worst] + 1) * step)}"
|
||||
if d["state"].get("soc_pct") is not None and float(d["state"]["soc_pct"]) < v["floors"][ts[0]]:
|
||||
f["detail"] += f" (starts at {float(d['state']['soc_pct']):.0f} %)"
|
||||
out.append(f)
|
||||
elif kind == "ev":
|
||||
out.append(_ev_feedback(s, d, pref, v, x, m))
|
||||
return out
|
||||
|
||||
|
||||
def _room_feedback(s, d, pref, v, x, cooling) -> list[dict]:
|
||||
out = []
|
||||
start, step, T = s["start"], s["step_s"], len(pref["target"])
|
||||
lo, hi, lo_by, hi_by = (d["bounds"]["temp_c"] + ["device", "device"])[:4]
|
||||
cap = (s.get("building") or {}).get("thermostat_cap")
|
||||
sign = -1.0 if cooling else 1.0
|
||||
for gi, g in enumerate(pref["groups"]):
|
||||
ts = [t for t in range(T) if pref["group"][t] == gi]
|
||||
f = {"control": d["id"], "group": g["group"], "kind": g["kind"], "how": g["how"], "label": g["text"]}
|
||||
if not ts:
|
||||
out.append(dict(f, met=None, detail="not in the next 48 h"))
|
||||
continue
|
||||
notes = []
|
||||
want = []
|
||||
for t in ts:
|
||||
w0 = pref["must"][t] if g["how"] == "must" and pref["must"][t] is not None else pref["target"][t]
|
||||
w = min(max(w0, lo), hi)
|
||||
by = (hi_by if not cooling else lo_by) if sign * (w0 - w) > 1e-9 else None
|
||||
if cap and cap["from_step"] <= t < cap["to_step"]:
|
||||
wc = max(w, cap["value"]) if cooling else min(w, cap["value"])
|
||||
if wc != w:
|
||||
by, w = "building", wc
|
||||
if by and by not in notes:
|
||||
notes.append(by)
|
||||
want.append(w)
|
||||
temps = [x(v["temp"][t]) for t in ts]
|
||||
gap = [sign * (w - tt) for w, tt in zip(want, temps)]
|
||||
k = max(range(len(ts)), key=lambda i: gap[i])
|
||||
met = gap[k] <= TOL_K
|
||||
f.update(met=met, first=start + ts[0] * step, worst_c=round(temps[k], 1), want_c=round(want[k], 1))
|
||||
bits = []
|
||||
if notes:
|
||||
held = min(want) if not cooling else max(want)
|
||||
bits.append(f"held at {held:g} °C by the {notes[0]}'s limit")
|
||||
f["held_by"] = notes[0]
|
||||
if not met:
|
||||
bits.append(f"{temps[k]:.1f} °C at {_when(s, start + (ts[k] + 1) * step)}")
|
||||
if bits:
|
||||
f["detail"] = "; ".join(bits)
|
||||
out.append(f)
|
||||
return out
|
||||
|
||||
|
||||
def _ev_feedback(s, d, pref, v, x, m) -> dict:
|
||||
start, step = s["start"], s["step_s"]
|
||||
f = {"control": d["id"], "group": pref["group"], "kind": "ev", "how": pref["how"],
|
||||
"label": f"car {pref['text']}", "at": pref["at"], "need_kwh": round(pref["need_wh"] / 1000.0, 2)}
|
||||
plug = f"; plugged in at {_when(s, pref['plugged_at'])}" if pref.get("plugged_at") else ""
|
||||
if pref.get("note"):
|
||||
f["note"] = pref["note"]
|
||||
if v is None:
|
||||
return dict(f, met=None if pref["how"] == "prefer" else False, detail="not plugged in")
|
||||
pw = [x(p) if p is not None else 0.0 for p in v["power"]]
|
||||
dep = min(v["dep"], len(pw))
|
||||
wh = sum(m.dt * p for p in pw[:dep])
|
||||
short = max(0.0, pref["need_wh"] - wh)
|
||||
pi = s["price_import"]
|
||||
f["planned_kwh"] = round(wh / 1000.0, 2)
|
||||
f["charge_eur"] = round(sum(m.eur_wh(t, pi[t]) * pw[t] for t in range(dep)), 2)
|
||||
reached = ""
|
||||
if pref.get("soc_pct") is not None and pref.get("capacity_wh"):
|
||||
pct = min(100.0, float(pref["soc_pct"]) + 100.0 * wh / pref["capacity_wh"])
|
||||
f["reached_pct"] = round(pct, 0)
|
||||
reached = f"{pct:.0f} %"
|
||||
else:
|
||||
reached = f"{wh / 1000.0:.1f} kWh"
|
||||
when = _when(s, pref["at"])
|
||||
if pref.get("beyond"):
|
||||
f.update(met=None, detail=f"{reached} by the end of the plan (the ready-by is later){plug}")
|
||||
return f
|
||||
if pref["how"] == "prefer":
|
||||
f["met"] = short <= max(TOL_WH, 0.01 * pref["need_wh"])
|
||||
f["detail"] = f"{reached} by {when}" + ("" if f["met"] else
|
||||
f" ({short / 1000.0:.1f} kWh less: dearer than the price wanted)") + plug
|
||||
return f
|
||||
f["met"] = short <= max(TOL_WH, 0.01 * pref["need_wh"])
|
||||
if f["met"]:
|
||||
f["detail"] = f"{reached} by {when}{plug}"
|
||||
return f
|
||||
# a must it cannot meet: by how much, and when it could be ready at full power from now
|
||||
f["short_kwh"] = round(short / 1000.0, 2)
|
||||
rate = v.get("pmax") or 0.0
|
||||
if rate > 0:
|
||||
n = math.ceil(pref["need_wh"] / (rate * m.dt) - 1e-9)
|
||||
f["ready_at"] = int(start + n * step)
|
||||
can = f"; ready at full power by {_when(s, f['ready_at'])}"
|
||||
else:
|
||||
can = "; it may not charge now (a limit holds it at 0 A)"
|
||||
f["detail"] = f"{reached} by {when}, short by {short / 1000.0:.1f} kWh{can}{plug}"
|
||||
return f
|
||||
|
||||
|
||||
def pref_costs(s, energy: float, deadline: float) -> dict:
|
||||
"""Each must's cost (EUR a day): the plan's cost for power less that of
|
||||
the plan made again without it (a room's block at its setback, a
|
||||
battery's reserve at its floor before); a car's must: what its charging
|
||||
costs (no second plan). At most COST_MAX, each within COST_SOLVE_S and
|
||||
the time left."""
|
||||
out = {}
|
||||
days = s["steps"] * s["step_s"] / 86400.0
|
||||
n = 0
|
||||
for i, d in enumerate(s["devices"]):
|
||||
pref = d.get("pref")
|
||||
if not pref or d["kind"] not in ("heating", "cooling", "battery"):
|
||||
continue
|
||||
for gi, g in enumerate(pref["groups"]):
|
||||
if g["how"] != "must" or gi not in pref["group"]:
|
||||
continue
|
||||
left = deadline - time.time() - 1.0
|
||||
if n >= COST_MAX or left < 1.0:
|
||||
return out
|
||||
n += 1
|
||||
s2 = copy.deepcopy(s)
|
||||
s2["prefs_cost"] = False
|
||||
s2["devices"][i]["pref"]["off"] = gi
|
||||
try:
|
||||
m2 = Model(s2)
|
||||
m2.solve(min(COST_SOLVE_S, left))
|
||||
val = m2.h.getSolution().col_value
|
||||
e2 = energy_of(s2, m2, lambda v: val[v.index])
|
||||
except Exception: # noqa: BLE001 - a cost is not worth failing the plan
|
||||
continue
|
||||
c = (energy - e2) / days
|
||||
out[g["group"]] = round(c if abs(c) >= 0.005 else 0.0, 2)
|
||||
return out
|
||||
|
||||
|
||||
@@ -546,7 +785,9 @@ def flexibility(m, x) -> dict:
|
||||
for t in range(min(n, len(cols or []))):
|
||||
if cols[t] is not None and hasattr(cols[t], "index"): # an EV's steps after departure are empty
|
||||
shed[t] += max(x(cols[t]), 0.0)
|
||||
return {"grid_w": grid, "shed_w": [round(min(sh, g)) for sh, g in zip(shed, grid)]}
|
||||
# net_w: import less export, the member's draw as planned (the box's forecast of it upward, boxtrain.py)
|
||||
return {"grid_w": grid, "shed_w": [round(min(sh, g)) for sh, g in zip(shed, grid)],
|
||||
"net_w": [round(x(m.gin[t]) - x(m.gout[t])) for t in range(n)]}
|
||||
|
||||
|
||||
def _charge_why(pi, t) -> str:
|
||||
@@ -607,6 +848,14 @@ def _entry(d, kind, v, t, x, s, pi, grid_w=(1e9, 1e9)):
|
||||
temp = x(v["temp"][t])
|
||||
pw = x(v["power"][t])
|
||||
ahead = s["occupied"][min(t + 4, s["steps"] - 1)]
|
||||
pref = d.get("pref")
|
||||
if pref:
|
||||
# a schedule: "someone home" is a target above the setback ahead
|
||||
# (below the setup, cooling); its target in place of comfort/setback
|
||||
sign = -1 if kind == "cooling" else 1
|
||||
tg, k0 = pref["target"], max(t - 1, 0)
|
||||
occ = sign * (tg[k0] - pref["base"][k0]) > 0
|
||||
ahead = any(sign * (tg[k] - tg[k0]) > 0 for k in range(t, min(t + 4, len(tg))))
|
||||
if kind == "heating" and v["switched"]:
|
||||
on = pw > 0.5 * v["pmax"]
|
||||
why = ("pre-heat before someone is home" if on and not occ and ahead else
|
||||
@@ -630,6 +879,10 @@ def _entry(d, kind, v, t, x, s, pi, grid_w=(1e9, 1e9)):
|
||||
occ1 = s["occupied"][min(t + 1, s["steps"] - 1)]
|
||||
p = d["params"]
|
||||
want = float(p["comfort_c"]) if occ1 else float(p["setback_c"])
|
||||
if pref:
|
||||
want = float(pref["target"][t])
|
||||
if pref["must"][t] is not None:
|
||||
want = max(want, float(pref["must"][t]))
|
||||
floor_t = min(max(math.floor(want * 2) / 2, math.ceil(lo * 2) / 2), math.floor(hi * 2) / 2)
|
||||
return {"set": min(target, floor_t), "why": "setback: away or night" if not occ else "warm enough"}
|
||||
return {"set": target, "why": f"pre-heat while power is cheap ({pi[t]:.1f} ct)" if not occ and ahead
|
||||
|
||||
Reference in new issue
Block a user