Add BleBox integration#32664
Conversation
|
Hi @gadgetmobile, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
fff343e to
346407d
Compare
|
NOTE: Build failures are only due to pylint returning '4' (due to harmless TODO's): (Most TODO's mark missing coverage points, the remainder are improvement suggestions). |
|
Please reduce the PR to a single platform. These kinds of large PR's are hard to review. As per: https://developers.home-assistant.io/docs/creating_component_code_review#5-make-your-pull-request-as-small-as-possible As for the TODO's; In general, it is better to make it trackable, having it in code often ends up being there forever. The rules are enabled for that reason. If you really have the intention to fix those; create a tracking issue after the PR is merged.
https://developers.home-assistant.io/docs/integration_fetching_data/#request-parallelism
Not sure about your question here?
Not sure about your question here. If a connection is needed for device identification, that is possible (Hue & WLED do this as well). It should not block our event loop in those cases.
Those are restored automatically for Lights.
In general, we try to make the most usable data available in separate entities. However, we do recommend to disable less common ones by default. This way a user can enable them if they want. https://developers.home-assistant.io/docs/entity_index#advanced-properties
Logs should be usable and readable for the average user, stack traces are not part of that. Logging more extensively in the debug level is advised.
What is your question here? |
Done. (Only covers + config flow).
I planned to deal with all of them before squashing the commits. I've removed all of them. (Along with pylint comments disabling them). Coverage is also now at 100%. (Though I wish there were standardized ways to test things like
Thanks! I must have missed it. In my case, I understand it's "0" (since every entity defines
All I really need to configure is the IP address (and port, though it's always 80). I'm not sure what other cases to handle, if any. (Like preventing adding and already existing device/ip - which I'm doing already).
I didn't know WLED was a good example, but I seem to be doing exactly the same thing - except for handling the mac address (with
Makes sense, thanks. I'll keep that in mind once more sensors are requested.
Thanks. I'll make sure handle them appropriately (along with proper tests and coverage). Follow up questions:
Thanks again for helping me getting this done right! (I really appreciate it!) |
bdraco
left a comment
There was a problem hiding this comment.
Hi @gadgetmobile Thanks for submitting this integration! Please take a look at my review comments.
bdraco
left a comment
There was a problem hiding this comment.
Hi @gadgetmobile Thanks for working through these. There are a few more things to address.
0bed0bf to
bcdf1d3
Compare
644d0c3 to
548930e
Compare
|
Changes since last review:
I'll double check to make sure I haven't missed anything. Let me know if there's anything else I can correct/improve, thanks! |
|
@gadgetmobile Seems like this is getting close to merge, would you please recheck the docs to make sure they are still accurate. |
Once the review is finished here, I'll be sure have the docs updated (and the PR linked here) before I squash all the above commits. Thanks for all your help and support so far! |
|
@gadgetmobile No need to squash, we do that on merge |
|
I think I've covered (no pun intended) all the suggestions - and I don't have any further ideas what to improve. Feel free to be as picky as you like, so that I'll know how to properly prepare the next PR (after this one). |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Looks good! Some comments.
bdraco
left a comment
There was a problem hiding this comment.
Nice cleanups since the last time I looked this over. @MartinHjelmare Thanks for jumping in.
|
Big thanks to both of you for helping me out so much here! |
|
Looks like one test left to fix |
|
That test started failing for me locally only after a rebase (likely related to #35073 changes). To fix it, I removed that test case (since "cover stop service" wouldn't be available, because stop wouldn't be supported - so it was testing an impossible case). I pushed this without the rebase for clarity. (And all tests now should pass with and without a rebase anyway). I'm expecting CI to succeed now. |
Proposed change
This is a WIP for a complete/quality-oriented integration for BleBox smart home devices.
Features:
NOTE: I first wanted some feedback for the overall approach and testing
strategy - so pick a single platform yet (as a first PR) didn't seem to make
sense. (Let me know if I'm wrong and I can reduce this PR to one platform).
I'd also really appreciate some tips and feedback on:
Also, thank you all for putting so much care and time into making Home
Assistant such a rich and high quality automation platform!
Type of change
Example entry for
configuration.yaml:Additional information
Issues / questions
How should I properly handle ...
async_update- when multiple entities use same device (throttling? via@Throttle?)(Most of the remaining things I was unsure about are marked as TODO's in the code).
Any more tips/guidance to make this a great integration are appreciated.
Checklist
black --fast 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..coveragerc.The integration reached or maintains the following [Integration Quality Scale][quality-scale]: