I'm working on my first Home Assistant fix for a thermostat. I found the issue with a library, and fixed it and then submitted a PR for that github project. It was merged in.
However, I'm a little lost on how I can now add that new library file into a PR for home assistant. My PR will include that library file update and a small cosmetic change to the integration file. I've cloned core and edited the component integration file, but can't seem to find /usr/local/lib/python3.14/site-packages to update that file.
For my PR (still awaiting interest) I added a new library in:
homeassistant/package_constraints.txt
pyproject.toml
requirements.txt
As this was a while ago, I think pyproject.toml is the only one as the other two are then updated by a script...they still become part of the PR though.
Thank you! This was super helpful. OK, I confirmed that the version is updated on pypi and I updated the manifest.json.
However in the pull request, I got an error about running a script to update requirements_all.txt? It tells me to:
Please run python3 -m script.gen_requirements_all (or python3 -m script.hassfest ) and commit the updated requirements_all.txt .
So stupid question, how do I run a script on a PR where I just edited the two files through the web interface? Do I need to pull the whole repository down to my laptop, and then figure out how to run a script, and then push it all back up to github?
You run the script within the dev you have, e.g. I have it on VSC in a terminal, that should generate the new _all and this can then be comitted to the repo...repeating it was a while ago so things may have changed
OK, I'll look to pull down the repo and do this. In the meantime I edited the requirements_all.txt file to reflect the new dependency and added it to the pull request. Which seems to have passed that test.
The last hurdle, the PR is stuck with " required-labels Has at least one of the required labels (breaking-change, bugfix, code-quality, dependency, deprecation, new-feature, new-integration)". However I have no idea how to add in the label. In the label section there is no gear to select or add a 'bugfix' label. Bugfix is checked off in the main PR section, however I don't know how to make this warning go away.