2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

10_ZWave.pm: fix endpointChildren linking in FHEMWEB (Forum #50176)

git-svn-id: https://svn.fhem.de/fhem/trunk@12250 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-10-03 06:56:15 +00:00
parent 1d8eafdca1
commit 07481ee732

View File

@ -710,7 +710,7 @@ ZWave_setEndpoints($)
my $mp = $modules{ZWave}{defptr};
for my $k (sort keys %{$mp}) {
my $h = $mp->{$k};
delete($h->{endpointRoot});
delete($h->{endpointParent});
delete($h->{endpointChildren});
}
for my $k (sort keys %{$mp}) {
@ -718,10 +718,10 @@ ZWave_setEndpoints($)
next if($h->{nodeIdHex} !~ m/(..)(..)/);
my ($root, $lid) = ($1, $2);
my $rd = $mp->{$h->{homeId}." ".$root};
$h->{endpointRoot} = ($rd ? $rd->{NAME} : "unknown");
$h->{endpointParent} = ($rd ? $rd->{NAME} : "unknown");
if($rd) {
if($rd->{endpointChildren}) {
$rd->{endpointChildren} .= " ".$h->{NAME};
$rd->{endpointChildren} .= ",".$h->{NAME};
} else {
$rd->{endpointChildren} = $h->{NAME};
}