Fixes an issue with OpenUV config import failing#17831
Fixes an issue with OpenUV config import failing#17831bachya merged 4 commits intohome-assistant:devfrom
Conversation
|
@MartinHjelmare Would love your eyes on this given our conversation on the last one. Having the defaults as part of the config entry schema didn't cover a case, which caused this issue. Thoughts on my suggested route forward? |
| return await self._show_form({CONF_API_KEY: 'invalid_api_key'}) | ||
|
|
||
| if user_input.get(CONF_LATITUDE): | ||
| user_input[CONF_LATITUDE] = user_input[CONF_LATITUDE] |
There was a problem hiding this comment.
I don't understand this.
| CONF_SCAN_INTERVAL: conf[CONF_SCAN_INTERVAL], | ||
| } | ||
|
|
||
| if conf.get(CONF_LATITUDE): |
There was a problem hiding this comment.
if CONF_LATITUDE in conf:
houndci-bot
left a comment
There was a problem hiding this comment.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last):
File "/home/linters/.local/bin/flake8", line 7, in
from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
houndci-bot
left a comment
There was a problem hiding this comment.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last):
File "/home/linters/.local/bin/flake8", line 7, in
from flake8.main.cli import main
ModuleNotFoundError: No module named 'flake8'
|
I've addressed your comments, waiting for tests to pass. |
|
@MartinHjelmare See #17830 for what the issue was. @balloob Thanks for the assistance. Since tests are passing, I'm going to get this off our plate. |
|
It doesn't explain why the defaults in the form didn't work. Do you know? |
|
The defaults didn’t work when you were importing configuration from |
|
Thanks! I see it now. |
* Fixes an issue with OpenUV config import failing * Update * Update __init__.py * Update config_flow.py
|
I'm confused. My openuv configuration was working prior to 0.81.0/.1 as expected. |
|
@exxamalte solved PRs are not the place for this. |
Description:
Fixes an issue where OpenUV would fail in 0.81 when it was defined in
configuration.yamlwithout specific latitude/longitude/elevation (i.e., relying on the default HASS latitude/longitude/elevation):configuration.yaml.In addition to fixing the bug, this PR makes it so that the latitude/longitude/elevation aren't stored in the config entry unless they are explicitly provided; if the HASS latitude/longitude/elevation ever changes, users shouldn't have to reconfigure this flow.
Until this is pushed out, the issue can be fixed by deleting and re-creating the OpenUV config entry (note that this will have to occur each time HASS restarts). @balloob Given this, would love to have this fix in 0.81.1.
Breaking Change: It's possible that users of OpenUV may have to delete and recreate the config entry.
Related issue (if applicable): fixes #17830
Pull request in home-assistant.io with documentation (if applicable): N/A
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests pass