fix minor bug
This fixes a bug where using hourly weather forecast with imperial units would lead to the error: TypeError: list indices must be integers or slices, not str
This commit is contained in:
parent
1bb7de1c8e
commit
77ffc4146b
@ -434,7 +434,7 @@ class Weather(inkycal_module):
|
||||
if self.units == "metric":
|
||||
temp = f"{round(weather['main']['temp'], ndigits=dec_temp)}°C"
|
||||
else:
|
||||
temp = f"{round(self.celsius_to_fahrenheit(weather['weather']['main']['temp']), ndigits=dec_temp)}°F"
|
||||
temp = f"{round(self.celsius_to_fahrenheit(weather['main']['temp']), ndigits=dec_temp)}°F"
|
||||
|
||||
icon = forecast["weather"][0]["icon"]
|
||||
fc_data['fc' + str(forecasts.index(forecast) + 1)] = {
|
||||
|
Loading…
Reference in New Issue
Block a user