All Projects → custom-components → integration_blueprint

custom-components / integration_blueprint

Licence: MIT license
Blueprint for custom_component developers.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to integration blueprint

home-assistant-frigidaire
Custom component for the Frigidaire integration
Stars: ✭ 11 (-92.72%)
Mutual labels:  home-assistant, homeassistant, custom-component
openrgb ha
OpenRGB integration for Home Assistant
Stars: ✭ 40 (-73.51%)
Mutual labels:  home-assistant, homeassistant, custom-component
github-custom-component-tutorial
A tutorial for creating a custom component for Home Assistant using GitHub's API.
Stars: ✭ 31 (-79.47%)
Mutual labels:  home-assistant, homeassistant, custom-component
ha-zoom-automation
Custom Home Assistant component for Zoom. Tracks when you are connected to a Zoom call by default but may allow you to track more.
Stars: ✭ 47 (-68.87%)
Mutual labels:  home-assistant, homeassistant, custom-component
addon-tailscale
Tailscale - Home Assistant Community Add-ons
Stars: ✭ 47 (-68.87%)
Mutual labels:  home-assistant, homeassistant
ledfxrm
Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
Stars: ✭ 31 (-79.47%)
Mutual labels:  homeassistant, custom-component
nwsradar
Home assistant custom camera platform for NWS radar loops
Stars: ✭ 20 (-86.75%)
Mutual labels:  home-assistant, custom-component
ocpp
Home Assistant integration for electric vehicle chargers that support the Open Charge Point Protocol (OCPP).
Stars: ✭ 82 (-45.7%)
Mutual labels:  home-assistant, homeassistant
home-assistant-p2000
🚒 This component tracks P2000 emergency events in The Netherlands.
Stars: ✭ 45 (-70.2%)
Mutual labels:  homeassistant, custom-component
home-assistant-config
🏠 Home Assistant Configuration & Documentation for my smart home using Node-RED for automations. Press ⭐ for notification of updates.
Stars: ✭ 34 (-77.48%)
Mutual labels:  home-assistant, homeassistant
Home-Assistant-Config
🏠 My huizebruin Home Assistant configuration, Be sure to 🌟 this repository for updates! huizebruin
Stars: ✭ 29 (-80.79%)
Mutual labels:  home-assistant, homeassistant
breaking changes
Component to show potential breaking_changes in the current published version based on your loaded components
Stars: ✭ 83 (-45.03%)
Mutual labels:  homeassistant, custom-component
ha-eskom-loadshedding
Fetches loadshedding data from Eskom
Stars: ✭ 48 (-68.21%)
Mutual labels:  homeassistant, custom-component
homeassistant-plant
Alternative Plant component of home assistant
Stars: ✭ 62 (-58.94%)
Mutual labels:  home-assistant, homeassistant
ha-birthdays
Birthday integration for HomeAssistant
Stars: ✭ 14 (-90.73%)
Mutual labels:  homeassistant, custom-component
purifier-card
Air Purifier card for Home Assistant Lovelace UI
Stars: ✭ 155 (+2.65%)
Mutual labels:  home-assistant, homeassistant
lovelace-valetudo-map-card
Draws the map available from a Xiaomi Vacuum cleaner flashed with Valetudo in a Home Assistant Lovelace card
Stars: ✭ 149 (-1.32%)
Mutual labels:  home-assistant, homeassistant
xiaomiplug
Xiaomi Mi Smart WiFi Socket integration for Home Assistant
Stars: ✭ 99 (-34.44%)
Mutual labels:  home-assistant, custom-component
hass-pandora-cas
Home Assistant custom component for Pandora Car Alarm System
Stars: ✭ 15 (-90.07%)
Mutual labels:  home-assistant, homeassistant
Pyscript
Pyscript adds rich Python scripting to HASS
Stars: ✭ 219 (+45.03%)
Mutual labels:  home-assistant, homeassistant

Notice

The component and platforms in this repository are not meant to be used by a user, but as a "blueprint" that custom component developers can build upon, to make more awesome stuff.

HAVE FUN! 😎

Why?

This is simple, by having custom_components look (README + structure) the same it is easier for developers to help each other and for users to start using them.

