2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00
fhem-mirror/fhem/contrib/betateilchen/98_mark.pm
betateilchen c7a3f4121a ./contrib/betateilchen/: use own folder
git-svn-id: https://svn.fhem.de/fhem/trunk@14721 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2017-07-15 17:14:11 +00:00

49 lines
920 B
Perl

# $Id: 98_mark.pm 13246 2017-01-26 19:24:51Z betateilchen $
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 command
=item summary mark devices for TEMPORARY or VOLATILE
=item summary_DE markiert Ger&auml;te als TEMPORARY oder VOLATILE
=item command
=begin html
<a name="mark"></a>
<h3>mark</h3>
<ul>
<code>mark &lt;devspec&gt; &lt;TEMPORARY|VOLATILE&gt;</code>
<br><br>
</ul>
=end html
=cut