Skip to content
Stand with Ukraine flag

Weather Forecast Cards

  • Widget
  • 30 installs
  • v1.0.0
  • Aug 6, 2026
  • MIT license
  • v4.2+
Weather Forecast Cards

Displays a multi-day weather forecast — temperature, humidity, wind, sunrise/sunset — for any entity with latitude/longitude telemetry, using the free Open-Meteo API. No API key required.

Widget Type
  • Latest
Category
  • Cards & Info
Use Cases
  • Environment Monitoring
  • Smart Farming
  • Smart City
  • Asset Tracking
  • Smart Energy
  • Air Quality Monitoring

Who it’s for

Facility managers, farmers, fleet operators, and site engineers build dashboards around a physical location, not just a device. They ask questions like “is rain coming to the greenhouse this week?”, “what’s the forecast at our warehouse location?”, or “how windy will it get at the site tomorrow?” — without wiring up a separate weather service themselves.

What it does

An entity carrying latitude: 55.6761 and longitude: 12.5683 renders as a multi-day forecast for Copenhagen, Denmark — daily highs, lows, humidity, wind speed, sunrise, and sunset, with no manual location entry.

  • A horizontally scrollable row of daily cards shows max/min temperature, humidity, wind speed, sunrise/sunset, and a weather icon for each day.
  • An optional expandable hourly panel shows hour-by-hour detail for the selected day, once Layout view is set to the expansion-panel style.
  • A geocoded location label in the header names the place (e.g. “Copenhagen, Denmark”) instead of showing bare coordinates.
  • Local browser caching (configurable duration) avoids refetching on every dashboard load; a manual sync button forces a refresh at any time.
  • A time range selector switches the forecast between Today, 3 Days, Week, and Month.
  • Shows the forecast for one location; it does not display historical weather or compare several sites in one card — add one widget per location for that.

Requirements

The forecast comes from two external services, not from ThingsBoard: Open-Meteo supplies the weather data (no API key needed), and BigDataCloud’s free reverse-geocoding endpoint supplies the location name shown in the header. Both are third-party services with their own uptime and rate limits, and neither needs a credential stored in ThingsBoard.

How to set up

Data keys

KeyRoleTypeDescription
Latitude key (latitude by default, user-configurable)Location — latitudeAttribute or TimeseriesNumeric degrees
Longitude key (longitude by default, user-configurable)Location — longitudeAttribute or TimeseriesNumeric degrees

This widget takes exactly one datasource — a single entity or a Function datasource — that carries both values. If your keys aren’t named latitude and longitude, set the matching names under Settings → Datasource. Without both keys resolving to a number, the widget has no coordinates to query and shows no forecast.

Time range

SettingDefaultEffect
Default time range3 DaysSets how many days of forecast are fetched from Open-Meteo (Today / 3 Days / Week / Month) — a longer range pulls more data per load, not just a wider display

How to customize

  • To switch units — set Temperature unit to Fahrenheit under Settings → Display.
  • To see hourly detail per day — set Layout view to “Card view with expansion panel,” then click a day card to expand it.
  • To hide the header controls (range selector, location badge, sync button) — turn off Display header.
  • To hide weather icons — turn off Display weather icons.
  • To reduce API calls — increase Cache duration (hours) under Settings → Performance; the sync button still forces an on-demand refresh regardless of the cache window.
  • To restyle the cards — adjust Card background color, Value font / Value text color (temperature figures), Primary font / color (dates), Secondary font / color (metadata), and Highlight color (selected day) under Settings → Styles.

Tips

  • A static server attribute works as well as a telemetry key for latitude and longitude — a fixed site like a warehouse or a greenhouse rarely needs live GPS reporting.
  • Raise Cache duration when a location rarely changes, to cut down on API calls; the sync button still gets you current conditions on demand.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.