From b92e5be9e03eb720ef5cf4f38935f11357c1ab8b Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 3 Aug 2014 10:13:50 +0000 Subject: [PATCH] structure: more details for debugging (Forum #25833) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6349 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_structure.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FHEM/98_structure.pm b/FHEM/98_structure.pm index fdc9191b6..580ff6ccd 100755 --- a/FHEM/98_structure.pm +++ b/FHEM/98_structure.pm @@ -127,7 +127,7 @@ sub structure_Notify($$) $s = "" if(!defined($s)); if($s =~ m/^RENAMED ([^ ]*) ([^ ]*)$/) { my ($old, $new) = ($1, $2); - if( defined($hash->{CONTENT}{$old}) ) { + if( exists($hash->{CONTENT}{$old}) ) { $hash->{DEF} =~ s/(\s+)$old(\s*)/$1$new$2/; @@ -137,7 +137,7 @@ sub structure_Notify($$) } elsif($s =~ m/^DELETED ([^ ]*)$/) { my ($name) = ($1); - if( defined($hash->{CONTENT}{$name}) ) { + if( exists($hash->{CONTENT}{$name}) ) { $hash->{DEF} =~ s/(\s+)$name(\s*)/ /; $hash->{DEF} =~ s/^ //; @@ -153,7 +153,7 @@ sub structure_Notify($$) #pruefen ob Devices welches das notify ausgeloest hat Mitglied dieser # Struktur ist - return "" if (!$hash->{CONTENT}->{$dev->{NAME}}); + return "" if (! exists $hash->{CONTENT}->{$dev->{NAME}}); # lade das Verhalten, Standard ist absolute my $behavior = AttrVal($me, "clientstate_behavior", "absolute"); @@ -236,6 +236,7 @@ sub structure_Notify($$) } } + $hash->{CONTENT}{$d} = $devstate; } my $newState = "undefined";