Switch velbus from python-velbus to velbusaio#54032
Switch velbus from python-velbus to velbusaio#54032MartinHjelmare merged 35 commits intohome-assistant:devfrom
Conversation
|
Hey there @brefra, mind taking a look at this pull request as it has been labeled with an integration ( |
|
That's Looks great! |
i'm sure there will be items that ar not correctly working yet, thats why its a WIP pull request :) |
|
THIS PR is now ready, can someone have a look at give some suggestions on how to improve it? |
|
Please add a link to the new library on github in the PR description. |
|
Link added, the only thing that needs to be done is the service change. |
|
@MartinHjelmare any idea why the python 3.9 runs fail and the other runs pass? |
|
Both 3.8 and 3.9 tails on |
Thanks, looked at the results wrongly. Fixed in the meantime .... |
|
Converting to draft because @brefra fond some potential problems with the new lib and we want to investigate before merging |
|
@MartinHjelmare one point that i'm not sure about:
|
What is taking a long time, do you know? |
The actually reading of the bus. To read all the module data we need to scan the bus and send a lot of messages to the bus. Depending on the number of modules this can take a long time. For example in my install this takes 5 minute. |
|
We could create a non tracked asyncio task that finishes the connect and discovery and have a callback that forwards the entry to the platforms on demand and adds the discovered devices as entities. We could wrap the controller connect method inside a coroutine function that triggers the callback when the connect and discovery is done. Something like zwave_js does: core/homeassistant/components/zwave_js/__init__.py Lines 163 to 173 in 6218cd6 The last part with the dispatch helper signal is only needed if we need to add entities dynamically, ie more than once. |
|
Are we ready for a final review? The PR is still draft. |
I'm waiting for @brefra to releas one new version of the lib, and then i need to bump the version here. But thats it nothing else will change |
|
@MartinHjelmare by when does this need to be merged to be included in the 2021.10 release? |
|
The beta cut is September 29. You can see the dev calendar here: |
Co-authored-by: brefra <frank_van_breugel@hotmail.com>
|
@MartinHjelmare everything is ready |
|
Please add a sentence about the deprecation of configuration.yaml section, in the PR description breaking change paragraph. |
|
Please add a link to a docs PR where we document the change to the services. |
Done |
Breaking change
interfaceparameter, to allow support for multiple velbus connections.Proposed change
Switch the velbus component from python-velbus to velbusaio lib. Both modules are compatible and support the same features. velbusaio is just an asyncio implementation for python-velbus.
https://github.com/Cereal2nd/velbus-aio
The velbusaio lib has has the following advantages
Additional information
Type of change
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]:
To help with the load of incoming pull requests: