From b7b6b75d84bf91eab655af40f750989beec5179f Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sun, 5 Sep 2021 20:13:39 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.55.1 git-svn-id: https://svn.fhem.de/fhem/trunk@24922 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index e0b107b6d..f190e6e2c 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -6108,12 +6108,14 @@ sub listDataPool { if (!keys %{$h}) { return qq{Consumer cache is empty.}; } + for my $i (keys %{$h}) { + if ($i !~ /^[0-9]{2}$/ix) { # bereinigen ungültige consumer, Forum: https://forum.fhem.de/index.php/topic,117864.msg1173219.html#msg1173219 + delete $data{$type}{$name}{consumers}{$i}; + Log3 ($name, 3, qq{$name - INFO - invalid consumer key "$i" was deleted from consumer Hash}); + } + } + for my $idx (sort{$a<=>$b} keys %{$h}) { - if ($idx !~ /^[0-9]{2}$/ix) { # bereinigen ungültige consumer, Forum: https://forum.fhem.de/index.php/topic,117864.msg1173219.html#msg1173219 - delete $data{$type}{$name}{consumers}{"$idx"}; - Log3 ($name, 3, qq{$name - INFO - invalid consumer key "$idx" was deleted from consumer Hash}); - next; - } my $cret; for my $ckey (sort keys %{$h->{$idx}}) { if(ref $h->{$idx}{$ckey} eq "HASH") {