PRO: Openweather Forecast – weather at a location

current time at Sushi: 08.08.2022, 16:22:38, timezone: Asia/Kolkata
sunrise: 05:49:21
sunset: 18:45:16
temp: 29.28 Celcius, feels_like 35.53 Celsius
windspeed: 0.11
NWFC DIVISION, IMD, NEW DELHI 05:30 - 03:00:
Heavy to very heavy rainfall with extremely heavy falls very likely at isolated places over Vidarbha, Chhattisgarh, Odisha, Madhya Maharashtra, Konkan, Goa, Telangana; heavy to very heavy rainfall at isolated places over East Madhya Pradesh, Gujarat Region, Saurashtra, Kutch, Marathwada, Karnataka State, Kerala, Mahe.

See how this is done:


JCI-Template:

  • urlparam4twig: lat#lon#su
  • URL:
{% set lat = 48.1371079 %}{% if urlparam.lat %}{% set lat = (urlparam.lat | e) %}{% endif %}
{% set lon =11.5753822 %}{% if urlparam.lon %}{% set lon = (urlparam.lon | e) %}{% endif %}
https://api.openweathermap.org/data/2.5/onecall?lat={{lat}}&lon={{lon}}&appid=...
  • twig-template:
current time at {{urlparam.su|e}}: {{ (current.dt+timezone_offset) | date("d.m.Y, H:i:s")   }}, timezone: {{timezone}}<hr>
sunrise: {{ (current.sunrise+timezone_offset) | date("H:i:s")   }}<br>
sunset: {{ (current.sunset+timezone_offset) | date("H:i:s")   }}<br>
temp: {{current.temp-273.15}} Celcius, feels_like {{current.feels_like-273.15}} Celsius<br>
windspeed: {{current.wind_speed}}<br>
{% if (alerts|length)>0 %}
{{alerts.0.sender_name}} {{(a.start+timezone_offset)| date("H:i") }} - {{(alerts.0.end+timezone_offset) | date("H:i") }}: <br>{{alerts.0.description}}
{% endif %}