mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
98_mark.pm: mark devices as TEMPORARY or VOLATILE
git-svn-id: https://svn.fhem.de/fhem/trunk@13183 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1ca66edd57
commit
0a9376bae4
48
fhem/FHEM/98_mark.pm
Normal file
48
fhem/FHEM/98_mark.pm
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# $Id$
|
||||||
|
|
||||||
|
package main;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
sub mark_Initialize($$) {
|
||||||
|
$cmds{mark} = { Fn => "CommandMark",
|
||||||
|
Hlp =>"<TEMPORARY|VOLATILE>,mark devices"};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub CommandMark($$)
|
||||||
|
{
|
||||||
|
my ($cl, $param) = @_;
|
||||||
|
my ($devspec,@marks) = split (" ",$param);
|
||||||
|
my @devices = devspec2array($devspec,undef);
|
||||||
|
my $ret = "";
|
||||||
|
|
||||||
|
foreach my $m (@marks) {
|
||||||
|
$m = uc($m);
|
||||||
|
next if( $m ne "TEMPORARY" && $m ne "VOLATILE" );
|
||||||
|
foreach my $d (@devices){
|
||||||
|
$defs{$d}{$m} = 1;
|
||||||
|
$ret .= "$d marked as $m\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
=item helper
|
||||||
|
=item summary mark devices for TEMPORARY or VOLATILE
|
||||||
|
=item summary_DE markiert Geräte als TEMPORARY oder VOLATILE
|
||||||
|
=item command
|
||||||
|
=begin html
|
||||||
|
|
||||||
|
<a name="mark"></a>
|
||||||
|
<h3>mark</h3>
|
||||||
|
<ul>
|
||||||
|
<code>mark <devspec> <TEMPORARY|VOLATILE></code>
|
||||||
|
<br><br>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
=end html
|
||||||
|
|
||||||
|
=cut
|
Loading…
x
Reference in New Issue
Block a user