This custom integration allows you to monitor and interact with your BYD HVS Battery system through Home Assistant. It provides real-time data on battery status, cell voltages, temperatures, and more.
Download the Integration: Clone or download the contents of this repository.
Copy to Custom Components: Copy the byd_hvs
directory into the custom_components
directory of your Home Assistant installation:
custom_components/
└── byd_hvs/
├── __init__.py
├── bydhvs.py
├── config_flow.py
├── const.py
├── manifest.json
├── sensor.py
└── translations/
├── de.json
└── en.json
Restart Home Assistant: Restart Home Assistant to recognize the new integration.
Install HACS: If you haven't already, install the Home Assistant Community Store (HACS).
Add Custom Repository:
In the Home Assistant UI, navigate to HACS. Click on the Integrations tab. Click the three dots in the top right corner and select Custom repositories. Add the URL of this repository and select Integration as the category. Install the Integration:
Search for BYD HVS Battery in HACS. Click Install to add the integration. Restart Home Assistant: Restart your Home Assistant instance.
Add Integration:
In the Home Assistant UI, navigate to Settings > Devices & Services. Click Add Integration. Search for BYD HVS Battery and select it. Enter Connection Details:
IP Address: Enter the IP address of your BYD HVS Battery system. Port: Default is 8080. Change if your system uses a different port. Scan Interval: Set the polling interval in seconds (minimum 10 seconds). Complete Setup:
Click Submit to complete the setup. If the connection is successful, the integration will be added, and the sensors will be available.
You can adjust the scan interval after setup:
Access Options:
Go to Settings > Devices & Services. Find the BYD HVS Battery integration and click Configure. Adjust Scan Interval:
Enter a new value for the scan interval (minimum 10 seconds). Click Submit to save the changes.
The integration provides the following sensors:
Update Configuration:
Add the following to your configuration.yaml:
yaml Code kopieren logger: default: warning logs: custom_components.byd_hvs: debug Restart Home Assistant: Restart your instance to apply the changes.
Check Logs: Review detailed logs in the Home Assistant log file.
Contributions are welcome! Please follow these steps:
Fork the Repository: Create your own fork of the repository.
Create a Branch: Create a new branch for your changes.
bash Code kopieren git checkout -b feature/your-feature Make Changes: Implement your feature or bug fix.
Run Linters and Tests: Ensure code quality by running linter tools.
bash Code kopieren
ruff check .
pylint custom_components/byd_hvs
Commit Changes: Commit your changes with a descriptive message.
git commit -m "Added feature: Description of your feature"
Push to GitHub:
git push origin feature/your-feature
Create a Pull Request: Submit a pull request to the main repository.
This project is licensed under the MIT License. See the LICENSE file for details.