From 32689e6f359a8aba47f08c1c45fd6ed480ad3344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomislav=20Kopi=C4=87?= Date: Thu, 7 Nov 2024 21:05:20 +0100 Subject: [PATCH] Fancy up the scroll --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index cbb7281..be871ba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -194,8 +194,10 @@ bool fetchWeatherData() { DynamicJsonDocument doc(1024); if (!deserializeJson(doc, payload)) { - weatherState = doc["weather"][0]["description"].as(); - capitalizeFirstLetter(const_cast(weatherState.c_str())); + String mainWeather = doc["weather"][0]["main"].as(); + String description = doc["weather"][0]["description"].as(); + capitalizeFirstLetter(const_cast(description.c_str())); + weatherState = mainWeather + " " + description; temperature = doc["main"]["temp"].as() - 273.15; humidity = doc["main"]["humidity"]; pressure = doc["main"]["pressure"].as() / 1000;