2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

Added attribute for sending the timestamp to the pushover api.

git-svn-id: https://svn.fhem.de/fhem/trunk@4583 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jbosecker 2014-01-07 09:18:19 +00:00
parent 91d66d0406
commit d24866098c

View File

@ -42,6 +42,7 @@ sub Pushover_Initialize($$)
my ($hash) = @_;
$hash->{DefFn} = "Pushover_Define";
$hash->{SetFn} = "Pushover_Set";
$hash->{AttrList} = "timestamp:0,1";
}
sub Pushover_Define($$)
@ -189,6 +190,13 @@ sub Pushover_Set_Message
$body = $body . "&" . "expire=" . $expire;
}
my $timestamp = AttrVal($hash->{NAME}, "timestamp", 0);
if (1 == $timestamp)
{
$body = $body . "&" . "timestamp=" . time();
}
return Pushover_HTTP_Call($hash, $body);
}
else