2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-27 20:34:52 +00:00

76_SMAPortal: only four consumer are shown in set drop down list

git-svn-id: https://svn.fhem.de/fhem/trunk@23105 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2020-11-05 22:24:21 +00:00
parent 0777e2c117
commit e0b14b4d51
2 changed files with 15 additions and 14 deletions

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # 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 - change: 76_SMAPortal: some improvements, avoid login trouble in some cases
- bugfix: 89_FULLY: Fixed JSON decoding error and password handling - bugfix: 89_FULLY: Fixed JSON decoding error and password handling
- bugfix: 98_backup.pm: log output include files (forum #115478) - bugfix: 98_backup.pm: log output include files (forum #115478)

@ -137,6 +137,7 @@ BEGIN {
# Versions History intern # Versions History intern
my %vNotesIntern = ( 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.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.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 ", "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 $opt = $a[1];
my $prop = $a[2]; my $prop = $a[2];
my $prop1 = $a[3]; my $prop1 = $a[3];
my $setlist; my ($setlist,@ads);
my $ad = ""; my $ad = "";
return if(IsDisabled($name)); return if(IsDisabled($name));
@ -399,20 +400,19 @@ sub Set {
"getData:noArg " "getData:noArg "
; ;
if($hash->{HELPER}{PLANTOID} && $hash->{HELPER}{CONSUMER}) { if($hash->{HELPER}{PLANTOID} && $hash->{HELPER}{CONSUMER}) {
my $lfd = 0; for my $key (keys %{$hash->{HELPER}{CONSUMER}}) {
for my $key (keys %{$hash->{HELPER}{CONSUMER}{$lfd}}) { my $dev = $hash->{HELPER}{CONSUMER}{$key}{DeviceName};
my $dev = $hash->{HELPER}{CONSUMER}{$lfd}{DeviceName};
if($dev) { if($dev) {
$ad .= "|" if($lfd != 0); push @ads, $dev;
$ad .= $dev;
}
if ($dev && $setlist !~ /$dev/x) {
$setlist .= "$dev:on,off,auto "; $setlist .= "$dev:on,off,auto ";
} }
$lfd++;
} }
} }
} }
if(@ads) {
$ad = join "|", @ads;
}
if ($opt && $ad && $opt =~ /$ad/x) { if ($opt && $ad && $opt =~ /$ad/x) {
# Verbraucher schalten # Verbraucher schalten
@ -3234,10 +3234,10 @@ return;
# @setl = $name,$setread,$retries,$helper # @setl = $name,$setread,$retries,$helper
################################################################### ###################################################################
sub setFromBlocking { sub setFromBlocking {
my $name = shift; my $name = shift;
my $setread = shift // "NULL"; my $setread = shift // "NULL";
my $helper = shift // "NULL"; my $helper = shift // "NULL";
my $hash = $defs{$name}; my $hash = $defs{$name};
if($setread ne "NULL") { if($setread ne "NULL") {
my @cparts = split ":", $setread, 2; my @cparts = split ":", $setread, 2;