From 6f5ab1fb6a648dec08fbe8e61d84cc35f0d03347 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Mon, 2 Oct 2023 21:33:26 +0300 Subject: [PATCH] update --- package.json | 9 +++++---- thermostat.html | 26 ++++++++++++++++++++++++++ thermostat.js | 11 +++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 thermostat.html create mode 100644 thermostat.js diff --git a/package.json b/package.json index 51af702..eefbe5b 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,19 @@ { - "name": "node-red-contrib-combined-rn-thermostat", - "version": "1.0.0", + "name": "@vvzvlad/node-red-contrib-rn-combined-nodes", + "version": "0.0.1", "description": "", "main": "index.js", + "keywords": [ "node-red" ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "https://gitea.vvzvlad.xyz/vvzvlad/node-red-contrib-combined-rn-thermostat" + "url": "https://gitea.vvzvlad.xyz/vvzvlad/node-red-contrib-rn-combined-nodes" }, "node-red" : { "nodes": { - "c-thermostat": "c-thermostat.js" + "thermostat": "thermostat.js" } }, "author": "vvzvlad", diff --git a/thermostat.html b/thermostat.html new file mode 100644 index 0000000..2bda315 --- /dev/null +++ b/thermostat.html @@ -0,0 +1,26 @@ + + + + + diff --git a/thermostat.js b/thermostat.js new file mode 100644 index 0000000..006b35e --- /dev/null +++ b/thermostat.js @@ -0,0 +1,11 @@ +module.exports = function(RED) { + function LowerCaseNode(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("lower-case",LowerCaseNode); +}