diff --git a/frontend/src/views/BriefingView.vue b/frontend/src/views/BriefingView.vue index 397c8bf..ff05bc9 100644 --- a/frontend/src/views/BriefingView.vue +++ b/frontend/src/views/BriefingView.vue @@ -63,11 +63,13 @@ const loadingMessages = ref(false) // Weather panel (left column) const weatherData = ref([]) +const tempUnit = ref('C') async function loadWeather() { try { - const data = await apiGet<{ locations: WeatherData[] }>('/api/briefing/weather') + const data = await apiGet<{ locations: WeatherData[]; temp_unit: string }>('/api/briefing/weather') weatherData.value = data.locations ?? [] + tempUnit.value = data.temp_unit ?? 'C' } catch { /* silent */ } } @@ -296,6 +298,7 @@ onMounted(async () => { v-for="loc in weatherData" :key="(loc as WeatherData).location" :weather="loc" + :temp-unit="tempUnit" />
No weather configured
diff --git a/src/fabledassistant/routes/briefing.py b/src/fabledassistant/routes/briefing.py index 24a0d18..f6f0bca 100644 --- a/src/fabledassistant/routes/briefing.py +++ b/src/fabledassistant/routes/briefing.py @@ -143,7 +143,7 @@ async def get_weather(): card for row in rows if (card := weather_svc.parse_weather_card_data(row, temp_unit)) is not None ] - return jsonify({"locations": cards}) + return jsonify({"locations": cards, "temp_unit": temp_unit}) @briefing_bp.route("/weather/geocode", methods=["POST"])