mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +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:
parent
91d66d0406
commit
d24866098c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user