2
0

feat(icons): change icons

This commit is contained in:
Pierre CLEMENT
2018-01-03 15:36:23 +01:00
parent 8a40a6ad54
commit 92ccef1492
23 changed files with 515 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -33,7 +33,7 @@
inputs:1,
outputs:1,
paletteLabel: "read",
icon: "function.png",
icon: "mi-read.png",
label: function() {
return this.name||"read";
}
@@ -68,7 +68,7 @@
inputs:1,
outputs:1,
paletteLabel: "get id list",
icon: "function.png",
icon: "mi-list.png",
label: function() {
return this.name||"get id list";
}
@@ -119,7 +119,7 @@
inputs:1,
outputs:1,
paletteLabel: "click",
icon: "function.png",
icon: "mi-click.png",
label: function() {
return this.name||"click";
}
@@ -169,7 +169,7 @@
inputs:1,
outputs:1,
paletteLabel: "double click",
icon: "function.png",
icon: "mi-double-click.png",
label: function() {
return this.name||"double click";
}
@@ -192,7 +192,7 @@
inputs: 1,
outputs: 1,
paletteLabel: "set light",
icon: "light-icon.png",
icon: "mi-bulb.png",
label: function () {
return this.name || "set light";
},
@@ -279,7 +279,7 @@
inputs: 1,
outputs: 1,
paletteLabel: "play sound",
icon: "function.png",
icon: "mi-sound.png",
label: function () {
return this.name || "play sound";
}
@@ -365,7 +365,7 @@
inputs:1,
outputs:1,
paletteLabel: "stop sound",
icon: "function.png",
icon: "mi-mute.png",
label: function() {
return this.name||"stop sound";
}
@@ -407,7 +407,7 @@
inputs:1,
outputs:1,
paletteLabel: "on",
icon: "function.png",
icon: "mi-on.png",
label: function() {
return this.name||"power on";
}
@@ -449,7 +449,7 @@
inputs:1,
outputs:1,
paletteLabel: "off",
icon: "function.png",
icon: "mi-off.png",
label: function() {
return this.name||"power off";
}

View File

@@ -111,7 +111,13 @@ module.exports = (RED) => {
this.gateway = RED.nodes.getNode(config.gateway);
this.on('input', (msg) => {
miDevicesUtils.sendWritePayloadToGateway(this, msg, { status: "on", sid: msg.sid});
if(msg.sid){
miDevicesUtils.sendWritePayloadToGateway(this, msg, { status: "on", sid: msg.sid});
}
else {
msg.payload = "off";
this.send(msg);
}
});
}
RED.nodes.registerType("xiaomi-actions on", XiaomiActionPowerOn);
@@ -124,7 +130,13 @@ module.exports = (RED) => {
this.gateway = RED.nodes.getNode(config.gateway);
this.on('input', (msg) => {
miDevicesUtils.sendWritePayloadToGateway(this, msg, { status: "off", sid: msg.sid});
if(msg.sid){
miDevicesUtils.sendWritePayloadToGateway(this, msg, { status: "off", sid: msg.sid});
}
else {
msg.payload = "off";
this.send(msg);
}
});
}
RED.nodes.registerType("xiaomi-actions off", XiaomiActionPowerOff);