https://github.com/alandtse/pr_custom_component
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.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Keywords
Repository
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.
Basic Info
Statistics
- Stars: 11
- Watchers: 3
- Forks: 5
- Open Issues: 5
- Releases: 8
Topics
Metadata Files
README.md
PR Custom Component
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. |
Installation
- Use HACS after adding this
https://github.com/alandtse/pr_custom_componentas 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_componentsdirectory (folder) there, you need to create it. - In the
custom_componentsdirectory (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:
text
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
Installing an Auto Generated Custom Component
- 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
TeslaCustom Component to override the default. - Hard refresh your browser to download any changes strings.
- Install
TeslaCustom Component which has replaced the built in component.
Upgrading an Auto Generated Custom 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.
Uninstalling an Auto Generated Custom Component
This uses Tesla as an example.
- In the HA UI go to "Configuration" -> "Integrations", select the
TeslaComponent's...menu and delete. This will uninstall the configuredTeslacustom component from the HA instance. - Select the PR Custom Component with title
TeslaComponent's...menu and delete. This will delete custom files and restore the default). - Restart Home Assistant.
- Hard refresh your browser
Contributions are welcome!
If you want to contribute to this please read the Contribution guidelines
Logo
The logo is a modified Pull request icon under MIT.
Component built with integration_blueprint.
Owner
- Name: Alan Tse
- Login: alandtse
- Kind: user
- Website: https://www.buymeacoffee.com/alandtse
- Repositories: 29
- Profile: https://github.com/alandtse
GitHub Events
Total
- Create event: 1
- Issues event: 2
- Release event: 1
- Watch event: 1
- Issue comment event: 5
- Push event: 13
- Pull request review comment event: 2
- Pull request review event: 3
- Pull request event: 11
- Fork event: 1
Last Year
- Create event: 1
- Issues event: 2
- Release event: 1
- Watch event: 1
- Issue comment event: 5
- Push event: 13
- Pull request review comment event: 2
- Pull request review event: 3
- Pull request event: 11
- Fork event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 8
- Total pull requests: 22
- Average time to close issues: 6 months
- Average time to close pull requests: 1 day
- Total issue authors: 4
- Total pull request authors: 4
- Average comments per issue: 0.38
- Average comments per pull request: 0.82
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 5
Past Year
- Issues: 1
- Pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: 5 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 1.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- alandtse (5)
- andyblac (1)
- Lesekater (1)
- enricobattocchi (1)
Pull Request Authors
- alandtse (12)
- dependabot[bot] (5)
- Lesekater (3)
- andyblac (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- 112 dependencies
- bandit ^1.7.0 develop
- black ^20.8b1 develop
- homeassistant ^2021.3.4 develop
- mypy ^0.812 develop
- pre-commit ^2.11.1 develop
- prospector ^1.3.1 develop
- pydocstyle ^6.0.0 develop
- pytest-homeassistant-custom-component 0.1.0 develop
- aiofiles ^0.6.0
- aiohttp ^3.7.4
- async-timeout ^3.0.1
- python ^3.8
- voluptuous ^0.12.1
- yarl ^1.6.3
- actions/checkout v2 composite
- github/codeql-action/analyze v1 composite
- github/codeql-action/autobuild v1 composite
- github/codeql-action/init v1 composite
- actions/checkout v2 composite
- hacs/action main composite
- home-assistant/actions/hassfest master composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- hacs/action main composite
- home-assistant/actions/hassfest master composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- hacs/action main composite
- home-assistant/actions/hassfest master composite
- actions/checkout v3 composite
- actions/setup-python v1 composite
- ad-m/github-push-action master composite
- relekang/python-semantic-release master composite
- svenstaro/upload-release-action v1-release composite