mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c93ad3ce13 |
@@ -165,7 +165,7 @@ Text tVersion
|
|||||||
Disable release event after dragging: 0
|
Disable release event after dragging: 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
Associated Keyboard : none
|
Associated Keyboard : none
|
||||||
Text : 2
|
Text : 3
|
||||||
Max. Text Size : 10
|
Max. Text Size : 10
|
||||||
|
|
||||||
Picture p0
|
Picture p0
|
||||||
|
|||||||
@@ -529,39 +529,42 @@ Timer tmSerial
|
|||||||
spstr strCommand.txt,tTmp.txt,",",1
|
spstr strCommand.txt,tTmp.txt,",",1
|
||||||
covx tTmp.txt,sys0,0,0
|
covx tTmp.txt,sys0,0,0
|
||||||
btOnOff1.val=sys0
|
btOnOff1.val=sys0
|
||||||
// get Brightness value
|
if(mode.val==0)
|
||||||
spstr strCommand.txt,tTmp.txt,",",2
|
|
||||||
if(tTmp.txt=="disable")
|
|
||||||
{
|
{
|
||||||
vis t1,0
|
// get Brightness value
|
||||||
vis t2,0
|
spstr strCommand.txt,tTmp.txt,",",2
|
||||||
vis hBrightness,0
|
if(tTmp.txt=="disable")
|
||||||
mode_bright.val=0
|
{
|
||||||
}else
|
vis t1,0
|
||||||
{
|
vis t2,0
|
||||||
vis t1,1
|
vis hBrightness,0
|
||||||
vis t2,1
|
mode_bright.val=0
|
||||||
vis hBrightness,1
|
}else
|
||||||
mode_bright.val=1
|
{
|
||||||
covx tTmp.txt,sys0,0,0
|
vis t1,1
|
||||||
hBrightness.val=sys0
|
vis t2,1
|
||||||
}
|
vis hBrightness,1
|
||||||
// get ColorTemp value
|
mode_bright.val=1
|
||||||
spstr strCommand.txt,tTmp.txt,",",3
|
covx tTmp.txt,sys0,0,0
|
||||||
if(tTmp.txt=="disable")
|
hBrightness.val=sys0
|
||||||
{
|
}
|
||||||
vis t4,0
|
// get ColorTemp value
|
||||||
vis t3,0
|
spstr strCommand.txt,tTmp.txt,",",3
|
||||||
vis hTempSlider,0
|
if(tTmp.txt=="disable")
|
||||||
mode_temp.val=0
|
{
|
||||||
}else
|
vis t4,0
|
||||||
{
|
vis t3,0
|
||||||
vis t4,1
|
vis hTempSlider,0
|
||||||
vis t3,1
|
mode_temp.val=0
|
||||||
vis hTempSlider,1
|
}else
|
||||||
mode_temp.val=1
|
{
|
||||||
covx tTmp.txt,sys0,0,0
|
vis t4,1
|
||||||
hTempSlider.val=sys0
|
vis t3,1
|
||||||
|
vis hTempSlider,1
|
||||||
|
mode_temp.val=1
|
||||||
|
covx tTmp.txt,sys0,0,0
|
||||||
|
hTempSlider.val=sys0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// get ColorWheel value
|
// get ColorWheel value
|
||||||
spstr strCommand.txt,tTmp.txt,",",4
|
spstr strCommand.txt,tTmp.txt,",",4
|
||||||
|
|||||||
BIN
HMI/nspanel.HMI
BIN
HMI/nspanel.HMI
Binary file not shown.
BIN
HMI/nspanel.tft
BIN
HMI/nspanel.tft
Binary file not shown.
@@ -451,10 +451,7 @@ class NsPanelLovelanceUI:
|
|||||||
if "color_temp" in entity.attributes:
|
if "color_temp" in entity.attributes:
|
||||||
# scale ha color temp range to 0-100
|
# 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)))
|
color_temp = int(self.scale(entity.attributes.color_temp,(entity.attributes.min_mireds, entity.attributes.max_mireds),(0,100)))
|
||||||
else:
|
|
||||||
color_temp = 0
|
|
||||||
else:
|
|
||||||
color_temp = "disable"
|
|
||||||
if "xy" in entity.attributes.supported_color_modes:
|
if "xy" in entity.attributes.supported_color_modes:
|
||||||
color = "enable"
|
color = "enable"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user