mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
76_SolarForecast.pm: contrib 0.46.0
git-svn-id: https://svn.fhem.de/fhem/trunk@24456 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0bf6d4d20e
commit
4be22ce610
@ -5188,12 +5188,13 @@ return;
|
|||||||
sub createNotifyDev {
|
sub createNotifyDev {
|
||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
my $type = $hash->{TYPE};
|
||||||
|
|
||||||
RemoveInternalTimer($hash, "FHEM::SolarForecast::createNotifyDev");
|
RemoveInternalTimer($hash, "FHEM::SolarForecast::createNotifyDev");
|
||||||
|
|
||||||
if($init_done == 1) {
|
if($init_done == 1) {
|
||||||
my @nd;
|
my @nd;
|
||||||
my ($afc,$ara,$ain,$ame,$aba,$a01,$h);
|
my ($afc,$ara,$ain,$ame,$aba,$h);
|
||||||
|
|
||||||
my $fcdev = ReadingsVal($name, "currentForecastDev", ""); # Weather forecast Device
|
my $fcdev = ReadingsVal($name, "currentForecastDev", ""); # Weather forecast Device
|
||||||
($afc,$h) = parseParams ($fcdev);
|
($afc,$h) = parseParams ($fcdev);
|
||||||
@ -5215,16 +5216,19 @@ sub createNotifyDev {
|
|||||||
($aba,$h) = parseParams ($badev);
|
($aba,$h) = parseParams ($badev);
|
||||||
$badev = $aba->[0] // "";
|
$badev = $aba->[0] // "";
|
||||||
|
|
||||||
my $co01dev = AttrVal($name, "consumer01", ""); # Consumer01 Device
|
for my $c (sort{$a<=>$b} keys %{$data{$type}{$name}{consumers}}) { # Consumer Devices
|
||||||
($a01,$h) = parseParams ($co01dev);
|
my $codev = AttrVal($name, "consumer${c}", "");
|
||||||
$co01dev = $a01->[0] // "";
|
my ($ac,$hc) = parseParams ($codev);
|
||||||
|
$codev = $ac->[0] // "";
|
||||||
|
|
||||||
|
push @nd, $codev if($codev);
|
||||||
|
}
|
||||||
|
|
||||||
push @nd, $fcdev;
|
push @nd, $fcdev;
|
||||||
push @nd, $radev if($radev ne $fcdev);
|
push @nd, $radev if($radev ne $fcdev);
|
||||||
push @nd, $indev;
|
push @nd, $indev;
|
||||||
push @nd, $medev;
|
push @nd, $medev;
|
||||||
push @nd, $badev;
|
push @nd, $badev;
|
||||||
push @nd, $co01dev;
|
|
||||||
|
|
||||||
if(@nd) {
|
if(@nd) {
|
||||||
$hash->{NOTIFYDEV} = join ",", @nd;
|
$hash->{NOTIFYDEV} = join ",", @nd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user