-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added fetchWeatherHourly and supporting function #2929
Conversation
Release 2.21.0
Added: -fetchWeatherHourly function -generateWeatherObjectsFromHourly (called by fetchWeatherHourly)
@@ -138,6 +161,34 @@ WeatherProvider.register("weathergov", { | |||
} | |||
}); | |||
}, | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the "doesnt update immediatly" you have to add the call to the new method in "finally" block in line 153 like this:
// handle 'forecast' config, fall back to 'current'
if (config.type === "forecast") {
this.fetchWeatherForecast();
} else if (config.type === "hourly") {
this.fetchWeatherHourly();
} else {
this.fetchCurrentWeather();
}
Besides the fix I mentioned looks good already. DOnt forge to update the CHANGELOG and run "npm run prettier" before submitting. |
rejas, Thanks for the help on this, but I still have some newbie-type questions...
|
Im on the jump so quick reply:
|
how did u install MagicMirror? use my script? I don't install the development tools so it's not there do another npm install in the MagicMirror folder |
sdetwell, I followed the Manual instructions at https://docs.magicmirror.builders/getting-started/installation.html. Tried "npm install prettier" in the MagicMirror folder again. Still get [Missing script: "prettier"] when I "npm run prettier" in the MagicMirror folder |
sdetwell & rajas, "npm run lint:prettier" works! |
rejas, I'm not understanding something with Github and feel like my questions shouldn't be going in this PR. Is there any way we could communicate outside of this PR, or is there a more appropriate place to ask questions about Github? |
the forum or discord channel both provide for private chats.. but ask away and we can help.. we can delete the posts later if u like GitHub, my view make a fork of the project you want to contribute to make your changes and test update your fork with content from the local repo contribute your changes from your fork if before your submitted changes are merged you push more updates to the same fork branch the PR is updated w those changes |
sdetweil, Thanks for the response. I had created this Pull Request after creating a fork in my user path from the MagicMirror Master. First, I'm trying to figure out if I can salvage this Pull Request or if I need to create a new one. I was able to change the "destination" branch from Master to develop. But, since I should have forked from the MagicMirror/develop branch instead of the Master, I'm guessing the only option would be to close this PR and create another. I've been learning Github using the website more than CL, so Assuming this PR is not salvageable, let me say back what I think I understand...
|
yes, I do all the work from the cl except the fork and pr creating a branch copies the current branch, so u want to get to develop first, and then copy it to the branch as it's base |
you can rename your existing clone on your system clone the fork again, get to the correct branch and copy changes from one to another I like this approach vs creating another branch, cause only one branch can be active at a time and it's annoying trying to copy things and switching branches |
I think I understand that I need to create a new pull request after forking from the "develop" branch of MichMich/MagicMirror. Closing this request without merging. |
Added:
-fetchWeatherHourly function
-generateWeatherObjectsFromHourly (called by fetchWeatherHourly)
PROBLEM: fetchWeatherHourly doesn't immediately refresh like the fetchCurrentWeather and fetchWeatherForecast. Have to wait for the first 10-minute data refresh to populate.