https://github.com/redpomodoro/byd_battery_box
Home assistant Custom Component for reading data from BYD Battery Box. This integration uses a local modbus connection.
https://github.com/redpomodoro/byd_battery_box
byd-battery home-assistant home-assistant-component home-assistant-integration
Last synced: 4 months ago
JSON representation
Home assistant Custom Component for reading data from BYD Battery Box. This integration uses a local modbus connection.
- Host: GitHub
- URL: https://github.com/redpomodoro/byd_battery_box
- Owner: redpomodoro
- License: apache-2.0
- Created: 2024-12-23T12:19:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-31T18:05:09.000Z (5 months ago)
- Last Synced: 2024-12-31T18:29:43.481Z (5 months ago)
- Topics: byd-battery, home-assistant, home-assistant-component, home-assistant-integration
- Language: Python
- Homepage:
- Size: 633 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/custom-components/hacs)
# byd_battery_box
Home assistant Custom Component for reading data from BYD Battery Box. This integration uses a local modbus connection.> [!CAUTION]
> This is a work in progress project - it is still in early development stage, so there are still breaking changes possible.
>
> This is an unofficial implementation and not supported by BYD. It might stop working at any point in time.
> You are using this module (and it's prerequisites/dependencies) at your own risk. Not me neither any of contributors to this or any prerequired/dependency project are responsible for damage in any kind caused by this project or any of its prerequsites/dependencies.# Installation
Copy contents of custom_components folder to your home-assistant config/custom_components folder or install through HACS.
After reboot of Home-Assistant, this integration can be configured through the integration setup UI.> [!CAUTION]
> Note using other applications connecting to battery simulatousnely might give unexpected results.# Usage
### Battery Management Unit
### Sensors
| Entity | Description |
| --- | --- |### Diagnostic
| Entity | Description |
| --- | --- |
To come!### Battery Management System
### Sensors
| Entity | Description |
| --- | --- |### Diagnostic
| Entity | Description |
| --- | --- |
To come!### Markdown Cards

Voltages Table
```
type: markdown
style: |
ha-card {
width: 100%;
}
content: >
{% set modules =
state_attr('sensor.bms_1_cells_average_voltage','cell_voltages')%} | |{% for i
in range(1,17) %}Cell {{i}}|{%- endfor %}|:---|{% for i in range(1,17) %}---:|{% endfor %}
{% for m in modules %}{% set cells = m['v'] %}|Module {{ m['m'] }}|{% for v
in cells %}{{ v }}|{%- endfor %}
{% endfor %}
title: Module Voltages in mV
grid_options:
columns: full
rows: auto
```Temperatures Table
```
type: markdown
content: >
{% set modules =
state_attr('sensor.bms_1_cells_average_temperature','cell_temps')%}| |{% for i in range(1,9) %}Cell {{i*2-1}}-{{i*2}}|{%- endfor %}
|:---|{% for i in range(1,9) %}---:|{% endfor %}
{% for m in modules %}{% set cells = m['t'] %}|Module {{ m['m'] }}|{% for v
in cells %}{{ v }}|{%- endfor %}
{% endfor %}
title: Module Temperatures in °C
grid_options:
columns: full
rows: auto
```# Example Devices

# References
https://github.com/sarnau/BYD-Battery-Box-Infos/blob/main/Read_Modbus.py
https://github.com/christianh17/ioBroker.bydhvs/blob/master/docs/byd-hexstructure.md
https://github.com/smarthomeNG/plugins/tree/develop/byd_bat