Bump version to 0.1.8

This commit is contained in:
vvzvlad 2023-10-03 16:13:30 +03:00
parent 2c1c275e09
commit 9b8f4b040d
3 changed files with 13 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@vvzvlad/node-red-contrib-rn-combined-nodes", "name": "@vvzvlad/node-red-contrib-rn-combined-nodes",
"version": "0.1.7", "version": "0.1.8",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"keywords": [ "keywords": [

View File

@ -4,8 +4,9 @@
color: '#F3B567', color: '#F3B567',
paletteLabel: 'C-Thermostat', paletteLabel: 'C-Thermostat',
defaults: { defaults: {
name: {value:"", required:true}, name: {value:""},
tag: {value:""} room: {value:"", required:true},
zone: {value:"", required:true}
}, },
inputs: 1, inputs: 1,
outputs: 2, outputs: 2,
@ -23,8 +24,12 @@
<input type="text" id="node-input-name" placeholder="Name"> <input type="text" id="node-input-name" placeholder="Name">
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="node-input-tag"><i class="fa fa-tag"></i> Name</label> <label for="node-input-room"><i class="fa fa-tag"></i> Room name</label>
<input type="text" id="node-input-tag" placeholder="Tag"> <input type="text" id="node-input-room" placeholder="Room name: gid_1">
</div>
<div class="form-row">
<label for="node-input-zone"><i class="fa fa-tag"></i> Zone name</label>
<input type="text" id="node-input-zone" placeholder="Zone name: gid">
</div> </div>
</script> </script>

View File

@ -1,7 +1,8 @@
module.exports = function(RED) { module.exports = function(RED) {
function thermostat(config) { function thermostat(config) {
RED.nodes.createNode(this,config); RED.nodes.createNode(this,config);
this.tag = config.tag; this.room = config.room;
this.zone = config.zone;
var node = this; var node = this;
var context = node.context(); var context = node.context();
@ -179,7 +180,7 @@ module.exports = function(RED) {
node.status({ text: debug_text("return_debug") }) node.status({ text: debug_text("return_debug") })
let msg_heater_status = { payload: heater_status } let msg_heater_status = { payload: heater_status }
let msg_extended_stats = { payload: extended_stats, topic: node.tag } let msg_extended_stats = { payload: extended_stats, room: node.room, zone: node.zone }
if (heater_status === null || typeof heater_status === "undefined") { if (heater_status === null || typeof heater_status === "undefined") {
msg_heater_status = null msg_heater_status = null