Skip to content

Commit 1b38b0b

Browse files
authored
Merge pull request #356 from rdmtc/dev
2.0.3 bump version + fix rule enable/Disable
2 parents 57e804a + 87e826e commit 1b38b0b

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Install of a specific Version in Redmatic (on a Homematic):
1515

1616
This can be also used to go back to an older Version.
1717

18-
### 2.0.2: small fix + enhancement
18+
### 2.0.3: small fix + enhancement
1919

2020
- general
2121
- allow to set context store in configuration node #351

nodes/blind-control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ module.exports = function (RED) {
558558
// node.debug('--------- starting second loop ' + node.rules.count);
559559
for (let i = (node.rules.count - 1); i >= 0; --i) {
560560
const rule = node.rules.data[i];
561-
if (!rule.enabled) { continue; }
562561
// node.debug('rule ' + rule.time.operator + ' - ' + (rule.time.operator !== cRuleUntil) + ' - ' + util.inspect(rule, {colors:true, compact:10, breakLength: Infinity }));
562+
if (!rule.enabled) { continue; }
563563
if (rule.time && rule.time.operator === cRuleUntil) { continue; } // - From: timeOp === cRuleFrom
564564
const res = ctrlLib.compareRules(node, msg, rule, r => (r <= oNow.nowNr), oNow);
565565
if (res) {

nodes/clock-timer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ module.exports = function (RED) {
162162
// node.debug('first loop count:' + node.rules.count + ' lastuntil:' + node.rules.lastUntil);
163163
for (let i = 0; i <= node.rules.lastUntil; ++i) {
164164
const rule = node.rules.data[i];
165-
if (!rule.enabled) { continue; }
166165
// node.debug('rule ' + rule.time.operator + ' - ' + (rule.time.operator !== cRuleFrom) + ' - ' + util.inspect(rule, {colors:true, compact:10, breakLength: Infinity }));
166+
if (!rule.enabled) { continue; }
167167
if (rule.time && rule.time.operator === cRuleFrom) { continue; }
168168
// const res = fktCheck(rule, r => (r >= nowNr));
169169
let res = null;
@@ -186,8 +186,8 @@ module.exports = function (RED) {
186186
// node.debug('--------- starting second loop ' + node.rules.count);
187187
for (let i = (node.rules.count - 1); i >= 0; --i) {
188188
const rule = node.rules.data[i];
189-
if (!rule.enabled) { continue; }
190189
// node.debug('rule ' + rule.time.operator + ' - ' + (rule.time.operator !== cRuleUntil) + ' - ' + util.inspect(rule, {colors:true, compact:10, breakLength: Infinity }));
190+
if (!rule.enabled) { continue; }
191191
if (rule.time && rule.time.operator === cRuleUntil) { continue; } // - From: timeOp === cRuleFrom
192192
const res = ctrlLib.compareRules(node, msg, rule, r => (r <= oNow.nowNr), oNow);
193193
if (res) {

nodes/lib/timeControlHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ function initializeCtrl(REDLib, node, config) {
675675
}
676676
/// check generic rule settings
677677
rule.name = rule.name || 'rule ' + rule.pos;
678-
rule.enabled = (rule.enabled !== false || rule.enabled !== 'false');
678+
rule.enabled = !(rule.enabled === false || rule.enabled === 'false');
679679
rule.resetOverwrite = hlp.isTrue(rule.resetOverwrite === true) ? true : false;
680680
if (rule.payload || (rule.level && (rule.level.operator === cRuleAbsolute))) {
681681
rule.importance = Number(rule.importance) || 0;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-sun-position",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "NodeRED nodes to get sun and moon position",
55
"keywords": [
66
"node-red",

0 commit comments

Comments
 (0)