Skip to main content

Weather

A tactical, command-center style panel that reports current conditions, supporting metrics, and a short forecast for a configured city. The location is geocoded on demand and live data comes from the keyless Open-Meteo API, so no API key or ArcGIS source is required.

At a glance

Type keyweather
Default size4 × 12 (min 3 × 8)
Data sourceA city name (geocoded to coordinates)
Emits
Receives
Sourcesrc/widgets/widgets/weather/

Configuration

FieldTypeDefaultPurpose
citystring"Quito, Ecuador"City to monitor. May include the region inline (e.g. Chicago, IL). Empty shows a setup prompt.
countryOrRegionstring"Ecuador"Optional country/region/state to disambiguate the city.
latitudenumberResolved latitude. Set automatically once geocoded; when present, geocoding is skipped.
longitudenumberResolved longitude. See above.
units"metric" | "imperial""metric"Measurement system (°C · km/h · km, or °F · mph · mi).
refreshIntervalMinutesnumber (5–180)30How often the widget refetches conditions.
titlestringLabel for the weather panel's own header. Empty uses the monitored location (city/region). Distinct from the card title.
showHeaderbooleantrueShow the weather panel's own header row (location label + refresh button). When off in compact mode, the icon and temperature grow to fill the space.
showRefreshbooleantrueShow the manual refresh button in the header.
compactbooleanfalseCompact mode — show only the header, condition icon, and current temperature.
compactLayouticon-top | icon-bottom | icon-left | icon-righticon-topArrangement of the icon relative to the temperature in compact mode.
showForecastbooleantrueShow the forecast strip.
forecastDaysnumber (0–7)3How many forecast days the strip shows (in addition to the upcoming hours).
showLastUpdatedbooleantrueShow the "Updated:" timestamp in the footer.
showSourcebooleantrueShow the "Source: Open-Meteo" attribution in the footer.

Config panel

  • Data — the city, an optional country/region to disambiguate it, the unit system, and the auto-refresh interval. Editing the city or region clears any resolved coordinates so the new place is geocoded fresh.
  • Appearance — a Show header toggle for the weather panel's own header, and when shown, a Refresh button toggle and a Header label (defaults to the monitored location); a compact-mode toggle (with an icon-position selector); and toggles for the forecast strip (with a forecast-days count), the last-updated timestamp, and the source attribution. The section toggles are hidden while compact mode is on. These are separate from the drawer's Show card header / Card title controls, which govern the outer card chrome around any widget.

Cross-widget actions

None.

What it shows

  • Header — the monitored location (or a custom title) with a manual refresh control.
  • Primary summary — a condition icon, large current temperature, and condition label with feels-like temperature, laid out as three even columns.
  • Metric grid — high/low, humidity, precipitation chance, wind (with compass direction), pressure, and visibility.
  • Forecast strip — a few upcoming hours followed by the configured number of days, centered within the panel (optional).
  • Footer — the Open-Meteo source and a last-updated timestamp; each side is independently toggleable and the row collapses when both are off.

In compact mode only the header, condition icon, and current temperature are shown — the metric grid, forecast strip, and footer are hidden. The icon can be placed above, below, left, or right of the temperature via compactLayout, and the icon, text, and spacing scale with the widget's size.

States

  • Empty — when no city is set, a "Select a city to begin weather monitoring" prompt with a configure button.
  • Loading — the standard widget loader (a small spinner with a quiet "Loading" label), shared by every widget for a consistent feel.
  • Error — a compact "Weather unavailable for this location" message with a retry action; geocoding misses report a more specific "no location found".
  • Stale — when a refresh fails, the last good reading stays on screen and the footer timestamp is flagged as stale rather than blanking the panel.

Notable behavior

  • Keyless data — geocoding and forecasts both come from Open-Meteo, so there are no API keys to manage. All network access lives in weatherProvider.ts; the React layer uses the useWeatherData hook and never calls fetch directly.
  • Geocoding fallback — once a city resolves, its coordinates are reused on subsequent fetches, so conditions keep loading even if the geocoder is briefly unavailable.
  • Auto-refresh — the widget polls on refreshIntervalMinutes and supports manual refresh from the header. Rapid config edits are debounced so typing a city name doesn't hammer the geocoder.