20 lines
471 B
JavaScript
20 lines
471 B
JavaScript
module.exports = function(RED) {
|
|
function thermostat(config) {
|
|
RED.nodes.createNode(this,config);
|
|
var node = this;
|
|
node.on('input', function(msg) {
|
|
msg.payload = msg.payload.toUpperCase();
|
|
node.send(msg);
|
|
});
|
|
}
|
|
RED.nodes.registerType("thermostat",{
|
|
"category": "thermostat",
|
|
"defaults": {
|
|
name: {
|
|
value: "C-Thermostat"
|
|
}
|
|
}
|
|
},
|
|
);
|
|
}
|