Bump version to 0.1.2
This commit is contained in:
parent
f03e247981
commit
3aedb009ff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vvzvlad/node-red-contrib-rn-combined-nodes",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
|
@ -7,7 +7,7 @@
|
||||
name: {value:""}
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
outputs: 2,
|
||||
icon: "file.svg",
|
||||
label: function() {
|
||||
return this.name||"C-Thermostat";
|
||||
|
@ -6,19 +6,19 @@ module.exports = function(RED) {
|
||||
|
||||
const HEAT_ON_THRESHOLD = 0.2
|
||||
const HEAT_OFF_THRESHOLD = 0.2
|
||||
|
||||
let control_mode = context.get("control_mode") || "auto" //auto, on, off
|
||||
let current_temp = context.get("current_temp")
|
||||
let target_temp = context.get("target_temp") || 19
|
||||
let window_state = context.get("window_state") || "close" //open, close
|
||||
let window_mode = context.get("window_mode") || "cool" //heat, cool, off
|
||||
let heater_status = null
|
||||
let debug = ""
|
||||
|
||||
|
||||
|
||||
|
||||
function debug_text(text) {
|
||||
if (text === "return_debug") return debug
|
||||
if (text === "return_debug") {
|
||||
let debug_tmp = debug
|
||||
debug = ""
|
||||
return debug
|
||||
}
|
||||
debug = debug ? `${debug}, ${text}` : text
|
||||
|
||||
}
|
||||
|
||||
function predict_temp_change(current_temp, time_interval) {
|
||||
@ -114,6 +114,13 @@ module.exports = function(RED) {
|
||||
let topic = msg.topic
|
||||
let payload = msg.payload
|
||||
|
||||
let control_mode = context.get("control_mode") || "auto" //auto, on, off
|
||||
let current_temp = context.get("current_temp")
|
||||
let target_temp = context.get("target_temp") || 19
|
||||
let window_state = context.get("window_state") || "close" //open, close
|
||||
let window_mode = context.get("window_mode") || "cool" //heat, cool, off
|
||||
let heater_status = null
|
||||
|
||||
debug_text(`W-mode: ${window_mode}`)
|
||||
if (topic === "window_mode_control" && (payload === "cool" || payload === "heat" || payload === "off")) {
|
||||
window_mode = payload
|
||||
|
Loading…
Reference in New Issue
Block a user