mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 23:14:25 +01:00
fixed detail page shutter
This commit is contained in:
@@ -462,11 +462,11 @@ class NsPanelLovelaceUI:
|
||||
color = "disable"
|
||||
self.send_mqtt_msg(f"entityUpdateDetail,{switch_val},{brightness},{color_temp},{color}")
|
||||
|
||||
if(page_type == "popupShutter"):
|
||||
pos = self.api.get_entity(msg[3]).attributes.current_position
|
||||
# reverse position for slider
|
||||
pos = 100-pos
|
||||
self.send_mqtt_msg("entityUpdateDetail,{0}".format(pos))
|
||||
if(page_type == "popupShutter"):
|
||||
pos = self.api.get_entity(msg[3]).attributes.current_position
|
||||
# reverse position for slider
|
||||
pos = 100-pos
|
||||
self.send_mqtt_msg("entityUpdateDetail,{0}".format(pos))
|
||||
|
||||
def hsv2rgb(self, h, s, v):
|
||||
hsv = colorsys.hsv_to_rgb(h,s,v)
|
||||
@@ -484,4 +484,4 @@ class NsPanelLovelaceUI:
|
||||
sat = r
|
||||
hsv = (math.degrees(math.atan2(y, x))%360/360, sat, 1)
|
||||
rgb = self.hsv2rgb(hsv[0],hsv[1],hsv[2])
|
||||
return rgb
|
||||
return rgb
|
||||
Reference in New Issue
Block a user