mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Add available sounds to config view.
This commit is contained in:
@@ -24,6 +24,8 @@ module.exports = function(RED) {
|
||||
this.title = n.title;
|
||||
this.device = n.device;
|
||||
this.priority = n.priority;
|
||||
this.sound = n.sound;
|
||||
if (this.sound === '') { this.sound = null; }
|
||||
var credentials = this.credentials;
|
||||
if ((credentials) && (credentials.hasOwnProperty("pushkey"))) { this.pushkey = credentials.pushkey; }
|
||||
else { this.error("No Pushover api token set"); }
|
||||
@@ -45,7 +47,7 @@ module.exports = function(RED) {
|
||||
var titl = this.title || msg.topic || "Node-RED";
|
||||
var pri = this.priority || msg.priority || 0;
|
||||
var dev = this.device || msg.device;
|
||||
var sound = msg.sound || null;
|
||||
var sound = this.sound || msg.sound || null;
|
||||
if (isNaN(pri)) {pri=0;}
|
||||
if (pri > 2) {pri = 2;}
|
||||
if (pri < -2) {pri = -2;}
|
||||
|
||||
Reference in New Issue
Block a user