mirror of
https://github.com/home-assistant/core.git
synced 2025-08-26 16:01:33 +02:00
add missing docstring
This commit is contained in:
@@ -104,6 +104,7 @@ class LimitlessLED(Light):
|
|||||||
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 """
|
||||||
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)
|
||||||
|
|
||||||
candidates = [(abs_dist_squared(xy_color, x[0]), x[1]) for x in
|
candidates = [(abs_dist_squared(xy_color, x[0]), x[1]) for x in
|
||||||
|
Reference in New Issue
Block a user