TWC Weather
The $twcweather
system variable provides data from The Weather Company following the shutdown of the Weather Underground API that powered $weather
. $twcweather
was introduced in webCoRE v0.3.10a.20190223. See sample data below which is available for webCoRE installs running on the SmartThings platform.
Note: If you discover useful data that is not listed here, feel free to post in this thread so we can update this page accordingly.
If you are interested in $twcweather.alerts
data, check this page.
Contents
Conditions
Expression | Sample value |
---|---|
$twcweather.conditions.cloudCeiling
|
null, 100, 2100, 8500
|
$twcweather.conditions.cloudCoverPhrase
|
"Clear", "Partly Cloudy", "Mostly Cloudy", "Cloudy"
|
$twcweather.conditions.dayOfWeek
|
"Wednesday"
|
$twcweather.conditions.dayOrNight
|
"D", "N"
|
$twcweather.conditions.expirationTimeUtc
|
1545249077
|
$twcweather.conditions.iconCode
|
32
|
$twcweather.conditions.iconCodeExtend
|
3200
|
$twcweather.conditions.obsQualifierCode
|
null
|
$twcweather.conditions.obsQualifierSeverity
|
null
|
$twcweather.conditions.precip1Hour
|
0
|
$twcweather.conditions.precip6Hour
|
0
|
$twcweather.conditions.precip24Hour
|
0
|
$twcweather.conditions.pressureAltimeter
|
1018.29
|
$twcweather.conditions.pressureChange
|
-2.71
|
$twcweather.conditions.pressureMeanSeaLevel
|
1018.5
|
$twcweather.conditions.pressureTendencyCode
|
0, 1, 2
|
$twcweather.conditions.pressureTendencyTrend
|
"Steady", "Rising", "Falling"
|
$twcweather.conditions.relativeHumidity
|
55
|
$twcweather.conditions.snow1Hour
|
0
|
$twcweather.conditions.snow6Hour
|
0
|
$twcweather.conditions.snow24Hour
|
0
|
$twcweather.conditions.sunriseTimeLocal
|
"2018-12-19T07:28:58-0500"
|
$twcweather.conditions.sunriseTimeUtc
|
1545222538
|
$twcweather.conditions.sunsetTimeLocal
|
"2018-12-19T17:10:52-0500"
|
$twcweather.conditions.sunsetTimeUtc
|
1545257452
|
$twcweather.conditions.temperature
|
10
|
$twcweather.conditions.temperatureChange24Hour
|
-2
|
$twcweather.conditions.temperatureDewPoint
|
2
|
$twcweather.conditions.temperatureFeelsLike
|
9
|
$twcweather.conditions.temperatureHeatIndex
|
10
|
$twcweather.conditions.temperatureMax24Hour
|
12
|
$twcweather.conditions.temperatureMaxSince7Am
|
10
|
$twcweather.conditions.temperatureMin24Hour
|
-3
|
$twcweather.conditions.temperatureWindChill
|
9
|
$twcweather.conditions.uvDescription
|
"Extreme", "Very High", "High", "Moderate", "Low", "No Report", "Not Available"
|
$twcweather.conditions.uvIndex
|
1
|
$twcweather.conditions.validTimeLocal
|
"2018-12-19T14:41:17-0500"
|
$twcweather.conditions.validTimeUtc
|
1545248477
|
$twcweather.conditions.visibility
|
16.09
|
$twcweather.conditions.windDirection
|
180
|
$twcweather.conditions.windDirectionCardinal
|
"S", "SSE", "SE", "ESE", "E", "ENE", "NE", "NNE", "N", "NNW", "NW", "WNW", "W", "WSW", "SW", "SSW", "CALM", "VAR"
|
$twcweather.conditions.windGust
|
null, 22
|
$twcweather.conditions.windSpeed
|
6
|
$twcweather.conditions.wxPhraseLong
(weather phrase up to 32 characters) |
"Clear", "Cloudy", "Cloudy/Wind", "Fair", "Fair/Wind", "Fog", "Heavy Rain", "Heavy Rain/Wind", "Light Rain", "Light Rain/Wind", "Light Rain with Thunder", "Mostly Cloudy", "Mostly Cloudy/Wind", "Partly Cloudy", "Partly Cloudy/Wind", "Rain Shower", "Rain Shower/Wind", "Rain Shower with Thunder", "Rain/Wind", "Showers in the Vicinity", "Sunny", "Sunny/Wind"
|
$twcweather.conditions.wxPhraseMedium
(weather phrase up to 22? characters) |
"Clear", "Cloudy", "Cloudy/Wind", "Fair", "Fair/Wind", "Fog", "Heavy Rain", "Heavy Rain/Wind", "Light Rain", "Light Rain and Thunder", "Light Rain/Wind", "Mostly Cloudy", "Mostly Cloudy/Wind", "Partly Cloudy", "Partly Cloudy/Wind", "Rain Shower", "Rain Shower and Thunder", "Rain Shower/Wind", "Rain/Wind", "Showers in Vicinity", "Sunny", "Sunny/Wind"
|
$twcweather.conditions.wxPhraseShort
(weather phrase up to 12 characters) |
"Clear", "Cloudy", "Cloudy/Wind", "Fair", "Fair/Wind", "Fog", "Heavy Rain", "Light Rain", "M Cldy/Wind", "M Cloudy", "P Cldy/Wind", "P Cloudy", "Rain Shower", "Rain/Thunder", "Rain/Wind", "Showers Near", "Shower/Wind", "Sunny", "Sun/Wind"
|
Forecast
15 day forecast; append the index to get an individual day. For example, $twcweather.forecast.temperatureMin[0]
is today's low temperature.
Expression | Sample value |
---|---|
$twcweather.forecast.dayOfWeek
|
[ "Wednesday", "Thursday", "Friday", "Saturday" ] |
$twcweather.forecast.expirationTimeUtc
|
[ 1545251268, 1545251268, 1545251268, 1545251268 ] |
$twcweather.forecast.moonPhase
|
[ "First Quarter", "Full Moon", "Last Quarter", "New Moon", "Waning Crescent", "Waning Gibbous", "Waxing Crescent", "Waxing Gibbous" ] |
$twcweather.forecast.moonPhaseCode
|
[ "F", "FQ", "LQ", "N", "WNC", "WNG", "WXC", "WXG" ] |
$twcweather.forecast.moonPhaseDay
|
[ 11, 12, 13, 15 ] |
$twcweather.forecast.moonriseTimeLocal
|
[ "2018-12-19T15:04:06-0500", "2018-12-20T15:44:43-0500", "2018-12-21T16:32:25-0500", "2018-12-22T17:26:58-0500" ] |
$twcweather.forecast.moonriseTimeUtc
|
[ 1545249846, 1545338683, 1545427945, 1545517618 ] |
$twcweather.forecast.moonsetTimeLocal
|
[ "2018-12-19T03:50:48-0500", "2018-12-20T04:56:24-0500", "2018-12-21T06:03:51-0500", "2018-12-22T07:11:16-0500" ] |
$twcweather.forecast.moonsetTimeUtc
|
[ 1545209448, 1545299784, 1545390231, 1545480676 ] |
$twcweather.forecast.narrative
|
[ "A few clouds. Highs in the low 50s and lows in the upper 30s.", "Chance of afternoon showers. Highs in the mid 60s and lows in the mid 50s.", "Cloudy with rain. Highs in the mid 50s and lows in the upper 30s.", "Cloudy. Highs in the low 50s and lows in the low 40s.", "Mix of sun and clouds. Highs in the mid 60s and lows in the low 50s.", "More sun than clouds. Highs in the low 70s and lows in the upper 50s.", "Mostly sunny. Highs in the upper 40s and lows in the low 30s." "Partly cloudy. Highs in the mid 60s and lows in the low 50s.", "Plenty of sun. Highs in the upper 60s and lows in the upper 50s.", "Rain and wind. Highs in the low 50s and lows in the low 40s.", "Scattered thunderstorms possible. Highs in the mid 60s and lows in the mid 50s.", "Showers possible in the afternoon. Highs in the upper 60s and lows in the upper 50s.", "Showers possible. Highs in the upper 60s and lows in the upper 50s.", "Times of sun and clouds. Highs in the mid 60s and lows in the mid 50s." ] |
$twcweather.forecast.qpf
|
[ 0, 1.44, 0.49, 0 ] |
$twcweather.forecast.qpfSnow
|
[ 0, 0, 0, 0 ] |
$twcweather.forecast.sunriseTimeLocal
|
[ "2018-12-19T07:28:58-0500", "2018-12-20T07:29:31-0500", "2018-12-21T07:30:02-0500", "2018-12-22T07:30:32-0500" ] |
$twcweather.forecast.sunriseTimeUtc
|
[ 1545222538, 1545308971, 1545395402, 1545481832 ] |
$twcweather.forecast.sunsetTimeLocal
|
[ "2018-12-19T17:10:52-0500", "2018-12-20T17:11:19-0500", "2018-12-21T17:11:47-0500", "2018-12-22T17:12:18-0500" ] |
$twcweather.forecast.sunsetTimeUtc
|
[ 1545257452, 1545343879, 1545430307, 1545516738 ] |
$twcweather.forecast.temperatureMax
|
[ 51, 49, 54, 49 ] |
$twcweather.forecast.temperatureMin
|
[ 38, 47, 37, 31 ] |
$twcweather.forecast.validTimeLocal
|
[ "2018-12-19T07:00:00-0500", "2018-12-20T07:00:00-0500", "2018-12-21T07:00:00-0500", "2018-12-22T07:00:00-0500" ] |
$twcweather.forecast.validTimeUtc
|
[ 1545220800, 1545307200, 1545393600, 1545480000 ] |
Partial day forecast
The forecast includes morning and evening data for various attributes. The indexes begin at 0 for "this morning" so 2 is tomorrow morning and 3 is tomorrow evening (see the daypartName
value). To show an icon for tonight's weather you would get the icon code with the expression $twcweather.forecast.daypart[0].iconCode[1]
Note that the first value for some attributes may be blank in the evening. For example, running a piston in the morning you may get $twcweather.forecast.daypart[0].cloudCover => [ 25, 79, 100, ...]
but that same evening $twcweather.forecast.daypart[0].cloudCover => [ null, 79, 100, ...]
.
Preliminary testing shows that today's morning/daytime data [0] turns null shortly after 3PM each day, and the next day's data shifts to [0] and [1] shortly after 3AM. This means from approximately 3PM to 3AM, you will find [0] to be null, and [1] will show data from the evening/night in progress. This also means that at about 3AM, the data for the night in progress vanishes, and is replaced with data for the following day/night.
Here's my findings over 20 days/40 events: … (Graph shown here)
* 22 changed between 2:58 and 3:10 (55% of the time) * 10 changed between 3:10 and 3:20 (25% of the time) * 8 changed between 3:20 and 3:36 (20% of the time) |
Expression | Sample value |
---|---|
$twcweather.forecast.daypart[0].cloudCover
|
[ 14, 79, 100 ] |
$twcweather.forecast.daypart[0].dayOrNight
|
[ "D", "N" ] |
$twcweather.forecast.daypart[0].daypartName
|
[ "Today", "Tonight", "Tomorrow", "Tomorrow night", "Friday", "Friday night", "Saturday", "Saturday night" ] |
$twcweather.forecast.daypart[0].iconCode
|
[ 34, 27, 12, 26, 33 ] |
$twcweather.forecast.daypart[0].iconCodeExtend
|
[ 3400, 2700, 1200, 2600, 3300 ] |
$twcweather.forecast.daypart[0].narrative
|
[ "Lots of sunshine. High 51F. Winds light and variable.", "Partly cloudy early followed by cloudy skies overnight. Low 38F. Winds light and variable.", "Rain likely. High 49F. Winds NE at 5 to 10 mph. Chance of rain 100%. Rainfall near an inch.", "Rain likely. Low 47F. Winds light and variable. Chance of rain 90%. Rainfall near a half an inch.", "Periods of rain. Thunder possible. High 54F. Winds SSW at 5 to 10 mph. Chance of rain 100%.", "Cloudy. Low 37F. Winds WNW at 5 to 10 mph.", "A few clouds early, otherwise mostly sunny. High 49F. Winds WNW at 5 to 10 mph.", "Clear to partly cloudy. Low 31F. Winds light and variable." ] |
$twcweather.forecast.daypart[0].precipChance
|
[ 0, 20, 100, 90 ] |
$twcweather.forecast.daypart[0].precipType
|
[ null, "precip", "rain", "snow" ] |
$twcweather.forecast.daypart[0].qpf
|
[ 0, 0.93, 0.51, 0.48 ] |
$twcweather.forecast.daypart[0].qpfSnow
|
[ 0, 0, 0, 0, 0, 0, 0, 0 ] |
$twcweather.forecast.daypart[0].qualifierCode
|
[ null, "Q1021", (Winds could occasionally gust over 40 mph) "Q5015", (Slight chance of a rain shower.) "Q5053", (Locally heavier rainfall possible) "Q8001", (A stray shower or thunderstorm is possible.) "Q8003", (Thunder possible.) "Q8005", (A stray shower or thunderstorm is possible early.) "Q8035", (Gusty winds and small hail are possible.) "Q902", (Areas of patchy fog.) "Q904" (Areas of patchy fog early.) ] |
$twcweather.forecast.daypart[0].qualifierPhrase
(null is the most common result here) |
[ null, "A few storms may be severe.", "A shower is possible early.", "A stray afternoon thunderstorm is possible.", "A stray severe thunderstorm is possible.", "A stray thunderstorm is possible throughout the evening.", "A stray shower or thunderstorm is possible.", "A stray shower or thunderstorm is possible early.", "Areas of patchy fog.", "Areas of patchy fog developing.", "Areas of patchy fog early.", "Continued very hot.", "Damaging winds, large hail and possibly a tornado with some storms.", "Gusty winds and small hail are possible.", "Higher wind gusts possible.", "Localized flooding is possible.", "Locally heavier rainfall possible", "Locally heavy rainfall possible.", "Potential for flooding rains.", "Potential for heavy rainfall.", "Potential for severe thunderstorms.", "Slight chance of a rain shower.", "Thunder possible.", "Very hot.", "Watching the tropics.", "Winds could occasionally gust over 40 mph" ] |
$twcweather.forecast.daypart[0].relativeHumidity
|
[ 63, 85, 96, 76, 55 ] |
$twcweather.forecast.daypart[0].snowRange
|
[ "", "" ] |
$twcweather.forecast.daypart[0].temperature
|
[ 51, 38, 49, 47, 54, 37, 49, 31 ] |
$twcweather.forecast.daypart[0].temperatureHeatIndex
|
[ 50, 43, 48, 50, 54, 46, 48, 39 ] |
$twcweather.forecast.daypart[0].temperatureWindChill
|
[ 44, 39, 41, 46, 43, 34, 33, 32 ] |
$twcweather.forecast.daypart[0].thunderCategory
|
[ null, "No thunder", "Thunder possible", "Thunder expected", "Severe thunderstorms possible", "Severe thunderstorms likely", "High risk of severe thunderstorms" ] |
$twcweather.forecast.daypart[0].thunderIndex
|
[ null, 0, ("No thunder") 1, ("Thunder possible") 2, ("Thunder expected") 3, ("Severe thunderstorms possible") 4, ("Severe thunderstorms likely") 5 ("High risk of severe thunderstorms") ] |
$twcweather.forecast.daypart[0].uvDescription
|
[ null, "Low", "Moderate", "High", "Very High", "Extreme" ] |
$twcweather.forecast.daypart[0].uvIndex
|
[ 1, 0, 1, 0, 1, 0, 2, 0 ] |
$twcweather.forecast.daypart[0].windDirection
|
[ 173, 44, 51, 125, 208, 292, 282, 274 ] |
$twcweather.forecast.daypart[0].windDirectionCardinal
|
[ "S", "NE", "NE", "SE", "SSW", "WNW", "WNW", "W" ] |
$twcweather.forecast.daypart[0].windPhrase
|
[ "Winds light and variable.", "Winds NE at 5 to 10 mph.", "Winds SSW at 5 to 10 mph.", "Winds WNW at 5 to 10 mph." ] |
$twcweather.forecast.daypart[0].windSpeed
|
[ 3, 1, 6, 5, 9, 9, 9, 3 ] |
$twcweather.forecast.daypart[0].wxPhraseLong
|
[ null, "AM Clouds/PM Sun", "AM Showers", "AM Thunderstorms", "Clouds Early/Clearing Late", "Cloudy", "Fog Late", "Foggy", "Isolated Thunderstorms", "Mostly Clear", "Mostly Cloudy", "Mostly Sunny", "Partly Cloudy", "PM Showers", "PM Thunderstorms", "Rain", "Rain Late", "Rain/Wind", "Rain/Wind Early", "Scattered Thunderstorms", "Showers", "Showers Early", "Showers Late", "Sunny", "Thunderstorms", "Thunderstorms Early", "Thunderstorms Late" ] |
$twcweather.forecast.daypart[0].wxPhraseShort
|
[ "Cloudy", "M Clear" "M Cloudy", "M Sunny", "P Cloudy", "PM Showers", "Rain", "Rain Late", "Rain/Wind", "Sct T-Storms", "Showers", "Shwrs Early", "Shwrs Late", "T-Storms" ] |
Weather Icons
Usage
Choose an icon set below and use it with the iconCode values from $twcweather
. The following examples can be used in the Value field.
Current Weather using the "TWC" icon set: :twc-{$twcweather.conditions.iconCode}:
Forecast Day using the "WU v4" icon set: :wu-v4-{$twcweather.forecast.daypart[0].iconCode[INDEX]}
note: You will need to change [INDEX] to a value from 0-7 (0 being the next forecasted half day/night and 7 being the 3rd day/night)
Code | Description | TWC Icon | WU v4 Icon |
---|---|---|---|
0 | Tornado | ![]()
|
|
1 | Tropical Storm | ![]()
|
|
2 | Hurricane | ![]()
|
|
3 | Strong Storms | ![]()
|
|
4 | Thunder and Hail | ![]()
|
|
5 | Rain to Snow Showers | ![]()
|
|
6 | Rain / Sleet | ![]()
|
|
7 | Wintry Mix Snow / Sleet | ![]()
|
|
8 | Freezing Drizzle | ![]()
|
|
9 | Drizzle | ![]()
|
|
10 | Freezing Rain | ![]()
|
|
11 | Light Rain | ![]()
|
|
12 | Rain | ![]()
|
|
13 | Scattered Flurries | ![]()
|
|
14 | Light Snow | ![]()
|
|
15 | Blowing / Drifting Snow | ![]()
|
|
16 | Snow | ![]()
|
|
17 | Hail | ![]()
|
|
18 | Sleet | ![]()
|
|
19 | Blowing Dust / Sandstorm | ![]()
|
|
20 | Foggy | ![]()
|
|
21 | Haze / Windy | ![]()
|
|
22 | Smoke / Windy | ![]()
|
|
23 | Breezy | ![]()
|
|
24 | Blowing Spray / Windy | ![]()
|
|
25 | Frigid / Ice Crystals | ![]()
|
|
26 | Cloudy | ![]()
|
|
27 | Mostly Cloudy | ![]()
|
|
28 | Mostly Cloudy | ![]()
|
|
29 | Partly Cloudy | ![]()
|
|
30 | Partly Cloudy | ![]()
|
|
31 | Clear | ![]()
|
|
32 | Sunny | ![]()
|
|
33 | Fair / Mostly Clear | ![]()
|
|
34 | Fair / Mostly Sunny | ![]()
|
|
35 | Mixed Rain & Hail | ![]()
|
|
36 | Hot | ![]()
|
|
37 | Isolated Thunderstorms | ![]()
|
|
38 | Thunderstorms | ![]()
|
|
39 | Scattered Showers | ![]()
|
|
40 | Heavy Rain | ![]()
|
|
41 | Scattered Snow Showers | ![]()
|
|
42 | Heavy Snow | ![]()
|
|
43 | Blizzard | ![]()
|
|
44 | Not Available (N/A) | ![]()
|
|
45 | Scattered Showers | ![]()
|
|
46 | Scattered Snow Showers | ![]()
|
|
47 | Scattered Thunderstorms | ![]()
|
|
Old icon sets
Several additional icon sets are available but all have a much more limited set of icons. We have ensured that the $twcWeather
icon code numbers map to an approximately accurate representation in the old icon sets. While the old sets work we encourage use of the more expressive TWC and WU v4 icon sets.
All of the icon sets described on the original Weather Icons page work with the new codes, for example :wu-b-36:
maps to the "sunny" icon in the "B" icon set.