mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 11:01:59 +00:00
- per Loglevel Attribut kann man nun einstellen ob man die Logs sehen will
oder nicht - die Attribute clientstate* und loglevel werden nun auch nicht weitergereicht (from Tobias) git-svn-id: https://svn.fhem.de/fhem/trunk@2284 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
783126f76a
commit
9ca0724eef
@ -39,7 +39,7 @@ structure_Initialize($)
|
|||||||
$hash->{NotifyFn} = "structure_Notify";
|
$hash->{NotifyFn} = "structure_Notify";
|
||||||
$hash->{SetFn} = "structure_Set";
|
$hash->{SetFn} = "structure_Set";
|
||||||
$hash->{AttrFn} = "structure_Attr";
|
$hash->{AttrFn} = "structure_Attr";
|
||||||
$hash->{AttrList} = "clientstate_priority clientstate_behavior:relative,absolute";
|
$hash->{AttrList} = "clientstate_priority clientstate_behavior:relative,absolute loglevel:0,5";
|
||||||
|
|
||||||
addToAttrList("structexclude");
|
addToAttrList("structexclude");
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ sub structure_Notify($$)
|
|||||||
|
|
||||||
#eigenen Status jetzt setzen, nur wenn abweichend
|
#eigenen Status jetzt setzen, nur wenn abweichend
|
||||||
if(!defined($hash->{STATE}) || ($hash->{STATE} ne $newState)) {
|
if(!defined($hash->{STATE}) || ($hash->{STATE} ne $newState)) {
|
||||||
Log 3, "Update structure '" .$me . "' to " . $newState .
|
Log GetLogLevel($hash->{NAME},5), "Update structure '" .$me . "' to " . $newState .
|
||||||
" because device '" .$dev->{NAME}. "' has changed";
|
" because device '" .$dev->{NAME}. "' has changed";
|
||||||
$hash->{STATE} = $newState;
|
$hash->{STATE} = $newState;
|
||||||
readingsSingleUpdate($hash, "state", $newState, 1);
|
readingsSingleUpdate($hash, "state", $newState, 1);
|
||||||
@ -268,9 +268,9 @@ CommandAddStruct($)
|
|||||||
if(int(@a) != 2) {
|
if(int(@a) != 2) {
|
||||||
return "Usage: addstruct <structure_device> <devspec>";
|
return "Usage: addstruct <structure_device> <devspec>";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $name = shift(@a);
|
my $name = shift(@a);
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
|
|
||||||
if(!$hash || $hash->{TYPE} ne "structure") {
|
if(!$hash || $hash->{TYPE} ne "structure") {
|
||||||
return "$a is not a structure device";
|
return "$a is not a structure device";
|
||||||
}
|
}
|
||||||
@ -348,7 +348,7 @@ structure_Set($@)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete($hash->{INSET});
|
delete($hash->{INSET});
|
||||||
Log 5, "SET: $ret" if($ret);
|
Log GetLogLevel($hash->{NAME},5), "SET: $ret" if($ret);
|
||||||
return $list[1] eq "?"
|
return $list[1] eq "?"
|
||||||
? "Unknown argument ?, choose one of " . join(" ", sort keys(%pars))
|
? "Unknown argument ?, choose one of " . join(" ", sort keys(%pars))
|
||||||
: undef;
|
: undef;
|
||||||
@ -361,7 +361,9 @@ structure_Attr($@)
|
|||||||
my ($type, @list) = @_;
|
my ($type, @list) = @_;
|
||||||
|
|
||||||
return undef if($list[1] eq "alias" ||
|
return undef if($list[1] eq "alias" ||
|
||||||
$list[1] eq "room");
|
$list[1] eq "room" ||
|
||||||
|
$list[1] =~ m/clientstate/ ||
|
||||||
|
$list[1] eq "loglevel");
|
||||||
my $hash = $defs{$list[0]};
|
my $hash = $defs{$list[0]};
|
||||||
$hash->{INATTR} = 1;
|
$hash->{INATTR} = 1;
|
||||||
my $ret = "";
|
my $ret = "";
|
||||||
@ -384,7 +386,7 @@ structure_Attr($@)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete($hash->{INATTR});
|
delete($hash->{INATTR});
|
||||||
Log 5, "ATTR: $ret" if($ret);
|
Log GetLogLevel($hash->{NAME},5), "ATTR: $ret" if($ret);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user