Thank you for taking the time to contribute! This guide explains how to get set up and what to expect when submitting changes.
- Reporting bugs
- Requesting features
- Development setup
- Running tests
- Submitting a pull request
- Code style
Before opening a bug report, please:
- Check the troubleshooting section in the README
- Search existing issues to avoid duplicates
- Collect your HA logs: Settings → System → Logs — filter by
luxcloud
Then open a Bug Report and fill in the template.
Open a Feature Request describing the use case and what you'd like to see.
- Python 3.12+
- A LuxPower inverter and cloud account (or willingness to mock the API)
# Clone the repo
git clone https://github.com/BeardedTech0o/ha-luxcloud.git
cd ha-luxcloud
# Create a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install test dependencies
pip install -r requirements_test.txtcustom_components/luxcloud/ ← integration source
tests/ ← pytest test suite
.github/ ← CI workflows and issue templates
pytest tests/ -vTo run with coverage:
pytest tests/ --cov=custom_components/luxcloud --cov-report=term-missing# hassfest — checks manifest, strings, and HA conventions
docker run --rm -v "$(pwd)":/github/workspace homeassistant/hassfest
# HACS — checks repo structure for HACS compatibility
docker run --rm -v "$(pwd)":/github/workspace ghcr.io/hacs/action-
Fork the repository and create a branch from
main:git checkout -b feature/my-improvement
-
Make your changes — keep commits focused and atomic
-
Add or update tests for any changed behaviour
-
Run the full test suite and both validators before pushing
-
Update CHANGELOG.md under
[Unreleased] -
Open a PR against the
mainbranch and fill in the pull request template
PRs that break existing tests, fail the validators, or lack a changelog entry will not be merged until those are resolved.
- Follow existing patterns in the codebase
- Use
from __future__ import annotationsin all Python files - Keep functions small and focused
- Add a comment only when the why is non-obvious — avoid restating what the code already says
- Entity descriptions should include
translation_keyso names are translatable - All new entities need a corresponding entry in
strings.json,translations/en.json, andicons.json
Open a Discussion for anything that doesn't fit a bug report or feature request.