12 lines
334 B
JavaScript
12 lines
334 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.toLowerCase();
|
|
node.send(msg);
|
|
});
|
|
}
|
|
RED.nodes.registerType("c-thermostat", thermostat );
|
|
}
|