display light detail in correct mode

This commit is contained in:
Johannes Braun
2022-03-16 17:37:21 +01:00
parent 864f5b80d0
commit 4d27f2f485
3 changed files with 2 additions and 2 deletions

View File

@@ -510,7 +510,7 @@ class NsPanelLovelaceUI:
# scale ha color temp range to 0-100
color_temp = int(self.scale(entity.attributes.color_temp,(entity.attributes.min_mireds, entity.attributes.max_mireds),(0,100)))
else:
color_temp = 0
color_temp = "unknown"
else:
color_temp = "disable"
@@ -530,7 +530,7 @@ class NsPanelLovelaceUI:
hsv = colorsys.hsv_to_rgb(h,s,v)
return tuple(round(i * 255) for i in hsv)
def pos_to_color(self, x, y):
r = 213/2
r = 160/2
x = round((x - r) / r * 100) / 100
y = round((r - y) / r * 100) / 100