Skip to content
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 zeroconf discovery support #369

Merged
merged 23 commits into from
Jan 29, 2024
Merged

Conversation

pawlizio
Copy link
Collaborator

@pawlizio pawlizio commented Jan 2, 2024

Add zeroconf discovery support for Velux KLF200 devices on the network.

@pawlizio pawlizio marked this pull request as draft January 2, 2024 02:21
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (4ae18e3) 80.00% compared to head (e4e12be) 79.31%.

Files Patch % Lines
pyvlx/discovery.py 31.37% 35 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #369      +/-   ##
==========================================
- Coverage   80.00%   79.31%   -0.69%     
==========================================
  Files          77       78       +1     
  Lines        3560     3612      +52     
==========================================
+ Hits         2848     2865      +17     
- Misses        712      747      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pawlizio pawlizio marked this pull request as ready for review January 2, 2024 20:23
@pawlizio pawlizio requested review from palfrey and Julius2342 January 2, 2024 20:23
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

@Julius2342
Copy link
Owner

Julius2342 commented Jan 8, 2024

Shouldnt we integrate this discovery in the pyvlx module itself?

something like: pyvlx = PyVLX(zeroconf=True, loop=loop)

@pawlizio
Copy link
Collaborator Author

pawlizio commented Jan 8, 2024

I'm not sure, don't we need a separate pyvlx instances for every KLF200 which we find on the network or are we able to manage them inside one pyvlx instance? My idea for this PR was just to use it on HA side when someone start a manual configuration flow for VELUX in the UI, so that we can use zeroconf to check the network and create a list of identified KLF200 devices on the network. Those flows are used before an instance of pyvlx is created.
Basically HA supports natively a zeroconf flow step as well. I already considered this in my HA core PR 106660 here.

@Julius2342 Julius2342 merged commit 98842bd into Julius2342:master Jan 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants