Schedlue a trigger for follow-on-for-timer
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1551 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -184,7 +184,7 @@ FS20_Set($@)
|
|||||||
return "Readonly value $a[1]" if(defined($readonly{$a[1]}));
|
return "Readonly value $a[1]" if(defined($readonly{$a[1]}));
|
||||||
|
|
||||||
if($na > 2 && $a[1] eq "dim") {
|
if($na > 2 && $a[1] eq "dim") {
|
||||||
$a[1] = ($a[2] eq "0" ? "off" : "dim$a[2]%");
|
$a[1] = ($a[2] eq "0" ? "off" : sprintf("dim%02d%%",$a[2]) );
|
||||||
splice @a, 2, 1;
|
splice @a, 2, 1;
|
||||||
$na = int(@a);
|
$na = int(@a);
|
||||||
}
|
}
|
||||||
@@ -251,7 +251,8 @@ FS20_Set($@)
|
|||||||
my $to = sprintf("%02d:%02d:%02d", $val/3600, ($val%3600)/60, $val%60);
|
my $to = sprintf("%02d:%02d:%02d", $val/3600, ($val%3600)/60, $val%60);
|
||||||
$modules{FS20}{ldata}{$name} = $to;
|
$modules{FS20}{ldata}{$name} = $to;
|
||||||
Log 4, "Follow: +$to setstate $name off";
|
Log 4, "Follow: +$to setstate $name off";
|
||||||
CommandDefine(undef, $name . "_timer at +$to setstate $name off");
|
CommandDefine(undef,
|
||||||
|
$name."_timer at +$to setstate $name off; trigger $name off");
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
|||||||
@@ -1535,10 +1535,6 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
to 8 sec, 1 sec from 8 to 16 sec and so on. If you need better
|
to 8 sec, 1 sec from 8 to 16 sec and so on. If you need better
|
||||||
precision for large values, use <a href="#at">at</a> which has a 1
|
precision for large values, use <a href="#at">at</a> which has a 1
|
||||||
sec resolution.</li>
|
sec resolution.</li>
|
||||||
<li>If the attribute follow-on-for-timer is set for the device and the
|
|
||||||
on-for-timer command is sent to the device with a time parameter,
|
|
||||||
the program automatically schedules a "setstate off" for the
|
|
||||||
specified time.</li>
|
|
||||||
<li>on-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
|
<li>on-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
|
||||||
or { <perl code> }, where the perl-code returns a time
|
or { <perl code> }, where the perl-code returns a time
|
||||||
specification).
|
specification).
|
||||||
@@ -1590,9 +1586,8 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
|
|
||||||
<a name="follow-on-for-timer"></a>
|
<a name="follow-on-for-timer"></a>
|
||||||
<li>follow-on-for-timer<br>
|
<li>follow-on-for-timer<br>
|
||||||
the program automatically schedules a "setstate off" for the time
|
schedule a "setstate off;trigger off" for the time specified as argument to
|
||||||
specified as argument to the on-for-timer command (for the specified
|
the on-for-timer command.
|
||||||
device only).
|
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><a href="#loglevel">loglevel</a></li><br>
|
<li><a href="#loglevel">loglevel</a></li><br>
|
||||||
|
|||||||
Reference in New Issue
Block a user