Skip to content

Commit

Permalink
little fix
Browse files Browse the repository at this point in the history
  • Loading branch information
twocolors committed Jul 24, 2022
1 parent c1fde58 commit 8160efd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions nodes/hvac.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ module.exports = function (RED) {
"use strict";

function MideaHVAC(config) {
RED.nodes.createNode(this, config);

let configNode = RED.nodes.getNode(config.device);
if (!configNode) return;
const ac = configNode.ac;

RED.nodes.createNode(this, config);
const ac = configNode.ac;
const node = this;
node.state = {};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "GPL",
"name": "node-red-contrib-midea-hvac",
"description": "Nodes for controlling Midea HVAC in Node-RED",
"version": "1.2.1",
"version": "1.2.2",
"node-red": {
"version": ">=2.2.0",
"nodes": {
Expand All @@ -29,6 +29,6 @@
"hvac"
],
"engines": {
"node": ">=14.0.0"
"node": ">=14"
}
}

0 comments on commit 8160efd

Please sign in to comment.