Skip to content

Commit

Permalink
Added group notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Veldkornet committed Jun 1, 2019
1 parent acb378e commit 36c3b3c
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@ let ledringPreference = false;
let InsightLog = null;

class MyApp extends Homey.App {

onInit() {

// Start building Pushover accounts array
buildPushoverArray();

createInsightlog();

Homey.ManagerSettings.on('set', function (settingname) {

if (settingname == 'pushoveraccount') {
console.log('Pushover - Account has been changed/updated...');
buildPushoverArray();
Expand Down Expand Up @@ -115,10 +110,8 @@ class MyApp extends Homey.App {
})
})
}

}


// Send notification with parameters
function pushoverSend(pUser, pToken, pMessage, pTitle, pPriority, pRetry, pExpire, pSound, image) {
let priority = 0;
Expand All @@ -140,12 +133,7 @@ function pushoverSend(pUser, pToken, pMessage, pTitle, pPriority, pRetry, pExpir
break;
}
if (pToken != "") {

let p = new push({
user: pUser,
token: pToken,
});

let p = new push({ user: pUser, token: pToken, });
let msg = {
// These values correspond to the parameters detailed on https://pushover.net/api
// 'message' is required. All other values are optional.
Expand Down Expand Up @@ -211,10 +199,7 @@ function pushoverSend_device(pUser, pToken, pMessage, pTitle, pDevice, pPriority
break;
}
if (pToken != "") {
let p = new push({
user: pUser,
token: pToken,
});
let p = new push({ user: pUser, token: pToken, });

let msg = {
// These values correspond to the parameters detailed on https://pushover.net/api
Expand Down Expand Up @@ -249,7 +234,6 @@ function pushoverSend_device(pUser, pToken, pMessage, pTitle, pDevice, pPriority
return Promise.resolve()
}


// Create Insight log
function createInsightlog() {

Expand Down

0 comments on commit 36c3b3c

Please sign in to comment.