From 7faeb0133a53596112f9c2ec74b4b114dec0ffa4 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Fri, 9 Apr 2021 21:22:48 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.32.0 git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24201 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/DS_Starter/76_SolarForecast.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contrib/DS_Starter/76_SolarForecast.pm b/contrib/DS_Starter/76_SolarForecast.pm index 03774a805..6c36848f9 100644 --- a/contrib/DS_Starter/76_SolarForecast.pm +++ b/contrib/DS_Starter/76_SolarForecast.pm @@ -925,8 +925,9 @@ sub _setreset { ## no critic "not used" my $name = $paref->{name}; my $prop = $paref->{prop} // return qq{no source specified for reset}; + my $type = $hash->{TYPE}; + if($prop eq "pvHistory") { - my $type = $hash->{TYPE}; delete $data{$type}{$name}{pvhist}; delete $hash->{HELPER}{INITETOTAL}; return; @@ -954,6 +955,16 @@ sub _setreset { ## no critic "not used" readingsDelete($hash, "Current_GridFeedIn"); delete $hash->{HELPER}{INITCONTOTAL}; delete $hash->{HELPER}{INITFEEDTOTAL}; + delete $data{$type}{$name}{current}{gridconsumption}; + delete $data{$type}{$name}{current}{gridfeedin}; + delete $data{$type}{$name}{current}{consumption}; + } + + if($prop eq "currentBatteryDev") { + readingsDelete($hash, "Current_PowerBatIn"); + readingsDelete($hash, "Current_PowerBatOut"); + delete $data{$type}{$name}{current}{powerbatout}; + delete $data{$type}{$name}{current}{powerbatin}; } if($prop eq "currentInverterDev") {