diff --git a/CHANGELOG.md b/CHANGELOG.md index 638743b..2013662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,10 @@ Install of a specific Version in Redmatic (on a Homematic): - `npm install --save --no-package-lock --global-style --save-prefix="~" --production node-red-contrib-sun-position@2.0.0` This can be also used to go back to an older Version. +### 2.1.0: bug fixes +- blind-control + - fix bug of handling not time constrained rules be first to last evaluated ### 2.0.13: bug fixes - general diff --git a/nodes/blind-control.js b/nodes/blind-control.js index a6108b3..ff4e59d 100644 --- a/nodes/blind-control.js +++ b/nodes/blind-control.js @@ -548,12 +548,11 @@ module.exports = function (RED) { // node.debug(`first loop count:${ node.rules.count } lastuntil:${ node.rules.lastUntil}`); for (let i = 0; i <= node.rules.lastUntil; ++i) { const rule = node.rules.data[i]; - // node.debug(`rule ${rule.name} (${rule.pos}) enabled=${rule.enabled} operator=${rule.time.operator} noFrom=${rule.time.operator !== cRuleFrom} data=${util.inspect(rule, {colors:true, compact:10, breakLength: Infinity })}`); if (!rule.enabled) { continue; } if (rule.time && rule.time.operator === cRuleFrom) { continue; } const res = ctrlLib.compareRules(node, msg, rule, r => (r >= oNow.nowNr), oNow); if (res) { - // node.debug(`1. ruleSel ${rule.name} (${rule.pos}) data=${ util.inspect(res, { colors: true, compact: 10, breakLength: Infinity }) }`); + // node.debug(`1. ruleSel ${rule.name} (${rule.pos}) level.operator=${ res.level.operator }`); if (res.level.operator === cRule.slatOversteer) { ruleSlatOvs = res; } else if (res.level.operator === cRule.topicOversteer) { @@ -565,9 +564,7 @@ module.exports = function (RED) { } else { ruleSel = res; ruleindex = i; - if (rule.time && rule.time.operator !== cRuleFrom) { - break; - } + break; } } } diff --git a/package-lock.json b/package-lock.json index 35f099e..511dfa4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-sun-position", - "version": "2.0.13", + "version": "2.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1504,9 +1504,9 @@ } }, "eslint-plugin-jsdoc": { - "version": "37.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.7.1.tgz", - "integrity": "sha512-ySxDTedl6qKXT/VeTwcZlhsRtvNQZGPklyVnaL5+ge20vowzFA9CKvrY0NXRqvdIz6JBVMFpxX9DSmS3OyAUOQ==", + "version": "37.8.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.8.2.tgz", + "integrity": "sha512-YsCdhrfdipGAy1NBdPOR5yiFzsyKv7lPDKlPn5aZGsQX+0KAw4fHV4uTdW9zsXJ8MxLgaF2cOC9e7JPwfJpYJw==", "dev": true, "requires": { "@es-joy/jsdoccomment": "~0.18.0", diff --git a/package.json b/package.json index 7b4d836..37a0f86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-sun-position", - "version": "2.0.13", + "version": "2.1.0", "description": "NodeRED nodes to get sun and moon position", "keywords": [ "node-red", @@ -113,7 +113,7 @@ "devDependencies": { "eslint": ">=8.8.0", "eslint-plugin-html": ">=6.2.0", - "eslint-plugin-jsdoc": ">=37.7.1", + "eslint-plugin-jsdoc": ">=37.8.2", "eslint-plugin-json": ">=3.1.0", "eslint-plugin-node": ">=11.1.0", "node-red-dev": "^0.1.5"