-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Migrate OpenWeaterMap to new library (support API 3.0) #116305
Closed
Closed
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
98fe0c3
Migrate integration to new library
freekode 32bf27b
migrate to new forecast
freekode f159db5
migrate forecasts responses
freekode 5d57a06
fix test
freekode ca76d2b
upd dependency
freekode 9532399
return forecast sensors
freekode 1646b18
fix forecast cloud sernsor
freekode 9f7435a
remove commented
freekode 3939fdb
move out from try
freekode 3486b7f
Update homeassistant/components/openweathermap/weather_update_coordin…
freekode 668e631
move out from try
freekode d45b0d3
fix tests, remove migration
freekode 7da62db
remove timeout
freekode 711931a
add fixtures
freekode 6c35f80
style fixes
freekode ae546d7
add abort test
freekode eb9e61e
upd tests
freekode 7babe60
Merge branch 'dev' into owm-upgrade
freekode e933bb3
Merge branch 'dev' into owm-upgrade
freekode 074276d
add description placeholder
freekode 5d3c648
upd lib version
freekode 57cae47
Merge branch 'dev' into owm-upgrade
freekode 29b517e
add error description
06925bf
v2.5 support
freekode 8f2ee6b
Merge branch 'dev' into owm-upgrade
freekode 6c9de77
Merge branch 'dev' into owm-upgrade
freekode 6433137
v2.5 support
freekode 7ea62cd
fix strings
freekode 8634bc8
fix strings
freekode 13848d8
Merge branch 'dev' into owm-upgrade
freekode File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Issues for OpenWeatherMap.""" | ||
|
||
from homeassistant.core import HomeAssistant | ||
from homeassistant.helpers import issue_registry as ir | ||
|
||
from .const import DOMAIN | ||
|
||
|
||
def create_issue(hass: HomeAssistant): | ||
"""Create issue for V2.5 deprecation.""" | ||
ir.async_create_issue( | ||
hass=hass, | ||
domain=DOMAIN, | ||
issue_id="deprecated_v25", | ||
is_fixable=False, | ||
is_persistent=True, | ||
severity=ir.IssueSeverity.WARNING, | ||
learn_more_url="https://openweathermap.org/one-call-transfer", | ||
translation_key="deprecated_v25", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should detect that they don't have the v3 api on their account and create an issue in the issue registry telling them what to do.
https://developers.home-assistant.io/docs/core/platform/repairs?_highlight=issue#creating-an-issue
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.
i see
i think i can add support of api v2.5 in the lib, then add a select in HA where you choose which api to use. Then add repair notification to move from 2.5 to 3.0. Although I can't detect is user has subscription or not.
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.
Sounds good. It should be a config entry option
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.
ok, i added support v2.5
added migration, all users will be migrated to onecall v2.5
updated config flow, you can choose between v2.5 and v3.0 (default)
if you choose 2.5, during init repair issue will be created
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.
sorry about mess with commit author emails, i will recreate pr later when everything will be done
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.
new keys (or rather new accounts) don't work with v2.5 already
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.
continue here #116870