How patman15/bms_ble-ha works
BMS_BLE is a Home Assistant integration that discovers compatible BLE battery systems, initializes a device-specific aiobmsble implementation, periodically collects battery data, and exposes it as Home Assistant entities. The main user workflow is automatic Bluetooth discovery and configuration, followed by live readings through sensor and binary-sensor platforms; diagnostics provide a separate troubleshooting view. The coordinator is the central runtime layer between the BMS device and entity platforms. Edges reflect shown calls or documented capabilities; the aiobmsble library internals and unsampled platform wiring are not represented.
Main entry points: __init__.py Entry setup · coordinator.py BMS coordinator · config_flow.py Device configuration · sensor.py Battery sensors
Components 12
Discovery and setup
- Device configuration
custom_components/bms_ble/config_flow.py - Entry setup
custom_components/bms_ble/__init__.py - Integration constants
custom_components/bms_ble/const.py
BLE data runtime
- BLE battery BMS
- BMS coordinator
custom_components/bms_ble/coordinator.py - aiobmsble device driver
- Home Assistant Bluetooth
Home Assistant entities
- Battery sensors
custom_components/bms_ble/sensor.py - Status sensors
custom_components/bms_ble/binary_sensor.py - Home Assistant entities
Diagnostics and metadata
- Diagnostic snapshot
custom_components/bms_ble/diagnostics.py
Other components
- Home Assistant user
Connections 17
- Home Assistant user → Device configuration: configures device
README.md - Device configuration → Home Assistant Bluetooth: scans advertisements
custom_components/bms_ble/config_flow.py - Device configuration → BLE battery BMS: identifies compatible BMS
custom_components/bms_ble/config_flow.py - Entry setup → Home Assistant Bluetooth: resolves device
custom_components/bms_ble/__init__.py - Entry setup → aiobmsble device driver: loads device driver
custom_components/bms_ble/__init__.py - Entry setup → BMS coordinator: creates and refreshes
custom_components/bms_ble/__init__.py - BMS coordinator → aiobmsble device driver: requests device updates
custom_components/bms_ble/coordinator.py - aiobmsble device driver → BLE battery BMS: communicates over BLE
- Entry setup → Battery sensors: forwards platform setup
custom_components/bms_ble/__init__.py - Entry setup → Status sensors: forwards platform setup
custom_components/bms_ble/__init__.py - Battery sensors → BMS coordinator: reads battery data
custom_components/bms_ble/sensor.py - Status sensors → BMS coordinator: reads status data
custom_components/bms_ble/binary_sensor.py - Battery sensors → Home Assistant entities: exposes readings
- Status sensors → Home Assistant entities: exposes statuses
- Diagnostic snapshot → BMS coordinator: reads runtime state
custom_components/bms_ble/diagnostics.py - Diagnostic snapshot → Home Assistant Bluetooth: reads adapter details
custom_components/bms_ble/diagnostics.py - Integration constants → Entry setup: supplies configuration
custom_components/bms_ble/__init__.py