2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-05 17:48: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->{DefFn} = "notify_Define";
$hash->{NotifyFn} = "notify_Exec"; $hash->{NotifyFn} = "notify_Exec";
$hash->{AttrFn} = "notify_Attr"; $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$/); $found = ("$n:$s" =~ m/^$re$/);
} }
if($found) { if($found) {
$ntfy->{STATE} = $dev->{NTFY_TRIGGERTIME}
if(AttrVal($ln, 'showTriggerTime', 0));
Log3 $ln, 5, "Triggering $ln"; Log3 $ln, 5, "Triggering $ln";
my (undef, $exec) = split("[ \t]+", $ntfy->{DEF}, 2); 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 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 FHEMWEB to display this value, when clicking "on" or "off", which is
often not intended.</li> often not intended.</li>
<li>showTriggerTime<br/>
Replace STATE content 'active' by timestamp of last execution.</li>
</ul> </ul>
<br> <br>