diff --git a/src/fabledassistant/routes/briefing.py b/src/fabledassistant/routes/briefing.py index 6089c08..1eb4d8e 100644 --- a/src/fabledassistant/routes/briefing.py +++ b/src/fabledassistant/routes/briefing.py @@ -129,8 +129,13 @@ async def recent_items(): @briefing_bp.route("/weather", methods=["GET"]) @_REQUIRE async def get_weather(): - data = await weather_svc.get_cached_weather(g.user.id) - return jsonify({"locations": data}) + rows = await weather_svc.get_cached_weather_rows(g.user.id) + temp_unit = await get_setting(g.user.id, "temperature_unit", "C") + cards = [ + card for row in rows + if (card := weather_svc.parse_weather_card_data(row, temp_unit)) is not None + ] + return jsonify({"locations": cards}) @briefing_bp.route("/weather/geocode", methods=["POST"])