diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 2fb2013..53eb3ec 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -35,6 +35,7 @@ export default function Settings() { const [weatherPeakC, setWeatherPeakC] = useState(null) const [weatherTier, setWeatherTier] = useState(null) + const [weatherLoaded, setWeatherLoaded] = useState(false) const [publicAreaName, setPublicAreaName] = useState('') const [creatingZone, setCreatingZone] = useState(false) @@ -61,7 +62,10 @@ export default function Settings() { setDefaults({ ...DEFAULT_HVAC_TEMPLATE, ...cfg.hvac_defaults, ac_occupied_tiers: cfg.hvac_defaults?.ac_occupied_tiers ?? DEFAULT_HVAC_TEMPLATE.ac_occupied_tiers }) }).catch(() => {}) fetchMqttStatus().then(s => { setMqttConnected(s.connected); setMqttNote(s.note) }).catch(() => {}) - fetchStatus().then(s => { setWeatherPeakC(s.weather_peak_c); setWeatherTier(s.weather_tier) }).catch(() => {}) + fetchStatus() + .then(s => { setWeatherPeakC(s.weather_peak_c); setWeatherTier(s.weather_tier) }) + .catch(() => {}) + .finally(() => setWeatherLoaded(true)) }, []) function toggleExcluded(siteId: string) { @@ -348,6 +352,13 @@ export default function Settings() { <> Today's forecast peak: {weatherPeakC}°C{weatherTier ? <> — currently in the {weatherTier} tier : ' — below every tier'}. )}

+ {weatherLoaded && weatherPeakC == null && ( +

+ No forecast available right now — check Hotel Location and Met Office DataHub under Settings → + Integrations are saved correctly (both need a Test to pass), or check hvac-backend's logs for + a "[weather]" line explaining why. +

+ )}
TierIf peak above (°C)On/OffModeSetpoint (°C)Fan speed