75 current 2024-03-01 02:40:22 24.05.20240228.9099616 6.6.18 *
This commit is contained in:
parent
fae67b5152
commit
ab3ac44720
1 changed files with 5 additions and 5 deletions
|
|
@ -66,7 +66,7 @@ def format_time(time):
|
|||
|
||||
|
||||
def format_temp(temp):
|
||||
return (hour['FeelsLikeC']+"°").ljust(3)
|
||||
return (hour['FeelsLikeF']+"°").ljust(3)
|
||||
|
||||
|
||||
def format_chances(hour):
|
||||
|
|
@ -94,10 +94,10 @@ if tempint >= 0 and tempint < 10:
|
|||
|
||||
|
||||
data['text'] = ' '+WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \
|
||||
"\n "+extrachar+weather['current_condition'][0]['FeelsLikeC']+"°"
|
||||
"\n "+extrachar+weather['current_condition'][0]['FeelsLikeF']+"°"
|
||||
|
||||
data['tooltip'] = f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°</b>\n"
|
||||
data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}°\n"
|
||||
data['tooltip'] = f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_F']}°</b>\n"
|
||||
data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
|
||||
data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n"
|
||||
data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
|
||||
for i, day in enumerate(weather['weather']):
|
||||
|
|
@ -107,7 +107,7 @@ for i, day in enumerate(weather['weather']):
|
|||
if i == 1:
|
||||
data['tooltip'] += "Tomorrow, "
|
||||
data['tooltip'] += f"{day['date']}</b>\n"
|
||||
data['tooltip'] += f"⬆️ {day['maxtempC']}° ⬇️ {day['mintempC']}° "
|
||||
data['tooltip'] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° "
|
||||
data['tooltip'] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n"
|
||||
for hour in day['hourly']:
|
||||
if i == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue