Skip to content

Commit

Permalink
Removing ":" in IDs:
Browse files Browse the repository at this point in the history
#57
Attention: Unfortunately, this needs to reinstall the Adapter
  • Loading branch information
baerengraben authored and baerengraben committed Oct 19, 2021
1 parent 07c55ff commit f7a83f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit f7a83f1

Please sign in to comment.