How to install dependencies for custom components in a production environment?

What is the recommended way to install dependencies for custom components in a production environment?

I’m extending the functionality of an existing integration component with an ambition to contribute the adaptations to the community once I’ve verified the changes. It works in my development environment, but I’m having trouble updating the depending PyPi modules in my production environment.

What I’ve done:

  • I’ve cloned the home assistant core repository and modified one of the official components (growatt_server) in my GitHub repo.
  • I’ve also modified the underlying PyPi (GrowattServer 1.5.0) python package also in a seperate cloned GitHub repo.
  • I’ve updated version+requirements of growatt_server manifest.json to point at my GitHub repo instead of the PyPi (1.5.0) version:
{
  "domain": "growatt_server",
  "name": "Growatt",
  "codeowners": [],
  "config_flow": true,
  "documentation": "https://www.home-assistant.io/integrations/growatt_server",
  "iot_class": "cloud_polling",
  "loggers": ["growattServer"],
  "version": "1.6.0",
  "requirements": ["growattServer @ git+https://github.com/johanzander/PyPi_GrowattServer.git@master"]
}

This works in my HA core docker development environment container.

How can I deploy this to a production environment including the dependency to my modified PyPi_GrowattServer?
The normal way to install a custom component seem to be to just copy the component into the custom_component folder.
This part works, it overrides the standard integration, but my updated growattServer from my GitHub is not fetched. There seemed to be a way by putting packages in a dept folder, but this seems deprecated.

Please advise on how to get this working.

got same question, am testing a change for AMP which works in docker HA core, but seems like it does not get picked up in my main HA supervised :smiling_face_with_tear:
i tried following these steps, but restarting HA does not seem to do the job

one thing I noticed is that the server restart alone does not guarantee for the manifest deps to be refreshed,
if I recompile the docker container all dep files disappear and everything gets reinstalled and downloaded anew, at that point branch files are downloaded correctly,
would like to do the same thing with supervised instance

@Johan_Zander after playing a bit with the supervisor help commands, this should rebuild the container running the core and reinstall everything

core rebuild

also these steps by @Figorr to log into the core container will allow you even more freedom to run anything in the container context: