mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 22:47:01 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72f9af1175 |
@@ -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 : 3
|
Text : 4
|
||||||
Max. Text Size : 10
|
Max. Text Size : 10
|
||||||
|
|
||||||
Picture p0
|
Picture p0
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Variable (int32) mode
|
|||||||
Attributes
|
Attributes
|
||||||
ID : 23
|
ID : 23
|
||||||
Scope: local
|
Scope: local
|
||||||
Value: 0
|
Value: 1
|
||||||
|
|
||||||
Variable (int32) mode_bright
|
Variable (int32) mode_bright
|
||||||
Attributes
|
Attributes
|
||||||
@@ -384,9 +384,10 @@ Button bColor
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Touch Press Event
|
Touch Press Event
|
||||||
if(mode.val==0)
|
if(mode.val==1)
|
||||||
{
|
{
|
||||||
mode.val=1
|
mode.val=0
|
||||||
|
//enable color wheel
|
||||||
vis pColorWheel,1
|
vis pColorWheel,1
|
||||||
vis t0,1
|
vis t0,1
|
||||||
//disable brightness
|
//disable brightness
|
||||||
@@ -399,7 +400,8 @@ Button bColor
|
|||||||
vis hTempSlider,0
|
vis hTempSlider,0
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
mode.val=0
|
mode.val=1
|
||||||
|
//disable color wheel
|
||||||
vis pColorWheel,0
|
vis pColorWheel,0
|
||||||
vis t0,0
|
vis t0,0
|
||||||
if(mode_bright.val==1)
|
if(mode_bright.val==1)
|
||||||
@@ -529,7 +531,7 @@ 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
|
||||||
if(mode.val==0)
|
if(mode.val==1)
|
||||||
{
|
{
|
||||||
// get Brightness value
|
// get Brightness value
|
||||||
spstr strCommand.txt,tTmp.txt,",",2
|
spstr strCommand.txt,tTmp.txt,",",2
|
||||||
|
|||||||
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,6 +451,10 @@ 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"
|
||||||
|
|||||||
Reference in New Issue
Block a user