2023-10-02 21:33:26 +03:00
|
|
|
module.exports = function(RED) {
|
2023-10-02 22:32:55 +03:00
|
|
|
function thermostat(config) {
|
2023-10-02 21:33:26 +03:00
|
|
|
RED.nodes.createNode(this,config);
|
|
|
|
var node = this;
|
|
|
|
node.on('input', function(msg) {
|
2023-10-02 22:32:55 +03:00
|
|
|
msg.payload = msg.payload.toUpperCase();
|
2023-10-02 21:33:26 +03:00
|
|
|
node.send(msg);
|
|
|
|
});
|
|
|
|
}
|
2023-10-02 22:32:55 +03:00
|
|
|
RED.nodes.registerType("thermostat",{
|
|
|
|
"category": "thermostat",
|
|
|
|
"defaults": {
|
|
|
|
name: {
|
|
|
|
value: "C-Thermostat"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
2023-10-02 21:33:26 +03:00
|
|
|
}
|