From b053130570c40c19c124d409d7843ad825312525 Mon Sep 17 00:00:00 2001 From: "William (Liam) Snow IV" Date: Thu, 3 Jul 2025 00:08:25 -0400 Subject: feat: fahrenheit option for weather (#189) * Added Fahrenheit to Weather Service * some fixes Allow for hot reloading config opt Add opt to example config --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> --- services/Weather.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'services') diff --git a/services/Weather.qml b/services/Weather.qml index ad80e48..ae0e0b6 100644 --- a/services/Weather.qml +++ b/services/Weather.qml @@ -11,7 +11,8 @@ Singleton { property string loc property string icon property string description - property real temperature + property string tempC: "0°C" + property string tempF: "0°F" function reload(): void { if (Config.dashboard.weatherLocation) @@ -27,7 +28,8 @@ Singleton { const json = JSON.parse(text).current_condition[0]; icon = Icons.getWeatherIcon(json.weatherCode); description = json.weatherDesc[0].value; - temperature = parseFloat(json.temp_C); + tempC = `${parseFloat(json.temp_C)}°C`; + tempF = `${parseFloat(json.temp_F)}°F`; }) Component.onCompleted: reload() -- cgit v1.2.3-freya