From 86055a67bac5d61ea7d1ae85f935e0cf6efeb255 Mon Sep 17 00:00:00 2001 From: jbosecker <> Date: Tue, 7 Jan 2014 09:18:19 +0000 Subject: [PATCH] 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 --- contrib/70_Pushover.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/70_Pushover.pm b/contrib/70_Pushover.pm index d4aeccfa4..3c94d1e7d 100644 --- a/contrib/70_Pushover.pm +++ b/contrib/70_Pushover.pm @@ -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