PR Custom Component to generate custom components from HA PRs

I just released a new custom component that will allow you to pull a pending Pull Request as a custom component which will override a core integration (until you uninstall the relevant PR Custom Component entry).

I created it because I had a pending Tesla PR that needs testers and given that some integrations have PRs that are delayed because of the backlog.

The easiest way is to add it as a custom repository in HACS.

As soon as I figure out some branding it’ll end up in the default HACS repo.

Do not report bugs to the core maintainers!

Any installation issues with a PR should be reported to me. Any issues with a tested PR should go to the PR submitter (Check the Issues link in Configuration -> Info).

If you receive a rate limited error, install and configure HACS. I am currently borrowing the HACS GitHub auth token to avoid having to recreate it ever time you install a PR component.

Images below of what you’ll see:
After installing a PR Custom Component (in this case Tesla)

After rebooting and hard refreshing browser and trying to install the replacement component)

8 Likes

This is a creative solution to this problem, nice!

If you downloaded this, please update to 0.1.3 immediately to avoid potential data loss in your custom_components directory.

EDIT: This could happen if after install of a custom pr, the component failed to get an update from GitHub. When this happened, it would set the name of the custom component to blank which would end up with the delete path as /config/custom_components instead of /config/custom_components/PR generated component. If you hadn’t installed any custom PRs, then you wouldn’t run into this.

You need to hard refresh your browser cache after the reboot and it should appear.

However, it appears the integration does not have a translations directory yet so you can’t see any strings.

The issue is if you copy the strings.json to vorkwerk/translations/en.json you get the behavior your mentioned. I’ll need to figure out if HA allows custom components to use the common strings.

EDIT: Actually it’s there after creating the translations/en.json. It’s just named differently (not sure why though):


Common strings are broken though.

Version 0.2.0 will now create the minimal translation for English. However, if they use a common key, it will not be translated because custom components cannot get the custom keys. For example, for the below the last entry in the string (e.g., email) should explain what is needed.

Hi,
I tried to install your Custom components but can’t get it to work. I’m receiving a bad PR notice (even on Tesla PR).
I’m on
PR : 0.20
HA on docker : 20220707.0 - latest