polybar-weather: tell where to find weather icons

This commit is contained in:
Vincent Bernat 2021-08-10 13:35:16 +02:00
parent 78004178e4
commit e88352aa67

View file

@ -45,6 +45,7 @@ def get_weather(apikey, latitude, longitude, endpoint):
def format_weather(data): def format_weather(data):
"""Translate OWM icon to WeatherIcons.""" """Translate OWM icon to WeatherIcons."""
# https://erikflowers.github.io/weather-icons/
icon = data["weather"][0]["icon"] icon = data["weather"][0]["icon"]
temperature = data["main"]["temp"] temperature = data["main"]["temp"]
if icon == "01d" and temperature > 32: if icon == "01d" and temperature > 32: