From c47eeb11d00b86e8dc18c84a4f827f244d87c7c3 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Sun, 2 Oct 2022 08:39:01 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.68.4 git-svn-id: https://svn.fhem.de/fhem/trunk@26465 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index ed6fbbe16..176d3768b 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -3586,7 +3586,6 @@ sub _calcMaxEstimateToday { my $maxest = ReadingsNum($name, 'Today_MaxPVforecast', 0); my $maxtim = ReadingsVal($name, 'Today_MaxPVforecastTime', '-'); - my $doold = 1; for my $idx (sort keys %{$data{$type}{$name}{nexthours}}) { next if(!NexthoursVal ($hash, $idx, 'today', 0)); @@ -3597,16 +3596,12 @@ sub _calcMaxEstimateToday { my $stt = NexthoursVal ($hash, $idx, 'starttime', ''); next if(!$stt); - $doold = 0; - - push @$daref, "Today_MaxPVforecast<>". $pvfc." Wh"; - push @$daref, "Today_MaxPVforecastTime<>". $stt; + $maxest = $pvfc; + $maxtim = $stt; } - if ($doold) { - push @$daref, "Today_MaxPVforecast<>". $maxest." Wh"; - push @$daref, "Today_MaxPVforecastTime<>". $maxtim; - } + push @$daref, "Today_MaxPVforecast<>". $maxest." Wh"; + push @$daref, "Today_MaxPVforecastTime<>". $maxtim; return; }