%s | %s %s°C %s%% %s |
%s | %s: %s min %s°C max %s°C |
%s |
%s |
%s°C %s%% |
%s |
%s | ', $width, WeatherIconIMGTag(ReadingsVal($d, "icon", ""))); for(my $i=1; $i<=5; $i++) { $ret .= sprintf('%s | ', $width, WeatherIconIMGTag(ReadingsVal($d, "fc${i}_icon", ""))); } $ret .= '
%s | ', ReadingsVal($d, "condition", "")); for(my $i=1; $i<=5; $i++) { $ret .= sprintf('%s: %s | ', ReadingsVal($d, "fc${i}_day_of_week", ""), ReadingsVal($d, "fc${i}_condition", "")); } $ret .= '
%s°C %s%% | ', ReadingsVal($d, "temp_c", ""), ReadingsVal($d, "humidity", "")); for(my $i=1; $i<=5; $i++) { $ret .= sprintf('min %s°C | ', ReadingsVal($d, "fc${i}_low_c", "")); } $ret .= '
%s | ', ReadingsVal($d, "wind_condition", "")); for(my $i=1; $i<=5; $i++) { $ret .= sprintf('max %s°C | ', ReadingsVal($d, "fc${i}_high_c", "")); } $ret .= "
define <name> Weather <location> [<interval> [<language>]]
location
is the WOEID (WHERE-ON-EARTH-ID), go to
http://weather.yahoo.com to find it out for your location.interval
is the time between subsequent updates
in seconds. It defaults to 3600 (1 hour).de
,
en
,
nl
,
It determines the natural language in which the forecast information appears.
It defaults to en
. If you want to set the language you also have to set the interval.define MyWeather Weather 673513 define Forecast Weather 673513 1800The module provides four additional functions
WeatherAsHtml
, WeatherAsHtmlV
, WeatherAsHtmlH
and
WeatherAsHtmlD
. The former two functions are identical: they return the HTML code for a
vertically arranged weather forecast. The third function returns the HTML code for a horizontally arranged weather forecast. The
latter function dynamically picks the orientation depending on wether a smallscreen style is set (vertical layout) or not (horizontal layout).define MyWeatherWeblink weblink htmlCode { WeatherAsHtmlH("MyWeather") }
set <name> update
interval
seconds later.get <name> <reading>
city | name of town returned for location |
code | current condition code |
condition | current condition |
current_date_time | last update of forecast on server |
fc?_code | forecast condition code |
fc?_condition | forecast condition |
fc?_day_of_week | day of week for day +? |
fc?_high_c | forecasted daily high in degrees centigrade |
fc?_icon | forecast icon |
fc?_low_c | forecasted daily low in degrees centigrade |
humidity | current humidity in % |
icon | relative path for current icon |
pressure | air pressure in hPa |
pressure_trend | air pressure trend (0= steady, 1= rising, 2= falling) |
pressure_trend_txt | textual representation of air pressure trend |
pressure_trend_sym | symbolic representation of air pressure trend |
temperature | current temperature in degrees centigrade |
temp_c | current temperature in degrees centigrade |
temp_f | current temperature in degrees Fahrenheit |
visibility | visibility in km |
wind | wind speed in km/h |
wind_chill | wind chill in degrees centigrade |
wind_condition | wind direction and speed |
wind_direction | direction wind comes from in degrees (0 = north wind) |
wind_speed | same as wind |