From 99336b0090bf5f4e7f1cde844830bd7cc37f7af2 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Fri, 20 Oct 2023 12:45:52 +0000 Subject: [PATCH] 76_Solarforcast: contrib 1.0.6 git-svn-id: https://svn.fhem.de/fhem/trunk@28073 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index a5f45adfa..4b83fd3bc 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -6174,6 +6174,8 @@ sub _createSummaries { $todaySumFc->{PV} += ReadingsNum ($name, "Today_Hour".sprintf("%02d",$th)."_PVforecast", 0); $todaySumRe->{PV} += ReadingsNum ($name, "Today_Hour".sprintf("%02d",$th)."_PVreal", 0); } + + my $pvre = int $todaySumRe->{PV}; push @{$data{$type}{$name}{current}{h4fcslidereg}}, int $next4HoursSum->{PV}; # Schieberegister 4h Summe Forecast limitArray ($data{$type}{$name}{current}{h4fcslidereg}, $defslidenum); @@ -6210,6 +6212,7 @@ sub _createSummaries { push @$daref, "Current_SelfConsumptionRate<>". $selfconsumptionrate. " %"; push @$daref, "Current_Surplus<>". $surplus. " W"; push @$daref, "Current_AutarkyRate<>". $autarkyrate. " %"; + push @$daref, "Today_PVreal<>". $pvre. " Wh" if($pvre > ReadingsNum ($name, 'Today_PVreal', 0)); push @$daref, "NextHours_Sum01_PVforecast<>". (int $next1HoursSum->{PV})." Wh"; push @$daref, "NextHours_Sum02_PVforecast<>". (int $next2HoursSum->{PV})." Wh"; @@ -6218,7 +6221,6 @@ sub _createSummaries { push @$daref, "RestOfDayPVforecast<>". (int $restOfDaySum->{PV}). " Wh"; push @$daref, "Tomorrow_PVforecast<>". (int $tomorrowSum->{PV}). " Wh"; push @$daref, "Today_PVforecast<>". (int $todaySumFc->{PV}). " Wh"; - push @$daref, "Today_PVreal<>". (int $todaySumRe->{PV}). " Wh" if(int $todaySumRe->{PV} > ReadingsNum ($name, 'Today_PVreal', 0)); push @$daref, "Tomorrow_ConsumptionForecast<>". $tconsum. " Wh" if(defined $tconsum); push @$daref, "NextHours_Sum04_ConsumptionForecast<>". (int $next4HoursSum->{Consumption})." Wh"; @@ -7786,7 +7788,7 @@ sub _calcTodayPVdeviation { $data{$type}{$name}{circular}{99}{tdayDvtn} = $dp; push @$daref, "Today_PVdeviation<>". $dp.' %'; - push @$daref, "Today_PVreal<>". (sprintf "%.0f", $pvre).' Wh'; + #push @$daref, "Today_PVreal<>". $pvre.' Wh'; return; }