Added attribute for sending the timestamp to the pushover api.

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

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