2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-05 05:28:44 +00:00

notify: showTriggerTime, proposed by betateilchen

git-svn-id: https://svn.fhem.de/fhem/trunk@5353 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-03-28 17:39:22 +00:00
parent 65a7665a4e
commit 59fa22983f

View File

@ -14,7 +14,7 @@ notify_Initialize($)
$hash->{DefFn} = "notify_Define";
$hash->{NotifyFn} = "notify_Exec";
$hash->{AttrFn} = "notify_Attr";
$hash->{AttrList} = "disable:0,1 disabledForIntervals forwardReturnValue:0,1";
$hash->{AttrList} = "disable:0,1 disabledForIntervals forwardReturnValue:0,1 showTriggerTime:0,1";
}
@ -69,6 +69,9 @@ notify_Exec($$)
$found = ("$n:$s" =~ m/^$re$/);
}
if($found) {
$ntfy->{STATE} = $dev->{NTFY_TRIGGERTIME}
if(AttrVal($ln, 'showTriggerTime', 0));
Log3 $ln, 5, "Triggering $ln";
my (undef, $exec) = split("[ \t]+", $ntfy->{DEF}, 2);
@ -230,6 +233,9 @@ notify_Attr(@)
triggers this notify will also return this value. This can cause e.g
FHEMWEB to display this value, when clicking "on" or "off", which is
often not intended.</li>
<li>showTriggerTime<br/>
Replace STATE content 'active' by timestamp of last execution.</li>
</ul>
<br>