Update docstring (config file) and attempt to honor PEP0257
This commit is contained in:
parent
514b8eddb9
commit
e824bc4c55
2 changed files with 11 additions and 13 deletions
|
@ -15,7 +15,7 @@ Support for LimitlessLED bulbs, also known as...
|
||||||
Configuration:
|
Configuration:
|
||||||
|
|
||||||
To use limitlessled you will need to add the following to your
|
To use limitlessled you will need to add the following to your
|
||||||
config/configuration.yaml.
|
configuration.yaml file.
|
||||||
|
|
||||||
light:
|
light:
|
||||||
platform: limitlessled
|
platform: limitlessled
|
||||||
|
@ -24,7 +24,6 @@ light:
|
||||||
group_2_name: Bedroom
|
group_2_name: Bedroom
|
||||||
group_3_name: Office
|
group_3_name: Office
|
||||||
group_4_name: Kitchen
|
group_4_name: Kitchen
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -107,7 +106,7 @@ class LimitlessLED(Light):
|
||||||
return self._xy_color
|
return self._xy_color
|
||||||
|
|
||||||
def _xy_to_led_color(self, xy_color):
|
def _xy_to_led_color(self, xy_color):
|
||||||
""" Convert an XY color to the closest LedController color string """
|
""" Convert an XY color to the closest LedController color string. """
|
||||||
def abs_dist_squared(p_0, p_1):
|
def abs_dist_squared(p_0, p_1):
|
||||||
""" Returns the absolute value of the squared distance """
|
""" Returns the absolute value of the squared distance """
|
||||||
return abs((p_0[0] - p_1[0])**2 + (p_0[1] - p_1[1])**2)
|
return abs((p_0[0] - p_1[0])**2 + (p_0[1] - p_1[1])**2)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""
|
"""
|
||||||
homeassistant.components.light.vera
|
homeassistant.components.light.vera
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Support for Vera lights. This component is useful if you wish for switches
|
Support for Vera lights. This component is useful if you wish for switches
|
||||||
connected to your Vera controller to appear as lights in Home Assistant.
|
connected to your Vera controller to appear as lights in Home Assistant.
|
||||||
All switches will be added as a light unless you exclude them in the config.
|
All switches will be added as a light unless you exclude them in the config.
|
||||||
|
@ -9,17 +8,17 @@ All switches will be added as a light unless you exclude them in the config.
|
||||||
Configuration:
|
Configuration:
|
||||||
|
|
||||||
To use the Vera lights you will need to add something like the following to
|
To use the Vera lights you will need to add something like the following to
|
||||||
your config/configuration.yaml.
|
your configuration.yaml file.
|
||||||
|
|
||||||
light:
|
light:
|
||||||
platform: vera
|
platform: vera
|
||||||
vera_controller_url: http://YOUR_VERA_IP:3480/
|
vera_controller_url: http://YOUR_VERA_IP:3480/
|
||||||
device_data:
|
device_data:
|
||||||
12:
|
12:
|
||||||
name: My awesome switch
|
name: My awesome switch
|
||||||
exclude: true
|
exclude: true
|
||||||
13:
|
13:
|
||||||
name: Another switch
|
name: Another switch
|
||||||
|
|
||||||
Variables:
|
Variables:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue