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

Support One Call API #301

Closed
difelice opened this issue Apr 12, 2020 · 9 comments
Closed

Support One Call API #301

difelice opened this issue Apr 12, 2020 · 9 comments

Comments

@difelice
Copy link

Overview

In the dusk of the popular Dark Sky API, it might be worth considering to add support for the One Call API, which is considered the alternative.

Reference

Migration guide

https://openweathermap.org/darksky-openweather?gclid=Cj0KCQjw-Mr0BRDyARIsAKEFbefcb00d_wztgHKOYj4HYEF1fLl-DnE0Yek9vWQ_bxptj2PcYLSNhDwaAu8REALw_wcB

API docs

https://openweathermap.org/api/one-call-api

@csparpa
Copy link
Owner

csparpa commented Apr 14, 2020

Thanks for pointing this out @difelice
I'm not sure I can keep up with coding that for the moment - would you help with it ?

@difelice
Copy link
Author

Sure. I'll have a look at it. Thanks.

@edenhaus
Copy link
Contributor

edenhaus commented Apr 19, 2020

I can also help you. I'm also planning to add OneCall to Home Assistant after it is supported here.

I started to look about the schema of the daily part. The rest of the schema will follow the next days.
The most attributes are the same as from the daily api call. So we can use the Weather Object and extend it. Below the differences of both:

  • speed renamed to wind_speed
  • deg renamed to wind_deg

New attributes:

  • sunrise (already implemented in Weather)
  • sunset (already implemented in Weather)
  • dew_poin
  • wind_gust
  • uvi
  • visibility (already implemented in Weather)

@difelice Can I help you somehow?

@difelice
Copy link
Author

Hi @edenhaus , sorry for the late response.

I haven't started coding, just exploring current code base to have a rough idea and which of current ones can be used a starting point.

Please feel free to work on it if interested.

Thanks.

@edenhaus
Copy link
Contributor

I'm already at a good point and it works already partly. I think until end of next week it will be finished. Hopefully the tests don't take to much time :P

@valepe
Copy link

valepe commented Apr 24, 2020

Is possible with the new api to have the daily min and max temperatures? Until now weather integration shows the max one only.

@edenhaus
Copy link
Contributor

edenhaus commented Apr 24, 2020

Is possible with the new api to have the daily min and max temperatures? Until now weather integration shows the max one only.

All data which is returned by the oneCall can be found in the under https://openweathermap.org/api/one-call-api

@edenhaus
Copy link
Contributor

So the first version is done. I'm not quite happy with the tests, so if some one has an idea to test better, feel free to comment on the pull request or even better implement it directly :)

@csparpa
Copy link
Owner

csparpa commented Apr 26, 2020

@difelice @valepe and anyone else interested: @edenhaus has provided an implementation. I encourage you to test it out, it's on the develop branch

@csparpa csparpa closed this as completed May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants