-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Add support for Victron bluetooth low energy devices #148043
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
base: dev
Are you sure you want to change the base?
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
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.
Pull Request Overview
Adds a new victron_ble
integration that discovers Victron Energy BLE devices, validates an access token, and exposes their data as Home Assistant sensor entities.
- Introduce BLE config flow to discover devices and prompt for encryption token
- Implement passive BLE sensor platform mapping Victron data keys to HA sensor entities
- Add pytest fixtures and tests for config flow and sensor updates
Reviewed Changes
Copilot reviewed 10 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
homeassistant/components/victron_ble/init.py | Integration setup/unload and coordinator registration |
homeassistant/components/victron_ble/config_flow.py | Bluetooth discovery and access‐token config flow |
homeassistant/components/victron_ble/const.py | Define domain and manufacturer identifier constant |
homeassistant/components/victron_ble/sensor.py | Map parser keys to SensorEntityDescription and entities |
homeassistant/components/victron_ble/quality_scale.yaml | Integration quality metadata |
tests/components/victron_ble/conftest.py | Override async_setup_entry fixture |
tests/components/victron_ble/fixtures.py | BLE service info and expected‐value fixtures |
tests/components/victron_ble/test_config_flow.py | Unit tests for the config flow |
tests/components/victron_ble/test_sensors.py | Unit tests for sensor entity updates |
Files not reviewed (5)
- CODEOWNERS: Language not supported
- homeassistant/components/victron_ble/manifest.json: Language not supported
- homeassistant/components/victron_ble/strings.json: Language not supported
- requirements_all.txt: Language not supported
- requirements_test_all.txt: Language not supported
Comments suppressed due to low confidence (2)
tests/components/victron_ble/fixtures.py:45
- The
VICTRON_DC_DC_CONVERTER_SERVICE_INFO
fixture is defined but never used in tests; either add a corresponding test case (and expected sensors) or remove this unused fixture.
VICTRON_DC_DC_CONVERTER_SERVICE_INFO = BluetoothServiceInfo(
tests/components/victron_ble/test_sensors.py:30
- The parametrized tests cover battery, DC energy meter, solar charger, and VE.Bus but skip the DC/DC converter; add it to ensure full test coverage of all supported device types.
@pytest.mark.parametrize(
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Proposed change
This adds a new integration,
victron_ble
, which allows for monitoring information from a wide range of Victron Energy devices that broadcast "instant readout data" using the bluetooth low energy protocol.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: