Thank you for considering contributing to the Home Assistant Solarfocus Custom Component. Before you get started, please read through this guide to ensure that your contributions can be accepted as quickly and easily as possible.There are several ways to contribute to this integration. Depending on your skill it could be beta testing, documenting, adding new registers, adding new functions.
If you encounter any problems with the Home Assistant Solarfocus Custom Component, please create a GitHub Issue in the project's repository. When creating an issue, please provide as much detail as possible, including:
- A clear and descriptive title
- A detailed description of the issue
- Steps to reproduce the issue
- Any relevant error messages or log output
- Your Home Assistant and Solarfocus integration and firmware versions
If you're interested in contributing code to the Home Assistant Solarfocus Custom Component, please follow these steps:
- Fork the project's repository.
- Create a new branch for your changes.
- Make your changes in the new branch.
- Verify your changes (see Testing section)
- Submit a pull request.
Please ensure that your code adheres to the following guidelines:
- Ensure that your code is well-documented.
- Avoid breaking changes whenever possible.
- Keep your pull request small and focused on a single issue or feature.
To make development easier and more consistent across contributors, we recommend using the devcontainer setup provided by Home Assistant. This allows you to run Home Assistant Core in a Docker container and use Visual Studio Code as your development environment. For more information, please see the Home Assistant Development Environment documentation.
- copy
custom_components/solarfocus
folder tocore/config/
directory. - once testing is done, make sure to copy the changes back to the git repository.
Copy your changes manually (see README.md -> Installation) to your home assistant instance for testing (you can use the Home Assistant Visual Studio Code Add-on)
- this method has the drawback, that you might modify something directly on your Home Assistant instance and forget to copy the change to your local repository.
- for testing you can also install the modified integration from
https://github.com/YOURNAME/home-assistant-solarfocus
-
hacs.json: name, version definition for the hacs integration (see HACS Integrations), modify if you plan to install the integration from your fork, don't use this branch to make a pull request to the original repository.
-
custom_components/solafocus/manifest.json: if you go deeper into the development you might need to update the used pysolarfocus python package. To test you can modifiy the requirements to used your own version: e.g.,
"requirements": ["git+https://github.com/lein1013/pysolarfocus.git@develop#pysolarfocus==3.4.2", "pymodbus==3.1.2"],
-
strings.json: relevant for enums and translation (see the related translations folder). Keep consistent. Some guides:
- First letter is capital
- do the changes also in the tranlations files (en,de.json)
- HACS Development
- Home Assistant Developer Docs
- Home Assistant Integration File Structure
- Home Assistant Developer Environment
- Home Assistant Translation
We are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, religion, or other personal characteristics. By participating in this project, you agree to abide by our Code of Conduct.
By contributing to the Home Assistant SolarFocus Custom Component, you agree that your contributions will be licensed under the project's Apache-2.0 License.