Skip to content
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

UK Met Office DataHub weather provider #2058

Merged
merged 4 commits into from
Jun 28, 2020
Merged

UK Met Office DataHub weather provider #2058

merged 4 commits into from
Jun 28, 2020

Conversation

XBCreepinJesus
Copy link
Contributor

I have created a new weather provider that uses the Met Office's new DataHub API (their existing DataPoint service will eventually be shut down, to be replaced by this one).

I have written this provider to return precipitation as a probability, in line with the existing Met Office provider (although it can also supply absolute values in mm). As such, there needs to be a small addition to weather.js where the if statement checks for the existing Met Office module when returning precipitation units.

The documentation for the weather module will also need to be updated (if approved, of course).

  • Does the pull request solve a related issue?
    It solves a created issue - editing weather.js to check for this provider when returning precipitation units
  • If so, can you reference the issue?
    N/A
  • What does the pull request accomplish? Use a list if needed.
    Adds a provider for the Met Office's new API.
  • If it includes major visual changes please add screenshots.
    N/A

This is a provider for the Met Office's new DataHub API (which will eventually replace their current DataPoint service).
The new Met Office provider also returns precipitation as a probability percentage.
@rejas
Copy link
Collaborator

rejas commented Jun 28, 2020

Looks nice on first sight.
a) Could you run npm run lint:prettier and commit the changes? That would fix the tests
b) Do you know when the old API is shut down?

@XBCreepinJesus
Copy link
Contributor Author

Ok, I've run the prettier script - it just removed a couple of trailing commas by the looks of things. I also replaced the use of config.long with config.lon to be more consistent with existing providers - something I just noticed while looking at the other providers documentation!

As for when the old API is shut down - there's nothing to say at the moment, but it's probably not for a while yet. Some info here: https://www.metoffice.gov.uk/services/data/datapoint/notifications/weather-datahub

@MichMich MichMich merged commit fdd389d into MagicMirrorOrg:develop Jun 28, 2020
@XBCreepinJesus XBCreepinJesus deleted the develop branch June 28, 2020 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants