Fix auth error on BRP069 when API key is provided#131
Open
fredrike wants to merge 3 commits into
Open
Conversation
Extract the BRP072C key-auth fallback logic into a static _try_brp072c() method. Narrow the broad 'except Exception' to specific types (DaikinException, aiohttp.ClientError, TimeoutError, OSError). Add import aiohttp. Add test_factory_brp072c_success to cover the happy path.
fredrike
marked this pull request as ready for review
July 14, 2026 12:02
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #131 +/- ##
==========================================
- Coverage 84.14% 84.07% -0.07%
==========================================
Files 12 12
Lines 1198 1212 +14
==========================================
+ Hits 1008 1019 +11
- Misses 190 193 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
Author
|
@valerioformato can you please test this version so we can add it to HomeAssistant? |
Gladly, but it might have to wait for next week since I'm traveling right now. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Some BRP069 units also use keys to auth.
If treated as a BRP072 we won't be able to connect, since this will force https on a unit that expects
connection to port 80. We do a preliminary attempt at initialization to catch connection errors and then
fallback to the following cases.
Type of Change
Testing
Code Quality
pre-commit run --all-files)String Formatting (New Code)
") for strings following Python conventionsDocumentation
Related Issues
Closes #
Additional Notes