-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
Add basic support for HomeWizard v2 API configuration flow #135414
Open
DCSBL
wants to merge
7
commits into
home-assistant:dev
Choose a base branch
from
DCSBL:homewizard-user-v2-support
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+424
−17
Conversation
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
DCSBL
force-pushed
the
homewizard-user-v2-support
branch
from
January 11, 2025 22:25
9681078
to
d9b37a9
Compare
This was referenced Jan 11, 2025
DCSBL
force-pushed
the
homewizard-user-v2-support
branch
from
January 13, 2025 12:58
daf66e3
to
549b3fc
Compare
DCSBL
commented
Jan 13, 2025
tests/components/homewizard/fixtures/v2/generic/post_user_403_forbidden.json
Outdated
Show resolved
Hide resolved
tests/components/homewizard/fixtures/v2/generic/post_user_401_unauthorized.json
Outdated
Show resolved
Hide resolved
tests/components/homewizard/fixtures/v2/generic/post_user_400_bad_request.json
Outdated
Show resolved
Hide resolved
@@ -65,6 +72,59 @@ def mock_homewizardenergy( | |||
yield client | |||
|
|||
|
|||
@pytest.fixture | |||
def mock_homewizardenergy_v2( |
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.
This feels dirty, if you have ideas/examples how to improve this let me know!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Proposed change
This API allows the user to configure the device via the v2 API. This API is now using a authorization step similar to Hue, where the user has to proof the possession by pressing the button on the device. Therefore the config flow has to be adjusted.
To keep this PR a bit concise, I didn't implement reauthorization, extensive error handling and migration. This will be done in follow-up PR's if that is okay.
Documentation update is WIP.
You can test this with real hardware, ask me via a DM on discord for instructions.
Waits for #135315Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: