From 7b9515010189039ee17c44a51f6e907843d4c3e2 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 28 Mar 2026 12:49:36 -0400 Subject: [PATCH] fix: read temp_unit from briefing_config not a nonexistent temperature_unit setting --- src/fabledassistant/routes/briefing.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fabledassistant/routes/briefing.py b/src/fabledassistant/routes/briefing.py index 5943241..238fa11 100644 --- a/src/fabledassistant/routes/briefing.py +++ b/src/fabledassistant/routes/briefing.py @@ -130,7 +130,15 @@ async def recent_items(): @_REQUIRE async def get_weather(): rows = await weather_svc.get_cached_weather_rows(g.user.id) - temp_unit = await get_setting(g.user.id, "temperature_unit", "C") + import json as _json + raw = await get_setting(g.user.id, "briefing_config", "{}") + try: + _cfg = _json.loads(raw) if isinstance(raw, str) else (raw or {}) + temp_unit = _cfg.get("temp_unit", "C") + if temp_unit not in ("C", "F"): + temp_unit = "C" + except Exception: + temp_unit = "C" cards = [ card for row in rows if (card := weather_svc.parse_weather_card_data(row, temp_unit)) is not None