If you are a developer and you want to add things to this "blueprint" that you think more developers will have use for, please open a PR to add it :)

What?

This repository contains multiple files, here is a overview:

File Purpose
.devcontainer/* Used for development/testing with VSCODE, more info in the readme file in that dir.
.github/ISSUE_TEMPLATE/feature_request.md Template for Feature Requests
.github/ISSUE_TEMPLATE/issue.md Template for issues
.vscode/tasks.json Tasks for the devcontainer.
custom_components/integration_blueprint/translations/* Translation files.
custom_components/integration_blueprint/__init__.py The component file for the integration.
custom_components/integration_blueprint/api.py This is a sample API client.
custom_components/integration_blueprint/binary_sensor.py Binary sensor platform for the integration.
custom_components/integration_blueprint/config_flow.py Config flow file, this adds the UI configuration possibilities.
custom_components/integration_blueprint/const.py A file to hold shared variables/constants for the entire integration.
custom_components/integration_blueprint/manifest.json A manifest file for Home Assistant.
custom_components/integration_blueprint/sensor.py Sensor platform for the integration.
custom_components/integration_blueprint/switch.py Switch sensor platform for the integration.
tests/__init__.py Makes the tests folder a module.
tests/conftest.py Global fixtures used in tests to patch functions.
tests/test_api.py Tests for custom_components/integration_blueprint/api.py.
tests/test_config_flow.py Tests for custom_components/integration_blueprint/config_flow.py.
tests/test_init.py Tests for custom_components/integration_blueprint/__init__.py.
tests/test_switch.py Tests for custom_components/integration_blueprint/switch.py.
CONTRIBUTING.md Guidelines on how to contribute.
example.png Screenshot that demonstrate how it might look in the UI.
info.md An example on a info file (used by hacs).
LICENSE The license file for the project.
README.md The file you are reading now, should contain info about the integration, installation and configuration instructions.
requirements.txt Python packages used by this integration.
requirements_dev.txt Python packages used to provide IntelliSense/code hints during development of this integration, typically includes packages in requirements.txt but may include additional packages
requirements_test.txt Python packages required to run the tests for this integration, typically includes packages in requirements_dev.txt but may include additional packages

How?

If you want to use all the potential and features of this blueprint template you should use Visual Studio Code to develop in a container. In this container you will have all the tools to ease your python development and a dedicated Home Assistant core instance to run your integration. See .devcontainer/README.md for more information.

If you need to work on the python library in parallel of this integration (sampleclient in this example) there are different options. The following one seems easy to implement:

  • Create a dedicated branch for your python library on a public git repository (example: branch dev on https://github.com/ludeeus/sampleclient)
  • Update in the manifest.json file the requirements key to point on your development branch ( example: "requirements": ["git+https://github.com/ludeeus/sampleclient.git@dev#devp==0.0.1beta1"])
  • Each time you need to make a modification to your python library, push it to your development branch and increase the number of the python library version in manifest.json file to ensure Home Assistant update the code of the python library. (example "requirements": ["git+https://...==0.0.1beta2"]).

README content if this was a published component:


integration_blueprint

GitHub Release GitHub Activity License

hacs Project Maintenance BuyMeCoffee

Discord Community Forum

Component to integrate with integration_blueprint.

This component will set up the following platforms.

Platform Description
binary_sensor Show something True or False.
sensor Show info from blueprint API.
switch Switch something True or False.

example

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called integration_blueprint.
  4. Download all the files from the custom_components/integration_blueprint/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Integration blueprint"

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/integration_blueprint/translations/en.json
custom_components/integration_blueprint/translations/nb.json
custom_components/integration_blueprint/translations/sensor.nb.json
custom_components/integration_blueprint/__init__.py
custom_components/integration_blueprint/api.py
custom_components/integration_blueprint/binary_sensor.py
custom_components/integration_blueprint/config_flow.py
custom_components/integration_blueprint/const.py
custom_components/integration_blueprint/manifest.json
custom_components/integration_blueprint/sensor.py
custom_components/integration_blueprint/switch.py

Configuration is done in the UI

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].