forked from hollie/misterhouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hollie#465 from hollie/add_pushover_support
Add pushover support
- Loading branch information
Showing
2 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Category=Pushover | ||
|
||
# Sample code for sending Pushover notifications | ||
# Brian Rudy (brudyNO@SPAMpraecogito.com) | ||
|
||
# Pushover_token and Pushover_user must be defined in mh.private.ini | ||
|
||
use Pushover; | ||
|
||
$v_send_pushover_to_all = new Voice_Cmd 'Send pushover notification to [all,tusdroidrazrhd]'; | ||
my $push = new Pushover(); | ||
|
||
|
||
if ($state = said $v_send_pushover_to_all) { | ||
if ($state eq "all") { | ||
print_log "Sending Pushover notification to all devices"; | ||
$push->notify( "A low priority test message", { title => 'Test title', priority => -1 }); | ||
} | ||
else { | ||
print_log "Sending Pushover notification to $state"; | ||
$push->notify( "A low priority test message to $state", { title => 'Test title', priority => -1, device => $state}); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters