mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 15:04:24 +01:00
added title to cardPower
This commit is contained in:
@@ -2,39 +2,36 @@ from shared import *
|
||||
head = sharedhead + """
|
||||
if(tInstruction.txt=="entityUpd")
|
||||
{
|
||||
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
|
||||
spstr strCommand.txt,tHeading.txt,"~",1
|
||||
""" + navigation + """
|
||||
// icon color home
|
||||
spstr strCommand.txt,tTmp.txt,"~",14
|
||||
spstr strCommand.txt,tTmp.txt,"~",17
|
||||
covx tTmp.txt,t1.pco,0,0
|
||||
// icon home
|
||||
spstr strCommand.txt,t1.txt,"~",15
|
||||
spstr strCommand.txt,t1.txt,"~",16
|
||||
// speed 16 ignored
|
||||
// text home
|
||||
spstr strCommand.txt,tHome.txt,"~",17
|
||||
spstr strCommand.txt,tHome.txt,"~",19
|
||||
spstr tHome.txt,tHome2.txt," ",1
|
||||
spstr tHome.txt,tHome.txt," ",0
|
||||
// icon color 18 ignored
|
||||
// icon 19 ignored
|
||||
// speed 20 ignored
|
||||
// text home
|
||||
spstr strCommand.txt,tHomeO.txt,"~",21
|
||||
spstr strCommand.txt,tHomeO.txt,"~",26
|
||||
spstr tHomeO.txt,tHomeO2.txt," ",1
|
||||
spstr tHomeO.txt,tHomeO.txt," ",0
|
||||
"""
|
||||
|
||||
print(head)
|
||||
start = 22
|
||||
start = 27
|
||||
for i in range(0,6):
|
||||
idxstart = start + (i)*4
|
||||
idxstart = start + (i)*7
|
||||
item = f"""
|
||||
// iconColor
|
||||
spstr strCommand.txt,tTmp.txt,"~",{idxstart}
|
||||
spstr strCommand.txt,tTmp.txt,"~",{idxstart+4}
|
||||
covx tTmp.txt,t{i}Icon.pco,0,0
|
||||
// icon
|
||||
spstr strCommand.txt,t{i}Icon.txt,"~",{idxstart+1}
|
||||
spstr strCommand.txt,t{i}Icon.txt,"~",{idxstart+3}
|
||||
// speed
|
||||
spstr strCommand.txt,tTmp.txt,"~",{idxstart+2}
|
||||
spstr strCommand.txt,tTmp.txt,"~",{idxstart+7}
|
||||
covx tTmp.txt,t{i}Speed.val,0,0
|
||||
if(t{i}Speed.val>120)
|
||||
{{
|
||||
@@ -45,8 +42,9 @@ for i in range(0,6):
|
||||
t{i}Speed.val=-120
|
||||
}}
|
||||
// lower text
|
||||
spstr strCommand.txt,t{i}u.txt,"~",{idxstart+3}
|
||||
|
||||
spstr strCommand.txt,t{i}u.txt,"~",{idxstart+6}
|
||||
// upper text
|
||||
spstr strCommand.txt,t{i}o.txt,"~",{idxstart+5}
|
||||
if(t{i}Icon.txt!="")
|
||||
{{
|
||||
vis t{i}Icon,1
|
||||
|
||||
Reference in New Issue
Block a user