mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 16:19:11 +00:00
fhem.pl: add status parameter to inform
git-svn-id: https://svn.fhem.de/fhem/trunk@8105 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
aeab708e66
commit
7368a1410d
@ -282,7 +282,7 @@ $readingFnAttributes = "event-on-change-reading event-on-update-reading ".
|
||||
Hlp=>"<filename>,read the commands from <filenname>" },
|
||||
"inform" => { Fn=>"CommandInform",
|
||||
ClientFilter => "telnet",
|
||||
Hlp=>"{on|timer|raw|off},echo all events to this client" },
|
||||
Hlp=>"{on|off|raw|timer|status},echo all events to this client" },
|
||||
"iowrite" => { Fn=>"CommandIOWrite",
|
||||
Hlp=>"<iodev> <data>,write raw data with iodev" },
|
||||
"list" => { Fn=>"CommandList",
|
||||
@ -2438,7 +2438,12 @@ CommandInform($$)
|
||||
my $name = $cl->{NAME};
|
||||
|
||||
return "Usage: inform {on|timer|raw|off} [regexp]"
|
||||
if($param !~ m/^(on|off|raw|timer)/);
|
||||
if($param !~ m/^(on|off|raw|timer|status)/);
|
||||
|
||||
if($param eq "status") {
|
||||
my $i = $inform{$name};
|
||||
return $i ? ($i->{type} . ($i->{regexp} ? " ".$i->{regexp} : "")) : "off";
|
||||
}
|
||||
|
||||
delete($inform{$name});
|
||||
if($param !~ m/^off/) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user