From fe43a10d9b7286aa6bec9759c271163b8494a6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 21 Mar 2019 22:53:59 +0100 Subject: [PATCH] Embedded platforms (#205) * Update example to follow the embedded structure * Update example to follow the embedded structure --- docs/creating_platform_example_light.md | 4 ++-- docs/creating_platform_example_sensor.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/creating_platform_example_light.md b/docs/creating_platform_example_light.md index 88ba4359..2fa1fd5c 100644 --- a/docs/creating_platform_example_light.md +++ b/docs/creating_platform_example_light.md @@ -4,7 +4,7 @@ title: "Example light platform" This example is for adding support for the imaginary Awesome Lights. It shows the different best practices for developing a platform. -Similar to Example Sensor Platform, copy the code below, and create it as a file in `/custom_components/light/awesomelights.py`. +Similar to Example Sensor Platform, copy the code below, and create it as a file in `/custom_components/awesomelights/light.py`. Add the following to your configuration.yaml: @@ -16,7 +16,7 @@ light: password: PASSWORD_HERE_OR_secrets.yaml ``` -Note the `platform` name matches the filename for the source code. +Note the `platform` name matches the directory name that contains the source code. ```python import logging diff --git a/docs/creating_platform_example_sensor.md b/docs/creating_platform_example_sensor.md index 5d2728e1..4bc5255f 100644 --- a/docs/creating_platform_example_sensor.md +++ b/docs/creating_platform_example_sensor.md @@ -6,7 +6,7 @@ This is a minimum implementation of a platform for the sensor component. ### Installation -Copy the code below and create it as a file in `/custom_components/sensor/example.py`. +Copy the code below and create it as a file in `/custom_components/example/sensor.py`. Add the following to your `configuration.yaml` file: