Create a custom component from a Home Assistant Integration Pull Request. Use this when you want to test a pull request that changes a built in integration.
Warning: This is experimental and may fail if the Pull Request is for a substantially different version of HA or modifies more than the integration. Do not report bugs to the core authors!
Platform | Description |
---|---|
update |
Enables Updates if the Pull request has changed |
sensor |
Show's the timestamp of the last change to the Pull Request |
switch |
Enable to automatically update to the latest on the next check. |
- Use HACS after adding this
https://github.com/alandtse/pr_custom_component
as a custom repository. Skip to 7. - If no HACS, use the tool of choice to open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledpr_custom_component
. - Download all the files from the
custom_components/pr_custom_component/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant.
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "PR Custom Component"
Using your HA configuration directory (folder) as a starting point you should now also have this:
custom_components/pr_custom_component/translations/en.json
custom_components/pr_custom_component/__init__.py
custom_components/pr_custom_component/api.py
custom_components/pr_custom_component/config_flow.py
custom_components/pr_custom_component/const.py
custom_components/pr_custom_component/manifest.json
custom_components/pr_custom_component/sensor.py
custom_components/pr_custom_component/update.py
custom_components/pr_custom_component/switch.py
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "PR Custom Component".
- Provide the URL of the pull request you want to turn into a custom_component.
For example, this will get a Tesla Pull Request:
https://github.com/home-assistant/core/pull/46558
- After succesful install, you should see the PR Custom Component with title
Tesla
. - Restart Home Assistant to enable the
Tesla
Custom Component to override the default. - Hard refresh your browser to download any changes strings.
- Install
Tesla
Custom Component which has replaced the built in component.
-
When an update is available, it will appear at the top of the Settings tab in Home Assistant. Click the update notification, then click Update to automatically download the latest files from the Pull Request.
You can choose to skip the update, but keep in mind that the component will still be updated automatically when the integration is reloaded or Home Assistant is restarted.
-
Restart Home Assistant.
This uses Tesla as an example.
- In the HA UI go to "Configuration" -> "Integrations", select the
Tesla
Component's...
menu and delete. This will uninstall the configuredTesla
custom component from the HA instance. - Select the PR Custom Component with title
Tesla
Component's...
menu and delete. This will delete custom files and restore the default). - Restart Home Assistant.
- Hard refresh your browser
If you want to contribute to this please read the Contribution guidelines
The logo is a modified Pull request icon under MIT.
Component built with integration_blueprint.