Skip to content

Commit

Permalink
2.1.1: bug fixes
Browse files Browse the repository at this point in the history
- clock-timer
  - merged with blind-control
  • Loading branch information
Hypnos3 committed Feb 15, 2022
1 parent 997742c commit 7bc3ccc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ 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.1: bug fixes

- clock-timer
- merged with blind-control

### 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
Expand Down
2 changes: 1 addition & 1 deletion nodes/blind-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ module.exports = function (RED) {
}
let newPos = hlp.getMsgNumberValue(msg, ['blindPosition', 'position', 'level', 'blindLevel'], ['manual', 'levelOverwrite']);
let nExpire = hlp.getMsgNumberValue(msg, 'expire', 'expire');
if (String(msg.topic).includes('noExpir')) { // hlp.getMsgTopicContains(msg, 'noExpir')) {
if (msg.topic && String(msg.topic).includes('noExpir')) { // hlp.getMsgTopicContains(msg, 'noExpir')) {
nExpire = -1;
}
if (!isNaN(newPos)) {
Expand Down
11 changes: 2 additions & 9 deletions nodes/clock-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,12 @@ module.exports = function (RED) {
if (!rule.enabled) { continue; }
if (rule.time && rule.time.operator === cRuleFrom) { continue; }
// const res = fktCheck(rule, r => (r >= nowNr));
let res = null;
if (!rule.time || rule.time.operator === cRuleFrom) {
res = ctrlLib.compareRules(node, msg, rule, r => (r <= oNow.nowNr), oNow);
} else {
res = ctrlLib.compareRules(node, msg, rule, r => (r >= oNow.nowNr), oNow);
}
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 }) }`);
ruleSel = res;
ruleindex = i;
if (rule.time && rule.time.operator !== cRuleFrom) {
break;
}
break;
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-sun-position",
"version": "2.1.0",
"version": "2.1.1",
"description": "NodeRED nodes to get sun and moon position",
"keywords": [
"node-red",
Expand Down Expand Up @@ -111,9 +111,9 @@
"lodash.isequal": "^4.5.0"
},
"devDependencies": {
"eslint": ">=8.8.0",
"eslint": ">=8.9.0",
"eslint-plugin-html": ">=6.2.0",
"eslint-plugin-jsdoc": ">=37.8.2",
"eslint-plugin-jsdoc": ">=37.9.1",
"eslint-plugin-json": ">=3.1.0",
"eslint-plugin-node": ">=11.1.0",
"node-red-dev": "^0.1.5"
Expand Down

0 comments on commit 7bc3ccc

Please sign in to comment.