Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text)

This commit is contained in:
joBr99
2022-03-28 12:03:50 +00:00
committed by GitHub Actions
parent a742fbb2ae
commit e958eabc86
3 changed files with 60 additions and 23 deletions

View File

@@ -38,6 +38,7 @@ Page cardEntities
vis tIcon1,0
vis tEntity1,0
vis bText1,0
vis hSlider1,0
//ui e2
vis btOnOff2,0
vis bUp2,0
@@ -46,6 +47,7 @@ Page cardEntities
vis tIcon2,0
vis tEntity2,0
vis bText2,0
vis hSlider2,0
//ui e3
vis btOnOff3,0
vis bUp3,0
@@ -54,6 +56,7 @@ Page cardEntities
vis tIcon3,0
vis tEntity3,0
vis bText3,0
vis hSlider3,0
//ui e4
vis btOnOff4,0
vis bUp4,0
@@ -62,6 +65,7 @@ Page cardEntities
vis tIcon4,0
vis tEntity4,0
vis bText4,0
vis hSlider4,0
Variable (string) strCommand
Attributes
@@ -2000,7 +2004,6 @@ Timer tmSerial
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,",",6
}
// id2
// get Type
spstr strCommand.txt,type2.txt,",",7
// get internal name
@@ -2017,7 +2020,7 @@ Timer tmSerial
vis hSlider2,0
}else
{
//change icon
// change icon
spstr strCommand.txt,tTmp.txt,",",9
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon2.txt,sys0,1
@@ -2086,14 +2089,25 @@ Timer tmSerial
vis bDown2,0
vis btOnOff2,0
vis bText2,1
vis hSlider2,0
tsw bText2,1
vis hSlider2,0
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,",",12
}
// id3
if(type2.txt=="number")
{
vis bUp2,0
vis bStop2,0
vis bDown2,0
vis btOnOff2,0
vis bText2,0
tsw bText2,0
vis hSlider2,1
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,",",12
}
// get Type
spstr strCommand.txt,type3.txt,",",13
// get internal name
@@ -2110,7 +2124,7 @@ Timer tmSerial
vis hSlider3,0
}else
{
//change icon
// change icon
spstr strCommand.txt,tTmp.txt,",",15
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon3.txt,sys0,1
@@ -2137,8 +2151,8 @@ Timer tmSerial
vis bUp3,0
vis bStop3,0
vis bDown3,0
vis bText3,0
vis btOnOff3,1
vis bText3,0
vis hSlider3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",18
@@ -2150,8 +2164,8 @@ Timer tmSerial
vis bUp3,0
vis bStop3,0
vis bDown3,0
vis bText3,0
vis btOnOff3,1
vis bText3,0
vis hSlider3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",18
@@ -2186,7 +2200,18 @@ Timer tmSerial
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,",",18
}
// id4
if(type3.txt=="number")
{
vis bUp3,0
vis bStop3,0
vis bDown3,0
vis btOnOff3,0
vis bText3,0
tsw bText3,0
vis hSlider3,1
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,",",18
}
// get Type
spstr strCommand.txt,type4.txt,",",19
// get internal name
@@ -2203,7 +2228,7 @@ Timer tmSerial
vis hSlider4,0
}else
{
//change icon
// change icon
spstr strCommand.txt,tTmp.txt,",",21
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon4.txt,sys0,1
@@ -2230,8 +2255,8 @@ Timer tmSerial
vis bUp4,0
vis bStop4,0
vis bDown4,0
vis bText4,0
vis btOnOff4,1
vis bText4,0
vis hSlider4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",24
@@ -2243,8 +2268,8 @@ Timer tmSerial
vis bUp4,0
vis bStop4,0
vis bDown4,0
vis bText4,0
vis btOnOff4,1
vis bText4,0
vis hSlider4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",24
@@ -2258,8 +2283,8 @@ Timer tmSerial
vis bDown4,0
vis btOnOff4,0
vis bText4,1
vis hSlider4,0
tsw bText4,0
vis hSlider4,0
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
@@ -2279,6 +2304,18 @@ Timer tmSerial
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,",",24
}
if(type4.txt=="number")
{
vis bUp4,0
vis bStop4,0
vis bDown4,0
vis btOnOff4,0
vis bText4,0
tsw bText4,0
vis hSlider4,1
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,",",24
}
}
if(tInstruction.txt=="pageType")
{