Giter VIP home page Giter VIP logo

pr_custom_component's Introduction

PR Custom Component

GitHub Release GitHub all releases GitHub release (latest by SemVer) GitHub Activity

License

hacs Project Maintenance BuyMeCoffee

Discord Community Forum

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
binary_sensor Show whether the Pull Request has been updated since install.
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

  1. Use HACS after adding this https://github.com/alandtse/pr_custom_component as a custom repository. Skip to 7.
  2. If no HACS, use the tool of choice to open the directory (folder) for your HA configuration (where you find configuration.yaml).
  3. If you do not have a custom_components directory (folder) there, you need to create it.
  4. In the custom_components directory (folder) create a new folder called pr_custom_component.
  5. Download all the files from the custom_components/pr_custom_component/ directory (folder) in this repository.
  6. Place the files you downloaded in the new directory (folder) you created.
  7. Restart Home Assistant.
  8. 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/binary_sensor.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/switch.py

Installing an Auto Generated Custom Component

  1. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "PR Custom Component".
  2. 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

  3. After succesful install, you should see the PR Custom Component with title Tesla.
  4. Restart Home Assistant to enable the Tesla Custom Component to override the default.
  5. Hard refresh your browser to download any changes strings.
  6. Install Tesla Custom Component which has replaced the built in component.

Upgrading an Auto Generated Custom Component

  1. In the HA UI go to "Configuration" -> "Integrations", select the PR Custom Component with title Tesla Component's ... menu and reload. This will automatically download the latest files from the Pull Request
  2. Restart Home Assistant.

Uninstalling an Auto Generated Custom Component

This uses Tesla as an example.

  1. In the HA UI go to "Configuration" -> "Integrations", select the Tesla Component's ... menu and delete. This will uninstall the configured Tesla custom component from the HA instance.
  2. Select the PR Custom Component with title Tesla Component's ... menu and delete. This will delete custom files and restore the default).
  3. Restart Home Assistant.
  4. 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.


pr_custom_component's People

Contributors

actions-user avatar alandtse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pr_custom_component's Issues

Automatic dependency installation

Is your feature request related to a problem? Please describe.
Updating HA may remove any installed python dependencies resulting in a broken install

Describe the solution you'd like
The component should handle this use case automatically

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Fix version for iso timestamps

2021-03-23 04:03:23 WARNING (MainThread) [homeassistant.loader] '2021.03.23T09:37:03Z' is not a valid version for custom integration 'tesla'. Please report this to the maintainer of 'tesla'

Fix tests

Version of the custom_component

Configuration

Add your logs here.

Describe the bug

A clear and concise description of what the bug is.

Debug log


Add your logs here.

use update domain entity instead of binary_sensor

Is your feature request related to a problem? Please describe.
ATM when a PR has an update in GitHub this is shown as a binary sensor, could you update the integration to use update entity domain instead of binary_sensor for "Update Available" this way it will show in the Update available screen.

atm you use for example binary_sensor.overkiz_pr_71644_update_available can you change to update.overkiz_pr_71644_update_available

Avoid upgrade failures

Is your feature request related to a problem? Please describe.
Currently on start the component will try to connect to Github to update. If Github fails, this may clobber a working install.

Describe the solution you'd like
We should not do the final overwrite of files until the download is completed.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.