From c27a355eba83fb75cd8699850c085131849963ce Mon Sep 17 00:00:00 2001 From: tp1de Date: Fri, 23 Feb 2024 19:29:04 +0100 Subject: [PATCH] km200 recordings --- README.md | 3 +++ lib/km200.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5b20aa8..74c099b 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,9 @@ German ioBroker forum: https://forum.iobroker.net/topic/45862/neuer-adapter-ems- Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** +* change KM200 error messages for recordings + ### 3.0.0 (2024-02-17) * Node >= 18 required * update heatdemand weight changes to be effective during active instance diff --git a/lib/km200.js b/lib/km200.js index 6647b2d..25f2180 100644 --- a/lib/km200.js +++ b/lib/km200.js @@ -571,7 +571,7 @@ async function hours(r) { for (let i=0;i<3;i++) { const url1 = feld + datum.getFullYear()+"-"+ (datum.getMonth()+1) +"-"+datum.getDate(); try {data = await km200_get(url1);} - catch(error) {adapter.log.error("KM200 error reading recordings on hour"+data);data = " "; } + catch(error) {adapter.log.error("KM200 error reading recordings on hour ");data = " "; } if (data != " ") { if (i == 0) statename = adapt+r.km200+".km200.Hours.today"; @@ -627,7 +627,7 @@ async function days(r) { for (let i=0;i<3;i++) { const url1 = feld + jahr + "-" + monat; try {data = await km200_get(url1);} - catch(error) {adapter.log.error("KM200 error reading recordings on days"+data);data = " "; } + catch(error) {adapter.log.error("KM200 error reading recordings on days ");data = " "; } if (data != " ") { if (i == 0) statename = adapt+r.km200+".km200.Days.actual_month"; @@ -691,7 +691,7 @@ async function months(r) { for (let i=0;i<3;i++) { const url1 = feld + jahr ; try {data = await km200_get(url1);} - catch(error) {adapter.log.error("KM200 error reading recordings on months"+data);data = " "; } + catch(error) {adapter.log.error("KM200 error reading recordings on months ");data = " "; } if (data != " ") { if (i == 0) statename = adapt+r.km200+".km200.Months.actual_year";