Manifest.json => how to load a specific commit?

Hi, when loading custom components, there is a requirements section in the manifest.json file where you can install packages…

But i am testing something and I what to load a specific commit posted on GitHub… How can i link to that specific commit ? So that one will be installed?

Thnx

You download that commits files and use that as the custom component. There is no simple way to just specify a commit in manifest.json.

hi, no its not the custom component itself, its a requirement that i want to customize

for example :

{
  "domain": "velux",
  "name": "Velux",
  "documentation": "https://www.home-assistant.io/integrations/velux",
  "requirements": ["pyvlx==0.2.18"],
  "codeowners": ["@Julius2342"],
  "version": "2021.1.1"  
}

you see a requirement pyvlx== … , i want to load here another version, a specific commit

ps: i am using HassOS, so its not easy to just overwrite other files

You can’t if it’s not built in a release

Ok clear, then i need to wait

Thnx for feedback

You may be able to do it with syntax like this (“Direct references” section). Or you can manually pull the commit into the HA container (assuming you’re running container, supervised, or HA OS) or your venv, but that requires a bit more experience.

I used similar syntax to pull a requirement from my repo before I published to PyPi:

"requirements": ["lmdirect @ git+https://github.com/rccoleman/lmdirect.git"],

1 Like

Aha, gonna try it this week, thnx for sharing this info!!

hi @rccoleman

one more question
how to retrieve that specific .git url?
i want to install this specific branch : GitHub - mago0211/pyvlx at add_limitations

so if i use : https://github.com/mago0211/pyvlx.git , it will install the master tag, and not that specific “add limitations” branch/tag ?

Based this example from the link above:

pip @ git+https://github.com/pypa/[email protected]#7921be1537eac1e97bc40179a57f0349c2aee67d

And this bit from the preceding paragraph:

To handle version control systems that do not support including commit or tag references directly in the URL, that information may be appended to the end of the URL using the @ or the @# notation.

I would use

pyvlx @ git+https://github.com/mago0211/pyvlx.git@add_limitations

But you’ll probably just need to play with it until you get what you want.

Ok, gonna try it

Thnx again!!