diff --git a/fhem/CHANGED b/fhem/CHANGED index 87eab8277..d0eda67a7 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: 76_SMAPortal: only four consumer are shown in set drop down list - change: 76_SMAPortal: some improvements, avoid login trouble in some cases - bugfix: 89_FULLY: Fixed JSON decoding error and password handling - bugfix: 98_backup.pm: log output include files (forum #115478) diff --git a/fhem/FHEM/76_SMAPortal.pm b/fhem/FHEM/76_SMAPortal.pm index 35644d4e3..2d2aee1c1 100644 --- a/fhem/FHEM/76_SMAPortal.pm +++ b/fhem/FHEM/76_SMAPortal.pm @@ -137,6 +137,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "3.6.3" => "05.11.2020 fix only four consumer are shown in set command drop down list ", "3.6.2" => "03.11.2020 new function _detailViewOn to Switch the detail view on SMA energy balance site, new default userAgent ", "3.6.1" => "31.10.2020 adjust anchortime in getBalanceMonthData ", "3.6.0" => "11.10.2020 new relative time arguments for attr balanceDay, balanceMonth, balanceYear, new attribute useRelativeNames ", @@ -380,7 +381,7 @@ sub Set { my $opt = $a[1]; my $prop = $a[2]; my $prop1 = $a[3]; - my $setlist; + my ($setlist,@ads); my $ad = ""; return if(IsDisabled($name)); @@ -399,20 +400,19 @@ sub Set { "getData:noArg " ; if($hash->{HELPER}{PLANTOID} && $hash->{HELPER}{CONSUMER}) { - my $lfd = 0; - for my $key (keys %{$hash->{HELPER}{CONSUMER}{$lfd}}) { - my $dev = $hash->{HELPER}{CONSUMER}{$lfd}{DeviceName}; + for my $key (keys %{$hash->{HELPER}{CONSUMER}}) { + my $dev = $hash->{HELPER}{CONSUMER}{$key}{DeviceName}; if($dev) { - $ad .= "|" if($lfd != 0); - $ad .= $dev; - } - if ($dev && $setlist !~ /$dev/x) { + push @ads, $dev; $setlist .= "$dev:on,off,auto "; } - $lfd++; } - } + } } + + if(@ads) { + $ad = join "|", @ads; + } if ($opt && $ad && $opt =~ /$ad/x) { # Verbraucher schalten @@ -3234,10 +3234,10 @@ return; # @setl = $name,$setread,$retries,$helper ################################################################### sub setFromBlocking { - my $name = shift; - my $setread = shift // "NULL"; - my $helper = shift // "NULL"; - my $hash = $defs{$name}; + my $name = shift; + my $setread = shift // "NULL"; + my $helper = shift // "NULL"; + my $hash = $defs{$name}; if($setread ne "NULL") { my @cparts = split ":", $setread, 2;