mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 23:44:25 +01:00
display light detail in correct mode
This commit is contained in:
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user