This commit is contained in:
vvzvlad 2023-10-02 22:32:55 +03:00
parent 6f5ab1fb6a
commit 7991fb4f29

View File

@ -1,11 +1,19 @@
module.exports = function(RED) {
function LowerCaseNode(config) {
function thermostat(config) {
RED.nodes.createNode(this,config);
var node = this;
node.on('input', function(msg) {
msg.payload = msg.payload.toLowerCase();
msg.payload = msg.payload.toUpperCase();
node.send(msg);
});
}
RED.nodes.registerType("lower-case",LowerCaseNode);
RED.nodes.registerType("thermostat",{
"category": "thermostat",
"defaults": {
name: {
value: "C-Thermostat"
}
}
},
);
}