fix 500
Some checks failed
CI and deploy / migration-check (push) Failing after 10s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-20 11:11:47 +02:00
parent b8515f30df
commit a07f5d57cb
6 changed files with 94 additions and 27 deletions

View File

@@ -126,9 +126,9 @@ async def get_site_status_full(
tomorrow_slots = int(bundle.get("tomorrow_price_slot_count") or 0)
now_utc = datetime.now(timezone.utc)
hb_last = hb_row.get("last_seen") if hb_row else None
hb_last = _parse_ts(hb_row.get("last_seen") if hb_row else None)
hb_age = _age_seconds(hb_last)
inv_measured = inv_row.get("measured_at") if inv_row else None
inv_measured = _parse_ts(inv_row.get("measured_at") if inv_row else None)
inv_age = _age_seconds(inv_measured)
next_start, next_bat = _next_plan_interval(intervals, now_utc)