mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
add missing docstring
This commit is contained in:
parent
f49e5514d6
commit
55c778ca0a
@ -1 +1 @@
|
||||
Subproject commit 378f9cc5eb2cc81ed07d9bc79e7726fe228ca6da
|
||||
Subproject commit 576c04efb49a8a5f7f35734458ffc93f874dd68d
|
@ -104,6 +104,7 @@ class LimitlessLED(Light):
|
||||
def _xy_to_led_color(self, xy_color):
|
||||
""" Convert an XY color to the closest LedController color string """
|
||||
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)
|
||||
|
||||
candidates = [(abs_dist_squared(xy_color, x[0]), x[1]) for x in
|
||||
|
Loading…
x
Reference in New Issue
Block a user