From f7a83f188024a4f0a772ef6dd17627770c4cf63f Mon Sep 17 00:00:00 2001 From: baerengraben Date: Tue, 19 Oct 2021 08:52:44 +0200 Subject: [PATCH] Removing ":" in IDs: https://github.com/baerengraben/ioBroker.swiss-weather-api/issues/57 Attention: Unfortunately, this needs to reinstall the Adapter --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index ca81eca..b035335 100644 --- a/main.js +++ b/main.js @@ -57,13 +57,13 @@ function isValidJSONString(str) { /** * returns formattet Time * @param actualDate Date Object - * @returns {string} hour + ":" + min + ":" + sec + * @returns {string} hour + min + sec */ function getTimeFormattet(actualDate) { var hour = (actualDate.getHours()<10?'0':'') + actualDate.getHours(); var min = (actualDate.getMinutes()<10?'0':'') + actualDate.getMinutes(); var sec = (actualDate.getSeconds()<10?'0':'') + actualDate.getSeconds(); - return hour + ":" + min + ":" + sec; + return hour + min + sec; } /** @@ -777,9 +777,9 @@ function setCurrentHour(self){ var local_type = "dummy"; // update current_hour objects - self.getState(path + '.00:00:00.DD_DEG', (err, state) => { + self.getState(path + '.000000.DD_DEG', (err, state) => { if (!state || state.val === null) { - self.log.debug('tried to update current_hour, but no forecast data is available for ' + path + '.00:00:00.DD_DEG' + '. Try my luck on next hour...'); + self.log.debug('tried to update current_hour, but no forecast data is available for ' + path + '.000000.DD_DEG' + '. Try my luck on next hour...'); } else { self.log.debug('forecast data is available. State.val is: ' + state.val +': So updating current_hour...read correspondenting hour forecast from ' + 'swiss-weather-api.0.forecast.60minutes.day0.actual_hour and write it to swiss-weather-api.0.forecast.current_hour');