From 73ff34ff9a0d51d1f93436df36a9824383622887 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Thu, 25 Jul 2019 09:53:43 +0000 Subject: [PATCH] Add config_flow "docs" --- README.md | 12 ++++++++++-- custom_components/blueprint/const.py | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 316c6c6..871550c 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,10 @@ File | Purpose `.github/ISSUE_TEMPLATE/issue.md` | Template for issues `.github/settings.yml` | Probot settings to control the repository settings. `.vscode/taks.json` | Tasks for the devcontainer. -`custom_components/blueprint/.translations/sensor.nb.json` | [Translation files.](https://developers.home-assistant.io/docs/en/next/internationalization_custom_component_localization.html#translation-strings) +`custom_components/blueprint/.translations/*` | [Translation files.](https://developers.home-assistant.io/docs/en/next/internationalization_custom_component_localization.html#translation-strings) `custom_components/blueprint/__init__.py` | The component file for the integration. `custom_components/blueprint/binary_sensor.py` | Binary sensor platform for the integration. +`custom_components/blueprint/config_flow.py` | Config flow file, this adds the UI configuration possibilities. `custom_components/blueprint/const.py` | A file to hold shared variables/constants for the entire integration. `custom_components/blueprint/manifest.json` | A [manifest file](https://developers.home-assistant.io/docs/en/creating_integration_manifest.html) for Home Assistant. `custom_components/blueprint/sensor.py` | Sensor platform for the integration. @@ -77,13 +78,20 @@ Platform | Description 3. In the `custom_components` directory (folder) create a new folder called `blueprint`. 4. Download _all_ the files from the `custom_components/blueprint/` directory (folder) in this repository. 5. Place the files you downloaded in the new directory (folder) you created. -6. Add `blueprint:` to your HA configuration. +6. Restart Home Assistant +7. Choose: + - Add `blueprint:` to your HA configuration. + - In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Blueprint" Using your HA configuration directory (folder) as a starting point you should now also have this: ```text +custom_components/blueprint/.translations/en.json +custom_components/blueprint/.translations/nb.json +custom_components/blueprint/.translations/sensor.nb.json custom_components/blueprint/__init__.py custom_components/blueprint/binary_sensor.py +custom_components/blueprint/config_flow.py custom_components/blueprint/const.py custom_components/blueprint/manifest.json custom_components/blueprint/sensor.py diff --git a/custom_components/blueprint/const.py b/custom_components/blueprint/const.py index 2380311..45d6e9c 100644 --- a/custom_components/blueprint/const.py +++ b/custom_components/blueprint/const.py @@ -5,8 +5,10 @@ DOMAIN_DATA = f"{DOMAIN}_data" VERSION = "0.0.1" PLATFORMS = ["binary_sensor", "sensor", "switch"] REQUIRED_FILES = [ + ".translations/en.json", "binary_sensor.py", "const.py", + "config_flow.py", "manifest.json", "sensor.py", "switch.py",