From 455dc486f3d631659de8a40032158316baade908 Mon Sep 17 00:00:00 2001 From: NoBl Date: Sun, 22 Oct 2023 19:29:22 +0200 Subject: [PATCH] Bugfix AllTimeHistory --- README.md | 3 +++ io-package.json | 15 ++++++++++++++- main.js | 2 +- package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d7250f7..2053707 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,9 @@ This channel contains values polled from SENEC App-API. ## Changelog +### 1.6.10 (NoBl) +* Bugfix for AllTimeHistory (should work again) + ### 1.6.9 (NoBl) * Added switch in config to enable active control of appliance (you will need activate this, if you want to control the appliance via the adapter) * Improved handling of forced loading (please report if we need more appliance-states covered by this) diff --git a/io-package.json b/io-package.json index 78bbc09..96d685f 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "senec", - "version": "1.6.9", + "version": "1.6.10", "news": { + "1.6.10": { + "en": "Bugfix for AllTimeHistory", + "de": "Bugfix für AllTimeHistory", + "ru": "Bugfix для AllTimeИстория", + "pt": "Bugfix para AllTimeHistory", + "nl": "Bugfix voor AllTimeHistory", + "fr": "Bugfix pour AllTimeHistory", + "it": "Bugfix per AllTimeHistory", + "es": "Bugfix para AllTimeHistory", + "pl": "Bugfix for AllTimeHistory (ang.)", + "uk": "Виправлення помилок для AllTimeHistory", + "zh-cn": "九. 一切制度" + }, "1.6.9": { "en": "Improved battery forced loading, added switch in config to allow active control of appliance.", "de": "Manuelles Laden verbessert, zusätzlicher Schalter in Config, um aktive Steuerung des Gerätes zu erlauben.", diff --git a/main.js b/main.js index 53749c6..81b3fa3 100644 --- a/main.js +++ b/main.js @@ -559,7 +559,7 @@ class Senec extends utils.Adapter { */ async insertAllTimeHistory(system, key, year, value, einheit) { if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; // Security fix - if (!isNaN(year) || !isNaN(value)) return; // Security fix + if (isNaN(year) || isNaN(value)) return; // Security fix const pfx = "_api.Anlagen." + system + ".Statistik.AllTime."; const valueStore = pfx + "valueStore"; const statsObj = await this.getStateAsync(valueStore); diff --git a/package.json b/package.json index faf5273..b8c1443 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.senec", - "version": "1.6.9", + "version": "1.6.10", "description": "Senec Home", "author": { "name": "NoBl",