mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
76_SolarForecast: minor code changes ones more
git-svn-id: https://svn.fhem.de/fhem/trunk@28643 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f0d1422616
commit
50300fc3d9
@ -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.
|
||||||
|
- change: 76_SolarForecast: minor code changes ones more
|
||||||
- bufgix: 72_FRITZBOX: Fehlerbehandlung verbessert
|
- bufgix: 72_FRITZBOX: Fehlerbehandlung verbessert
|
||||||
- change: 72_FRITZBOX: commandRef ergänzt
|
- change: 72_FRITZBOX: commandRef ergänzt
|
||||||
- change: 76_SolarForecast: minor code changes
|
- change: 76_SolarForecast: minor code changes
|
||||||
|
@ -158,6 +158,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"1.16.7" => "12.03.2024 prevent duplicates in NOTIFYDEV, Forum: https://forum.fhem.de/index.php?msg=1306875 ",
|
||||||
"1.16.6" => "11.03.2024 plantConfigCheck: join forecastProperties with ',' ",
|
"1.16.6" => "11.03.2024 plantConfigCheck: join forecastProperties with ',' ",
|
||||||
"1.16.5" => "04.03.2024 setPVhistory: code changes, plantConfigCheck: check forecastRefresh ".
|
"1.16.5" => "04.03.2024 setPVhistory: code changes, plantConfigCheck: check forecastRefresh ".
|
||||||
"check age of weather data according to used MOSMIX variant ",
|
"check age of weather data according to used MOSMIX variant ",
|
||||||
@ -14964,11 +14965,8 @@ sub createAssociatedWith {
|
|||||||
my $consumer = AttrVal($name, "consumer${c}", "");
|
my $consumer = AttrVal($name, "consumer${c}", "");
|
||||||
my ($ac,$hc) = parseParams ($consumer);
|
my ($ac,$hc) = parseParams ($consumer);
|
||||||
my $codev = $ac->[0] // '';
|
my $codev = $ac->[0] // '';
|
||||||
|
|
||||||
push @cd, $codev if($codev);
|
|
||||||
|
|
||||||
my $dswitch = $hc->{switchdev} // ''; # alternatives Schaltdevice
|
my $dswitch = $hc->{switchdev} // ''; # alternatives Schaltdevice
|
||||||
|
push @cd, $codev if($codev);
|
||||||
push @cd, $dswitch if($dswitch);
|
push @cd, $dswitch if($dswitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14989,8 +14987,17 @@ sub createAssociatedWith {
|
|||||||
push @ndn, $e;
|
push @ndn, $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{NOTIFYDEV} = join ",", @cd if(@cd);
|
my %seen;
|
||||||
readingsSingleUpdate ($hash, ".associatedWith", join(" ",@ndn), 0) if(@ndn);
|
|
||||||
|
if (@cd) {
|
||||||
|
$hash->{NOTIFYDEV} = join ",", grep { !$seen{$_ }++ } @cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (@nd) {
|
||||||
|
undef %seen;
|
||||||
|
my $asw = join " ", grep { !$seen{$_ }++ } @nd;
|
||||||
|
readingsSingleUpdate ($hash, ".associatedWith", $asw, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
InternalTimer(gettimeofday()+3, "FHEM::SolarForecast::createAssociatedWith", $hash, 0);
|
InternalTimer(gettimeofday()+3, "FHEM::SolarForecast::createAssociatedWith", $hash, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user