Embedded platforms (#205)

* Update example to follow the embedded structure

* Update example to follow the embedded structure
This commit is contained in:
Joakim Sørensen 2019-03-21 22:53:59 +01:00 committed by Paulus Schoutsen
parent 28cf775d53
commit fe43a10d9b
2 changed files with 3 additions and 3 deletions

View File

@ -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. 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 `<config_dir>/custom_components/light/awesomelights.py`. Similar to Example Sensor Platform, copy the code below, and create it as a file in `<config_dir>/custom_components/awesomelights/light.py`.
Add the following to your configuration.yaml: Add the following to your configuration.yaml:
@ -16,7 +16,7 @@ light:
password: PASSWORD_HERE_OR_secrets.yaml 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 ```python
import logging import logging

View File

@ -6,7 +6,7 @@ This is a minimum implementation of a platform for the sensor component.
### Installation ### Installation
Copy the code below and create it as a file in `<config_dir>/custom_components/sensor/example.py`. Copy the code below and create it as a file in `<config_dir>/custom_components/example/sensor.py`.
Add the following to your `configuration.yaml` file: Add the following to your `configuration.yaml` file: