Documentation

Weather

urdeck.widgets.weather is a 4x2 card with an icon (an animated colour one, or an outline glyph in themes that have an icon set; day and night variants), the temperature, the condition in words, today’s high and low, the place, and sunrise and sunset in the place’s own local time. At 4x4 the same card sits on top of a forecast: what it feels like, the humidity and the wind, the snow expected over the days shown, and one column per day with the weekday, an icon, high and low, the chance of precipitation and the rain and snow expected.

It takes its data from the weather provider (Open-Meteo) and needs no provider setting: the place is typed into the widget.

4x4 Current conditions with the forecast for the days ahead.
4x2 Current conditions on a shorter card.
{ "typeId": "urdeck.widgets.weather", "col": 0, "row": 0, "width": 4, "height": 2, "location": "Portland, OR" }
{ "typeId": "urdeck.widgets.weather", "col": 0, "row": 2, "width": 4, "height": 4, "location": "Portland, OR", "unit": "fahrenheit", "days": 5 }

Settings

In the editor, add the widget on Pages and select it: the pane on the right shows these settings with a control for each. The file keys are listed for reference.

SettingValueDefaultMeaning
locationa place nameThe place to show: search for it and pick a match. There is no default: with none the card shows dashes.
labeltextThe name shown for the place. Left out, it is the place's name; a text replaces it, and none shows no name. Left out: The place name.
unitcelsius, fahrenheitCelsius means kilometres per hour, millimetres and centimetres; Fahrenheit means miles per hour and inches. Left out, it follows the region.
dayswhole number from 1 to 7How many forecast days the card shows, from 1 to 7. Only at 4x4. Left out: 5.
motionperiodic, full, offHow the weather icon moves: now and then, all the time, or not at all. No effect under a theme that names an icon set, whose icons do not move.
periodSecondsnumber, at least 1How long from one start of the icon's loop to the next when it moves now and then. Applies when motion is periodic. Left out: 60.
animateForecasttrue or falseLets the forecast icons move as the icon motion says. Off by default: each moving icon costs about 2.7 MB of memory. No effect under a theme that names an icon set. Only at 4x4.

The card’s parts follow the theme: at 4x4 the rule between now and the forecast is the theme’s divider, each forecast day can sit on the theme’s well, and the condition on its chip (a pill, in some themes). A theme that sets none of them draws the card as before.

Icons

With a theme that names an icon set ("icons": { "set": "outline" }, as Carbon and Paper do) the card draws outline glyphs instead of the animated colour icons, for the current condition and for each forecast day, in the theme’s icons.stroke and icons.tint, with its icons.glow if it has one. They are pictures: nothing moves, the card is repainted only when what it shows changes, and it keeps no animation or image cache. With the tint ramp each glyph takes its colour from the theme’s colors.ramp by temperature, from -10 to 40 degrees Celsius (the current temperature for the main icon, the day’s high for a forecast day, whichever unit the card shows). A theme with no icon set shows the animated icons.

Places and updates

Any number of weather cards can show different places on one page; two cards with the same place share one request. A new or edited place is fetched at once. The data is fetched every 15 minutes ("providers": { "weather": { "intervalMs": 600000 } }; the minimum is 5 minutes). When the network is down the values stay on the card in the dimmed colour and come back by themselves.