From 3bef0ad30f98c57b8f5885c01fb37d4855957c61 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 30 Apr 2017 23:06:50 +0200 Subject: [PATCH] Minor updates --- source/developers/platform_example_light.markdown | 5 +++-- source/developers/platform_example_sensor.markdown | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/developers/platform_example_light.markdown b/source/developers/platform_example_light.markdown index a5092db30ca..8a11eec73f5 100644 --- a/source/developers/platform_example_light.markdown +++ b/source/developers/platform_example_light.markdown @@ -63,13 +63,14 @@ def setup_platform(hass, config, add_devices, discovery_info=None): # Verify that passed in configuration works if not hub.is_valid_login(): - _LOGGER.error('Could not connect to AwesomeLight hub') + _LOGGER.error("Could not connect to AwesomeLight hub") return False # Add devices add_devices(AwesomeLight(light) for light in hub.lights()) + class AwesomeLight(Light): """Representation of an Awesome Light.""" @@ -87,7 +88,7 @@ class AwesomeLight(Light): @property def brightness(self): - """Brightness of the light (an integer in the range 1-255). + """Return the brightness of the light. This method is optional. Removing it indicates to Home Assistant that brightness is not supported for this light. diff --git a/source/developers/platform_example_sensor.markdown b/source/developers/platform_example_sensor.markdown index 94b84f0d374..166b3071178 100644 --- a/source/developers/platform_example_sensor.markdown +++ b/source/developers/platform_example_sensor.markdown @@ -15,7 +15,7 @@ This is a minimum implementation of a platform for the sensor component. Copy the code below and create it as a file in `/custom_components/sensor/example.py`. -Add the following to your configuration.yaml: +Add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry