Here’s an example of a weather widget I put together. I use yahoo and darksky/ForecastIo together, since yahoo doesn’t provide all the data I want. ForecastIo apparently gives you 1000 API calls for free per day.
Download weather icons here: https://github.com/manifestinteractive/weather-underground-icons
For the 3 additional little icons under the “current conditions”, I got them here:
https://icons8.com/icon/set/wind/all
https://icons8.com/icon/set/humidity/all
https://icons8.com/icon/set/umbrella/all
You will need to rename some of the images to match the icons in the folders that come with Weather Binding
Be aware that there are some items I’m not using in the weather.items file below.
Number Temp_Min "Temperature min [%.2f °C]" {weather="locationId=home, forecast=1, type=temperature, property=min"}
Number Temp_Max "Temperature max [%.2f °C]" {weather="locationId=home, forecast=1, type=temperature, property=max"}
Number Temperature "Temperature [%.2f °C]" {weather="locationId=home, type=temperature, property=current"}
Number Humidity "Humidity [%d %%]" {weather="locationId=home, type=atmosphere, property=humidity"}
Number Pressure "Pressure [%.2f mb]" {weather="locationId=home, type=atmosphere, property=pressure"}
DateTime ObservationTime0 "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, forecast=0, type=condition, property=observationTime"}
DateTime ObservationTime1 "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, forecast=1, type=condition, property=observationTime"}
DateTime ObservationTime2 "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, forecast=2, type=condition, property=observationTime"}
DateTime ObservationTime3 "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, forecast=3, type=condition, property=observationTime"}
DateTime ObservationTime4 "Observation time [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {weather="locationId=home, forecast=4, type=condition, property=observationTime"}
Number Temp_Min0 "Temperature min [%.2f °C]" {weather="locationId=home, forecast=0, type=temperature, property=min"}
Number Temp_Max0 "Temperature max [%.2f °C]" {weather="locationId=home, forecast=0, type=temperature, property=max"}
Number Temp_Min1 "Temperature min [%.2f °C]" {weather="locationId=home, forecast=1, type=temperature, property=min"}
Number Temp_Max1 "Temperature max [%.2f °C]" {weather="locationId=home, forecast=1, type=temperature, property=max"}
Number Temp_Min2 "Temperature min [%.2f °C]" {weather="locationId=home, forecast=2, type=temperature, property=min"}
Number Temp_Max2 "Temperature max [%.2f °C]" {weather="locationId=home, forecast=2, type=temperature, property=max"}
Number Temp_Min3 "Temperature min [%.2f °C]" {weather="locationId=home, forecast=3, type=temperature, property=min"}
Number Temp_Max3 "Temperature max [%.2f °C]" {weather="locationId=home, forecast=3, type=temperature, property=max"}
Number Temp_Min4 "Temperature min [%.2f °C]" {weather="locationId=home, forecast=4, type=temperature, property=min"}
Number Temp_Max4 "Temperature max [%.2f °C]" {weather="locationId=home, forecast=4, type=temperature, property=max"}
Number Precip_Probability0 "Precip probability [%.2f %]" {weather="locationId=home2, forecast=0, type=precipitation, property=probability"}
Number Precip_Probability1 "Precip probability [%d %%]" {weather="locationId=home2, forecast=1, type=precipitation, property=probability"}
Number Precip_Probability2 "Precip probability [%d %%]" {weather="locationId=home2, forecast=2, type=precipitation, property=probability"}
Number Precip_Probability3 "Precip probability [%d %%]" {weather="locationId=home2, forecast=3, type=precipitation, property=probability"}
Number Precip_Probability4 "Precip probability [%d %%]" {weather="locationId=home2, forecast=4, type=precipitation, property=probability"}
String Condition0 "Condition [%s]" {weather="locationId=home, forecast=0, type=condition, property=commonId"}
String Condition1 "Condition [%s]" {weather="locationId=home, forecast=1, type=condition, property=commonId"}
String Condition2 "Condition [%s]" {weather="locationId=home, forecast=2, type=condition, property=commonId"}
String Condition3 "Condition [%s]" {weather="locationId=home, forecast=3, type=condition, property=commonId"}
String Condition4 "Condition [%s]" {weather="locationId=home, forecast=4, type=condition, property=commonId"}
String TCondition0 "Condition [%s]" {weather="locationId=home, forecast=0, type=condition, property=text"}
String TCondition1 "Condition [%s]" {weather="locationId=home, forecast=1, type=condition, property=text"}
String TCondition2 "Condition [%s]" {weather="locationId=home, forecast=2, type=condition, property=text"}
String TCondition3 "Condition [%s]" {weather="locationId=home, forecast=3, type=condition, property=text"}
String TCondition4 "Condition [%s]" {weather="locationId=home, forecast=4, type=condition, property=text"}
String WCondition0 "Condition [%s]" {weather="locationId=home2, forecast=0, type=condition, property=text"}
String WCondition1 "Condition [%s]" {weather="locationId=home2, forecast=1, type=condition, property=text"}
String WCondition2 "Condition [%s]" {weather="locationId=home2, forecast=2, type=condition, property=text"}
String WCondition3 "Condition [%s]" {weather="locationId=home2, forecast=3, type=condition, property=text"}
String WCondition4 "Condition [%s]" {weather="locationId=home2, forecast=4, type=condition, property=text"}
Number Wind_Speed "Windspeed [%.2f km/h]" <wind> (Weather) {weather="locationId=home2, type=wind, property=speed"}
String Wind_Dir "Wind direction [%s]" <wind> (Weather) {weather="locationId=home2, type=wind, property=direction"}
String WU_Cond_des "Condition [%s]" <sun_clouds> (Weather) {weather="locationId=home2, type=condition, property=text"}
String WU_Cond_id "Condition [%s]" <sun_clouds> (Weather) {weather="locationId=home2, type=condition, property=commonId"}
services/weather.cfg file:
location.home2.name=Home2
location.home2.latitude=XXXXXXXX
location.home2.longitude=XXXXXXX
location.home2.language=en
location.home2.updateInterval=30
location.home2.provider=ForecastIo
location.home.name=Home
location.home.woeid=XXXX
location.home.provider=Yahoo
location.home.language=en
location.home.updateInterval=30
Here’s the widget info (Add widget > Template > paste the settings below). Images downloaded from GitHub were put into an “underground” folder I created:
<div ng-init="ServerPath='http://localhost:8080/static'; IconSet='underground'">
<link rel="stylesheet" type="text/css" href="{{ServerPath}}/layouts/example.css" />
</div>
<table border=0>
<tr>
<td>
<table id="weather-table" border=0>
<tr>
<td colspan="3" align="center">Current Conditions</td>
</tr>
<tr>
<td rowspan="2"><img id="weather-icon" src="{{ServerPath}}/images/{{IconSet}}/{{itemValue('WU_Cond_id').replace(' ','-') | lowercase }}.png"/><br>{{itemValue('WU_Cond_des')}}</br></td>
<td id="weather-temp">{{'%.1f' | sprintf:itemValue('Temperature')}}</td>
<td id="weather-temp-sign">°C</td>
</tr>
<tr>
<td colspan="2">
<table id="weather-table-details" border=0 align="left">
<tr>
<td align="left"><img src="{{ServerPath}}/images/{{IconSet}}/humidity.png"/></td>
<td align="left"> {{'%.0f' | sprintf:itemValue('Humidity')}} %</td>
</tr>
<tr>
<td align="left"><img src="{{ServerPath}}/images/{{IconSet}}/umbrella.png"/></td>
<td align="left"> {{'%.0f' | sprintf:itemValue('Precip_Probability0')}} %</td>
</tr>
<tr>
<td align="left"><img src="{{ServerPath}}/images/{{IconSet}}/wind.png" height="32" width="32"/></td>
<td align="left"> {{'%.0f' | sprintf:itemValue('Wind_Speed')}} Km</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td>
<table id="weather-forecast-table" border=0>
<tr>
<td/>
<td>Today</td>
<td>{{itemValue('ObservationTime1') | date:'EEEE'}}</td>
<td>{{itemValue('ObservationTime2') | date:'EEEE'}}</td>
<td>{{itemValue('ObservationTime3') | date:'EEEE'}}</td>
<td>{{itemValue('ObservationTime4') | date:'EEEE'}}</td>
</tr>
<tr>
<td/>
<td>
<img src="{{ServerPath}}/images/{{IconSet}}/{{itemValue('Condition0').replace(' ','-') | lowercase }}.png"/>
<p>{{itemValue('TCondition0')}}</p>
</td>
<td>
<img src="{{ServerPath}}/images/{{IconSet}}/{{itemValue('Condition1').replace(' ','-') | lowercase }}.png"/>
<p>{{itemValue('TCondition1')}}</p>
</td>
<td>
<img src="{{ServerPath}}/images/{{IconSet}}/{{itemValue('Condition2').replace(' ','-') | lowercase }}.png"/>
<p>{{itemValue('TCondition2')}}</p>
</td>
<td>
<img src="{{ServerPath}}/images/{{IconSet}}/{{itemValue('Condition3').replace(' ','-') | lowercase }}.png"/>
<p>{{itemValue('TCondition3')}}</p>
</td>
<td>
<img src="{{ServerPath}}/images/{{IconSet}}/{{itemValue('Condition4').replace(' ','-') | lowercase }}.png"/>
<p>{{itemValue('TCondition4')}}</p>
</td>
</tr>
<tr>
<td style="text-align:right"> High</td>
<td class="col-xs-4" style="color:tomato">{{'%.0f' | sprintf:itemValue('Temp_Max0')}} °C</td>
<td class="col-xs-4" style="color:tomato">{{'%.0f' | sprintf:itemValue('Temp_Max1')}} °C</td>
<td class="col-xs-4" style="color:tomato">{{'%.0f' | sprintf:itemValue('Temp_Max2')}} °C</td>
<td class="col-xs-4" style="color:tomato">{{'%.0f' | sprintf:itemValue('Temp_Max3')}} °C</td>
<td class="col-xs-4" style="color:tomato">{{'%.0f' | sprintf:itemValue('Temp_Max4')}} °C</td>
</tr>
<tr>
<td style="text-align:right"> Low</td>
<td class="col-xs-4" style="color:#0db9f0">{{'%.0f' | sprintf:itemValue('Temp_Min0')}} °C</td>
<td class="col-xs-4" style="color:#0db9f0">{{'%.0f' | sprintf:itemValue('Temp_Min1')}} °C</td>
<td class="col-xs-4" style="color:#0db9f0">{{'%.0f' | sprintf:itemValue('Temp_Min2')}} °C</td>
<td class="col-xs-4" style="color:#0db9f0">{{'%.0f' | sprintf:itemValue('Temp_Min3')}} °C</td>
<td class="col-xs-4" style="color:#0db9f0">{{'%.0f' | sprintf:itemValue('Temp_Min4')}} °C</td>
</tr>
</table>
</td>
</tr>
</table>```