Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Weather Forecast Cards

  • Widget
  • 55 installs
  • v1.0.0
  • Aug 6, 2026
  • MIT license
  • v4.2+

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.