v.0.4.8 weather-info improvement

This commit is contained in:
tiijay
2025-11-11 14:56:20 +01:00
parent ae3fe54db9
commit 74eca565a1
3 changed files with 9 additions and 10 deletions

View File

@@ -30,18 +30,19 @@ def weather_check(display: NeoPixel_64x64, test_mode: bool = False):
display.write_text(f'{str(w_resp.location.name)}', 0, ypos, color=colors.RAINBOW[0])
ypos += display.font_height + 1
# display.set_font(fonts.font_8x8)
display.set_font(fonts.font_5x7)
display.write_text(f'{str(w_resp.current.temp_c)}°C', 0, ypos, color=colors.RAINBOW[1])
ypos += display.font_height + 1
display.set_font(fonts.font_5x7)
display.write_text(f'{str(w_resp.current.condition.text)}°C', 0, ypos, color=colors.RAINBOW[2])
ypos += display.font_height + 1
display.write_text(f'upd:{str(w_resp.current.last_updated)[-5:]}', 0, ypos, color=colors.RAINBOW[3])
ypos += display.font_height + 1
display.write_text(f'cur:{str(w_resp.location.localtime)[-5:]}', 0, ypos, color=colors.RAINBOW[4])
ypos += 3 * (display.font_height + 1)
# unten rechts in die Ecke
ypos = display.MATRIX_HEIGHT - display.font_height - 1
display.write_text('done.', 38, ypos, color=colors.WHITE)
display.write_text('done.', 38, ypos, color=colors.NEON_GREEN)
except OSError as e:
print(f'Error: connection closed - {e}')