diff options
Diffstat (limited to 'block_weather.py')
| -rw-r--r-- | block_weather.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block_weather.py b/block_weather.py index dc041fd..4443de3 100644 --- a/block_weather.py +++ b/block_weather.py @@ -22,7 +22,7 @@ def get_current_weather(city: str) -> dict: data['summary'] = _format_current_weather(data) # On icon URL codes: https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2 - data['icon_url'] = f"https://openweathermap.org/img/wn/{data['weather'][0]['icon']}@2x.png" + data['icon_url'] = f"https://openweathermap.org/img/wn/{data['weather'][0]['icon']}.png" return data @@ -34,7 +34,7 @@ def _format_current_weather(data: dict) -> str: {data['weather'][0]['description']} {data['main']['temp']}°C (feels like {data['main']['feels_like']}°C), humidity: {data['main']['humidity']}%, pressure: {data['main']['grnd_level']} hPa visibility: {data['visibility']/1000:.1f}km -wind: {data['wind']['speed']}m/s from {data['wind']['deg']}°N (with gusts of {data['wind'].get('gust', 0)} m/s) +wind: {data['wind']['speed']}m/s from {data['wind']['deg']}°N clouds: {data['clouds']['all']}% sunrise & sunset: {ts[1].strftime('%H:%M')}, {ts[2].strftime('%H:%M')}""" return s |
