From 65ebfa7b36d538608bda40ea473fd1db64ed7081 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Fri, 2 Jun 2023 03:11:10 +0000 Subject: [PATCH] 59_Weather: wunderground API fix lost temperature reading git-svn-id: https://svn.fhem.de/fhem/trunk@27642 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/lib/FHEM/APIs/Weather/wundergroundAPI.pm | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/fhem/CHANGED b/fhem/CHANGED index 333a61069..586208c55 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 59_Weather: wunderground API fix lost temperature reading - bugfix: 88_HMCCU: Fixed scaling of non numeric reading values - bugfix: 74_AutomowerConnect: improved background image loading Commandref: Hint to connect application key with Automower Connect diff --git a/fhem/lib/FHEM/APIs/Weather/wundergroundAPI.pm b/fhem/lib/FHEM/APIs/Weather/wundergroundAPI.pm index 1f66e126c..32a23cd40 100644 --- a/fhem/lib/FHEM/APIs/Weather/wundergroundAPI.pm +++ b/fhem/lib/FHEM/APIs/Weather/wundergroundAPI.pm @@ -542,6 +542,16 @@ sub _ProcessingRetrieveData { ) ) ), + 'temperature' => int( + sprintf( + "%.1f", + ( + $data->{temperatureMax}[$i] + ? $data->{temperatureMax}[$i] + : 0 + ) + ) + 0.5 + ), 'low_c' => int( sprintf( "%.1f", $data->{temperatureMin}[$i] ) + 0.5