-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Support for Victron BLE devices #128843
Support for Victron BLE devices #128843
Conversation
victron_ble remove unnecessary strings.json victron_ble tests refactor and additions Test and typing improvements Test and typing improvements Additional tests Additional tests Handle malformed advertisement victron_ble Bluetooth discovery for victron_ble do not cache victron_ble parser config flow improvements Add strings for config flow Add strings for config flow Improved config flow strings Improved config flow strings More config flow improvements More config flow improvements Fix description placeholders Fix description placeholders Enable rediscovery of removed devices Filter out non-instant read advertisements Logging improvements Use custom sensor-state-data rather than modifying upstream dependency Bump victron-ble dependency to 0.6.0 Bump victron-ble dependency to 0.6.0 Revert new device class Properly handle no current_flow in HA device classes Implement suggestions from code review Implement suggestions from code review Move VictronBluetoothDeviceData to separate library Fix stale reference to victron-ble Fix stale reference to victron-ble Rerun CI with dependency available Fix name of discovered victron_ble device Bump victron-ble-ha-parser version Bump victron-ble-ha-parser version Fix name of title variable for victron-ble config flow Bump victron-ble-ha-parser for bug fix Bump victron-ble-ha-parser for bug fix Complete DC-DC converter support for victron-ble Add sensor descriptions for smart battery protect Add sensor descriptions for individual cells Fix sensor descriptions for individual cells Retrieve cell key properly Types Types
Regarding the license check for victron-ble library - it is covered by the "unlicense" https://unlicense.org/ which puts the code in the public domain. |
assert address is not None | ||
key = entry.data[CONF_ACCESS_TOKEN] | ||
data = VictronBluetoothDeviceData(key) | ||
coordinator = hass.data.setdefault(DOMAIN, {})[entry.entry_id] = ( |
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.
Can we use entry.runtime_data
to store this data? We can then extend the typing of ConfigEntry
to also make that typesafe
"""Test discovery via bluetooth with a valid device.""" | ||
result = await hass.config_entries.flow.async_init( | ||
DOMAIN, | ||
context={"source": config_entries.SOURCE_BLUETOOTH}, |
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.
context={"source": config_entries.SOURCE_BLUETOOTH}, | |
context={"source": SOURCE_BLUETOOTH}, |
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.
Happy to do it this way, but I also had to add from homeassistant.config_entries import SOURCE_BLUETOOTH
to the imports despite already having import homeassistant.config_entries
. Is this a style thing?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
They should provide in the metadata of their library that they use the uni license, there's a trove classifier for that |
Thanks, I'll open a PR |
For tracking purposes, here is the link to the PR to reflect the victron-ble license on pypi. keshavdv/victron-ble#65 |
I've marked this PR a draft, as we are awaiting an upstreaming licensing fix. Thanks! 👍 ../Frenck |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Proposed change
This adds support for Victron bluetooth low energy sensors, which provide information about various Victron devices including solar controllers, inverters, and lithium batteries.
Type 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: