Added Content

This commit is contained in:
2020-04-15 02:48:39 +02:00
parent cd2ec74ba9
commit 64ba0edfe6
20 changed files with 457 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
module.exports = function(RED) {
function httpdomooutbright(config) {
RED.nodes.createNode(this,config);
this.idx = parseInt(config.idx, 10);
var node = this;
node.on('input', function(msg) {
if (node.idx === 'undefined' || isNaN(node.idx) || node.idx === null || node.idx === "" ) {
node.error("IDX not set");
return;
}
var newbright = msg.payload;
msg.payload = {
"idx": node.idx,
"level": newbright,
"type": "command",
"param": "switchlight",
"switchcmd": "Set Level"
};
node.send(msg);
});
}
RED.nodes.registerType("http-domo-out-bright",httpdomooutbright);
}