/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Martin Gleiß
* @copyright 2012 - 2015
* @license GPL [http://www.gnu.de]
* -----------------------------------------------------------------------------
*/
{% extends "widget_weather.html" %}
{% block example %}
Examples
If no location is given, the default location from config (in your case {{ config_weather_location }}) is being used.
{% filter trim|escape|nl2br %}{% verbatim %}
{{ weather.current('weather1') }}
{% endverbatim %}{% endfilter %}
If the location is specified as parameter, the location format must match the format required by the configured online service.
Otherwise the read request will fail.
{% filter trim|escape|nl2br %}{% verbatim %}
{{ weather.current('weather2', 'lat=45&lon=7') }}
{% endverbatim %}{% endfilter %}
{{ weather.current('weather2', 'lat=45&lon=7') }}
New in v3.0: Weather data from backend
The weather widget can now display weather data which are delivered by items from the backend.
Temperature, wind conditions and humidity values from the online weather service can be used by leaving the corresponding parameters empty.
Otherwise they will be replaced by the item values. Two additional items take further values.
The following example shows temperature from the online service and other values from the backend. The wind condition comes as a string
constructed by the backend (option 'text').
{% filter trim|escape|nl2br %}{% verbatim %}
{{ weather.current('weather3','','','', 'weather.wind', 'text', 'weather.airpressure', 'Air pressure ', 'hPa', 'weather.rain', 'Rain ', 'l/m²', 'weather.humidity', 'Humidity ', '%') }}
{% endverbatim %}{% endfilter %}
{{ weather.current('weather3','','','', 'weather.wind', 'text', 'weather.airpressure', 'Air pressure ', 'hPa', 'weather.rain', 'Rain ', 'l/m²', 'weather.humidity', 'Humidity ', '%') }}
{% endblock %}