#Automatic update of requirements for an integration

1 messages · Page 1 of 1 (latest)

digital shale
#

Hello all,

I would like to get your opinion on automatic update of requirements in the manifest.json file of an integration. The integration has a requirement which is released frequently enough. It is critical to make sure the latest release version of the requirement is used in the integration.

I learned that instead of hardcoding release version of the external library in the requirements array of manifest.json you could point to the release branch or release tag instead. I have not figured out out how to point to latest release tag yet without hardcode version. However I could point to the release branch. The outcome would be that at the Home Assistant startup, the integration will download the HEAD of the release branch of the Git repository of external library required by the integration

https://developers.home-assistant.io/docs/creating_integration_manifest/#requirements
https://pip.pypa.io/en/stable/topics/vcs-support/#supported-vcs

The requirements line in the manifest.json file would be:

"requirements": ["yt-dlp@ git+https://github.com/yt-dlp/yt-dlp.git@release"]

instead of

"requirements": ["yt-dlp[default]==2025.12.08"]

In my understanding, this would mean that whenever there will be a newer release on the Git repository yt-dlp/yt-dlp.git in release branch, then a reload of Home Assistant core would pull the HEAD of the release branch and ensure the latest version of yt-dlp would be used in Home Assistant integration which has yt-dlp in the requirements line of manifest.json file

Thanks for time for looking into this!

Every integration has a manifest file to specify its basic information. This file is stored as manifest.json in your integration directory. It is required to add such a file.

pearl sundial
#

This is a question for the dev channels. Please go to Channels & Roles and select Development to auto assign the role and enable the channels

wintry ocean
#

are you the one who updates it regularly?

#

We are slowly looking into using renovate, I don't know when that will land

#

But then it would be automated, but you'd still be attached to the release calendar

digital shale
wintry ocean
#

thanks in any case 🙂

digital shale
#

But this is tight to the release schedule of HA which is very inconvenient and I got big complaints from my toddler son (10 months old) and my wife 🙂 cause they can’t play any more YouTube links on Chromecast Audio multi room setup at home

#

So looking for automatic manner of update the requirement field of manifest.json to be compliant with main stakeholders at home 🙂

wintry ocean
#

yea understandable

#

I mean you could run it with master as branch locally

#

as custom component

digital shale
#

Could you please suggest how do I do that?

digital shale
wintry ocean
wintry ocean
#

But that'd be nice

wild elm
#

You can create a repository that runs Renovate for home-assistant/core through GitHub Actions on every X hours. You can configure Renovate to only update some specific dependency, and you can also configure Renovate to push the update PRs for both dev and main.

wintry ocean
#

We actually spoke to Mend in SF and they're going to take a look

wild elm
#

It can be done through a custom regex manager (it's really simple).

But a dedicated manager could also be introduced to Renovate core.

Even if HA core won't use it, it will still be useful for custom integrations who want to keep their manifests fresh.

dense mantle
#

is this automatic updating not something we should stay away from in view of the npm-package attacks lately