Compare commits

...

67 Commits

Author SHA1 Message Date
Johannes
34340d2ac4 update docs 2022-03-28 22:36:45 +02:00
Johannes
ca59b35b87 update pic 2022-03-28 22:34:08 +02:00
Johannes
1539149c09 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 22:19:52 +02:00
Johannes
2851c80bb5 fix shutter detail page 2022-03-28 22:19:45 +02:00
joBr99
383fc978fd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 20:16:08 +00:00
Johannes
1e57b46f9d Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 22:15:44 +02:00
Johannes
2c1868ba29 fix 2022-03-28 22:15:36 +02:00
Johannes
8366555eed bump version for next release 2022-03-28 22:08:58 +02:00
joBr99
6bccd8dd50 added on off button to media page (add nextion2text) 2022-03-28 19:38:22 +00:00
Johannes
6ccc5bafe1 added on off button to media page 2022-03-28 21:37:53 +02:00
Johannes
89174c2bbd Update pages.py 2022-03-28 20:08:35 +02:00
Johannes
f5395153ee Merge pull request #89 from britzelpuf/main
Fixes for version 20
2022-03-28 20:00:13 +02:00
britzelpuf
e9fb5ba32b Resolve changes 2022-03-28 19:56:59 +02:00
britzelpuf
661494b0b5 Fix for Version 20 2022-03-28 19:52:01 +02:00
britzelpuf
ea49bc9d70 Merge branch 'joBr99:main' into main 2022-03-28 19:39:35 +02:00
Johannes
1210838186 Update README.md 2022-03-28 18:12:54 +02:00
joBr99
0c872bfa87 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 15:49:36 +00:00
Johannes
e3a30e2da8 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 17:47:50 +02:00
Johannes
2a829e7217 added flashing 2022-03-28 17:47:45 +02:00
joBr99
15c79b60fa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 15:32:29 +00:00
Johannes
05e05c7cb5 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 17:32:02 +02:00
Johannes
a27bc617a2 implemented buttons #81 and triggered state 2022-03-28 17:31:57 +02:00
joBr99
0a9e174c23 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 14:37:51 +00:00
Johannes
4fd2d3b260 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 16:37:25 +02:00
Johannes
28a43f46d7 added shield-airplane in HMI #81 2022-03-28 16:37:20 +02:00
joBr99
fffb73e310 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 14:35:44 +00:00
Johannes
7aacef87bd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 16:35:17 +02:00
Johannes
1bf01b28a3 added some more alarm states #81 2022-03-28 16:35:13 +02:00
Johannes
0e6ec05056 change layout of alarm page #81 2022-03-28 16:19:02 +02:00
joBr99
2cd39b0abd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 13:59:05 +00:00
Johannes
e3ab0d5594 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 15:58:41 +02:00
Johannes
f0bdc3c8ac implemented server side rendering of alarm page content #81 2022-03-28 15:58:37 +02:00
joBr99
e958eabc86 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 12:03:50 +00:00
Johannes
a742fbb2ae Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 14:03:27 +02:00
Johannes
b3eb283544 hide slider on page load 2022-03-28 14:03:19 +02:00
Johannes
2fa535a888 Update README.md 2022-03-28 13:29:08 +02:00
Johannes
31b8c566ed Update README.md 2022-03-28 12:40:29 +02:00
joBr99
ef6c42d1e0 add gui elements for slider on entities page (add nextion2text) 2022-03-27 21:07:54 +00:00
Johannes
af7edd37ad add gui elements for slider on entities page 2022-03-27 23:07:35 +02:00
Johannes
9525b5ad2c Update controller.py 2022-03-27 22:32:35 +02:00
Johannes
e882934d1b Update controller.py 2022-03-27 22:30:40 +02:00
Johannes
7477af1d2b Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 22:24:00 +02:00
Johannes
f2c67e47b3 fix thermo None values 2022-03-27 22:23:55 +02:00
joBr99
d35c990cc0 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-27 20:10:34 +00:00
Johannes
03c0940baa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 22:10:15 +02:00
Johannes
48a0f331a8 increased entity char limit 2022-03-27 22:10:09 +02:00
joBr99
3081804f5a increase cooldown (add nextion2text) 2022-03-27 19:31:49 +00:00
Johannes
daf9fc5181 increase cooldown 2022-03-27 21:31:28 +02:00
joBr99
b6b12a2855 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-27 19:26:40 +00:00
Johannes
94eaebb542 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 21:26:15 +02:00
Johannes
dbe7725e48 changed cooldowns 2022-03-27 21:26:13 +02:00
Johannes
98e5249a43 fix pic 2022-03-27 20:28:44 +02:00
joBr99
43211467b2 added double tap feature for screensaver (add nextion2text) 2022-03-27 18:26:28 +00:00
Johannes
07260c0d0b added double tap feature for screensaver 2022-03-27 20:26:06 +02:00
Johannes
071b56f488 Update config.py 2022-03-27 20:04:58 +02:00
Johannes
d30fcf4157 Update controller.py 2022-03-27 19:48:49 +02:00
Johannes
3d04f77961 Do not display speaker selection item, in case there is only one speaker 2022-03-27 19:30:54 +02:00
joBr99
0b206e7fe3 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-27 14:29:36 +00:00
Johannes
f6e5e1ffdb Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 16:29:11 +02:00
Johannes
d2695b0437 more locations for sensor data on screensaver 2022-03-27 16:29:06 +02:00
Johannes
04bc737fd1 changed forecast on screensaver 2022-03-27 16:03:54 +02:00
joBr99
5586b57c9b implemented speaker control on media page (add nextion2text) 2022-03-27 13:49:18 +00:00
Johannes
11fc578984 implemented speaker control on media page 2022-03-27 15:48:57 +02:00
Johannes
a74043e4aa added speaker controls to hmi 2022-03-27 14:52:14 +02:00
Johannes
816d6787b7 Update pages.py 2022-03-27 12:05:44 +02:00
Johannes
01e4e233bf Update pages.py 2022-03-27 11:52:21 +02:00
britzelpuf
8a48ff35d4 Fix Startup routine 2022-03-24 12:23:01 +01:00
28 changed files with 1263 additions and 429 deletions

View File

@@ -75,11 +75,7 @@ change the page type:
### screensaver page
`weatherUpdate,? tMainIcon? tMainText? tMRIcon? tMR? tForecast1? tF1Icon? tForecast1Val? tForecast2? tF2Icon? tForecast2Val`
`weatherUpdate,?0?2,3 C?0?0 mm?Mi?0?9,3 C?Do?0?11,5 C`
`page,0`
`weatherUpdate,? tMainIcon? tMainText? tMRIcon? tMR? tForecast1? tF1Icon? tForecast1Val? tForecast2? tF2Icon? tForecast2Val?tForecast3? tF3Icon? tForecast3Val?tForecast4? tF4Icon? tForecast4Val`
### cardEntities Page
@@ -129,11 +125,11 @@ The following message can be used to update the content on the cardEntities Page
### cardMedia Page
`entityUpd,|*internalNameEntiy*|*heading*|*icon*|*title*|*author*|*volume*|*playpauseicon*`
`entityUpd,|*internalNameEntiy*|*heading*|*icon*|*title*|*author*|*volume*|*playpauseicon*|currentSpeaker|speakerList-seperated-by-?`
### cardAlarm Page
`entityUpd,*internalNameEntity*,*arm1*,*arm1ActionName*,*arm2*,*arm2ActionName*,*arm3*,*arm3ActionName*,*arm4*,*arm4ActionName*,*icon*,*numpadStatus*`
`entityUpd,*internalNameEntity*,*arm1*,*arm1ActionName*,*arm2*,*arm2ActionName*,*arm3*,*arm3ActionName*,*arm4*,*arm4ActionName*,*icon*,*iconcolor*,*numpadStatus*,*flashing*`
## Messages from Nextion Display
@@ -142,7 +138,7 @@ The following message can be used to update the content on the cardEntities Page
`event,buttonPress2,pageName,bPrev`
`event,buttonPress2,pageName,bExit`
`event,buttonPress2,pageName,bExit,number_of_taps`
### startup page

View File

@@ -40,7 +40,12 @@ icons = [
"shield-home",
"door-open",
"door-closed",
"window-closed"
"window-closed",
"shield-off",
"shield",
"shield-lock",
"shield-airplane",
"bell-ring"
]
@@ -66,7 +71,7 @@ for icon_name in icons:
icon_name_list.append(icon_name)
# write mapping lib for python
with open(os.path.join(__location__, "../../../apps/nspanel-lovelace-ui", "icon_mapping.py"), 'w') as f:
with open(os.path.join(__location__, "../../../apps/nspanel-lovelace-ui/luibackend", "icon_mapping.py"), 'w') as f:
f.write("icons = {\n")
for idx, val in enumerate(icon_name_list):
f.write(f" '{val}': {idx},\n")

View File

@@ -43,3 +43,8 @@ ID | MD Icon Name | Icon
36 | door-open | ![door-open](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/door-open.svg)
37 | door-closed | ![door-closed](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/door-closed.svg)
38 | window-closed | ![window-closed](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/window-closed.svg)
39 | shield-off | ![shield-off](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-off.svg)
40 | shield | ![shield](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield.svg)
41 | shield-lock | ![shield-lock](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-lock.svg)
42 | shield-airplane | ![shield-airplane](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-airplane.svg)
43 | bell-ring | ![bell-ring](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/bell-ring.svg)

View File

@@ -222,7 +222,7 @@ Text tCode
Send Component ID : disabled
Opacity : 127
x coordinate : 92
y coordinate : 12
y coordinate : 16
Width : 192
Height : 49
Effect : load
@@ -252,7 +252,7 @@ Text tIcon
Send Component ID : disabled
Opacity : 127
x coordinate : 300
y coordinate : 12
y coordinate : 16
Width : 64
Height : 49
Effect : load
@@ -267,7 +267,7 @@ Text tIcon
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
@@ -392,8 +392,8 @@ Button b0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 52
y coordinate : 146
x coordinate : 25
y coordinate : 94
Width : 75
Height : 50
Effect : load
@@ -430,8 +430,8 @@ Button b1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 144
y coordinate : 146
x coordinate : 117
y coordinate : 94
Width : 75
Height : 50
Effect : load
@@ -468,8 +468,8 @@ Button b2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 236
y coordinate : 145
x coordinate : 209
y coordinate : 93
Width : 75
Height : 50
Effect : load
@@ -506,8 +506,8 @@ Button b3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 52
y coordinate : 204
x coordinate : 25
y coordinate : 152
Width : 75
Height : 50
Effect : load
@@ -544,8 +544,8 @@ Button b4
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 144
y coordinate : 204
x coordinate : 117
y coordinate : 152
Width : 75
Height : 50
Effect : load
@@ -582,8 +582,8 @@ Button b5
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 236
y coordinate : 204
x coordinate : 209
y coordinate : 152
Width : 75
Height : 50
Effect : load
@@ -620,8 +620,8 @@ Button b6
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 52
y coordinate : 262
x coordinate : 25
y coordinate : 210
Width : 75
Height : 50
Effect : load
@@ -658,8 +658,8 @@ Button b7
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 144
y coordinate : 262
x coordinate : 117
y coordinate : 210
Width : 75
Height : 50
Effect : load
@@ -696,8 +696,8 @@ Button b8
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 236
y coordinate : 262
x coordinate : 209
y coordinate : 210
Width : 75
Height : 50
Effect : load
@@ -734,8 +734,8 @@ Button b9
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 328
y coordinate : 204
x coordinate : 116
y coordinate : 266
Width : 75
Height : 50
Effect : load
@@ -772,8 +772,8 @@ Button b10
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 328
y coordinate : 262
x coordinate : 209
y coordinate : 266
Width : 75
Height : 50
Effect : load
@@ -792,7 +792,7 @@ Button b10
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : CLEAR
Text : CLR
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
@@ -810,10 +810,10 @@ Button arm1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 59
y coordinate : 72
Width : 64
Height : 64
x coordinate : 300
y coordinate : 91
Width : 141
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -831,7 +831,7 @@ Button arm1
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Max. Text Size : 40
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -854,6 +854,7 @@ Button arm1
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm3
Attributes
@@ -863,10 +864,10 @@ Button arm3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 239
y coordinate : 72
Width : 64
Height : 64
x coordinate : 300
y coordinate : 210
Width : 140
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -884,7 +885,7 @@ Button arm3
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Max. Text Size : 40
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -907,6 +908,7 @@ Button arm3
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm2
Attributes
@@ -916,10 +918,10 @@ Button arm2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 149
y coordinate : 72
Width : 64
Height : 64
x coordinate : 300
y coordinate : 152
Width : 141
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -937,7 +939,7 @@ Button arm2
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Max. Text Size : 40
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -960,6 +962,7 @@ Button arm2
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm4
Attributes
@@ -969,10 +972,10 @@ Button arm4
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 329
y coordinate : 72
Width : 64
Height : 64
x coordinate : 300
y coordinate : 266
Width : 141
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -990,7 +993,7 @@ Button arm4
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Max. Text Size : 40
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -1013,6 +1016,7 @@ Button arm4
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Timer tmSerial
Attributes
@@ -1106,8 +1110,12 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,",",10
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//numpad status
//icon color
spstr strCommand.txt,tTmp.txt,",",11
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,",",12
if(tTmp.txt!="disable")
{
vis b0,1
@@ -1123,6 +1131,15 @@ Timer tmSerial
vis b10,1
vis tCode,1
}
//flashing status
spstr strCommand.txt,tTmp.txt,",",13
if(tTmp.txt=="enable")
{
tmFlash.en=1
}else
{
tmFlash.en=0
}
}
if(tInstruction.txt=="time")
{
@@ -1221,6 +1238,25 @@ Timer tmSleep
}
}
Timer tmFlash
Attributes
ID : 35
Scope : local
Period (ms): 600
Enabled : no
Events
Timer Event
if(tIcon.isbr==1)
{
tIcon.isbr=0
vis tIcon,0
}else
{
tIcon.isbr=1
vis tIcon,1
}
TouchCap tc0
Attributes
ID : 12

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
@@ -103,28 +107,28 @@ Variable (string) entn1
ID : 49
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) entn2
Attributes
ID : 50
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) entn3
Attributes
ID : 51
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) entn4
Attributes
ID : 52
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Text tHeading
Attributes
@@ -533,6 +537,106 @@ Picture p0
Effect Time : 300
Picture ID : 0
Slider hSlider1
Attributes
ID : 54
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 275
y coordinate : 77
Width : 150
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Slider hSlider2
Attributes
ID : 55
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
y coordinate : 133
Width : 150
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Slider hSlider3
Attributes
ID : 56
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
y coordinate : 187
Width : 150
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Slider hSlider4
Attributes
ID : 57
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 275
y coordinate : 243
Width : 150
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Button bDown1
Attributes
ID : 11
@@ -1809,6 +1913,7 @@ Timer tmSerial
vis tEntity1,0
vis tIcon1,0
vis bText1,0
vis hSlider1,0
}else
{
// change icon
@@ -1831,6 +1936,7 @@ Timer tmSerial
vis bDown1,1
vis btOnOff1,0
vis bText1,0
vis hSlider1,0
}
if(type1.txt=="light")
{
@@ -1839,6 +1945,7 @@ Timer tmSerial
vis bDown1,0
vis btOnOff1,1
vis bText1,0
vis hSlider1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6
covx tTmp.txt,sys0,0,0
@@ -1851,6 +1958,7 @@ Timer tmSerial
vis bDown1,0
vis btOnOff1,1
vis bText1,0
vis hSlider1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",6
covx tTmp.txt,sys0,0,0
@@ -1864,6 +1972,7 @@ Timer tmSerial
vis btOnOff1,0
vis bText1,1
tsw bText1,0
vis hSlider1,0
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
@@ -1877,12 +1986,24 @@ Timer tmSerial
vis btOnOff1,0
vis bText1,1
tsw bText1,1
vis hSlider1,0
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,",",6
}
// id2
if(type1.txt=="number")
{
vis bUp1,0
vis bStop1,0
vis bDown1,0
vis btOnOff1,0
vis bText1,0
tsw bText1,0
vis hSlider1,1
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,",",6
}
// get Type
spstr strCommand.txt,type2.txt,",",7
// get internal name
@@ -1896,9 +2017,10 @@ Timer tmSerial
vis tEntity2,0
vis tIcon2,0
vis bText2,0
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
@@ -1918,6 +2040,7 @@ Timer tmSerial
vis bDown2,1
vis btOnOff2,0
vis bText2,0
vis hSlider2,0
}
if(type2.txt=="light")
{
@@ -1926,6 +2049,7 @@ Timer tmSerial
vis bDown2,0
vis btOnOff2,1
vis bText2,0
vis hSlider2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",12
covx tTmp.txt,sys0,0,0
@@ -1938,6 +2062,7 @@ Timer tmSerial
vis bDown2,0
vis btOnOff2,1
vis bText2,0
vis hSlider2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,",",12
covx tTmp.txt,sys0,0,0
@@ -1951,6 +2076,7 @@ Timer tmSerial
vis btOnOff2,0
vis bText2,1
tsw bText2,0
vis hSlider2,0
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
@@ -1964,12 +2090,24 @@ Timer tmSerial
vis btOnOff2,0
vis bText2,1
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
@@ -1983,9 +2121,10 @@ Timer tmSerial
vis tEntity3,0
vis tIcon3,0
vis bText3,0
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
@@ -2005,14 +2144,16 @@ Timer tmSerial
vis bDown3,1
vis btOnOff3,0
vis bText3,0
vis hSlider3,0
}
if(type3.txt=="light")
{
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
covx tTmp.txt,sys0,0,0
@@ -2023,8 +2164,9 @@ 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
covx tTmp.txt,sys0,0,0
@@ -2038,6 +2180,7 @@ Timer tmSerial
vis btOnOff3,0
vis bText3,1
tsw bText3,0
vis hSlider3,0
bText3.pco=65535
bText3.pco2=65535
// get Text (optional Value)
@@ -2051,12 +2194,24 @@ Timer tmSerial
vis btOnOff3,0
vis bText3,1
tsw bText3,1
vis hSlider3,0
bText3.pco=1374
bText3.pco2=1374
// 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
@@ -2070,9 +2225,10 @@ Timer tmSerial
vis tEntity4,0
vis tIcon4,0
vis bText4,0
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
@@ -2092,14 +2248,16 @@ Timer tmSerial
vis bDown4,1
vis btOnOff4,0
vis bText4,0
vis hSlider4,0
}
if(type4.txt=="light")
{
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
covx tTmp.txt,sys0,0,0
@@ -2110,8 +2268,9 @@ 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
covx tTmp.txt,sys0,0,0
@@ -2125,6 +2284,7 @@ Timer tmSerial
vis btOnOff4,0
vis bText4,1
tsw bText4,0
vis hSlider4,0
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
@@ -2138,11 +2298,24 @@ Timer tmSerial
vis btOnOff4,0
vis bText4,1
tsw bText4,1
vis hSlider4,0
bText4.pco=1374
bText4.pco2=1374
// 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")
{

View File

@@ -83,28 +83,28 @@ Variable (string) entn1
ID : 18
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) entn2
Attributes
ID : 19
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) entn3
Attributes
ID : 20
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) entn4
Attributes
ID : 21
Scope : local
Text :
Max. Text Size: 50
Max. Text Size: 70
Variable (string) type5
Attributes

View File

@@ -25,6 +25,7 @@ Page cardMedia
vis tInstruction,0
vis tTmp,0
vis tId,0
vis t5,0
//vis nPageDisp,0
Variable (string) strCommand
@@ -32,7 +33,7 @@ Variable (string) strCommand
ID : 7
Scope : local
Text :
Max. Text Size: 200
Max. Text Size: 500
Variable (string) entn
Attributes
@@ -41,6 +42,19 @@ Variable (string) entn
Text :
Max. Text Size: 50
Variable (string) vaSpeakerList
Attributes
ID : 27
Scope : local
Text :
Max. Text Size: 200
Variable (int32) vaSpeakerPos
Attributes
ID : 28
Scope: local
Value: 0
Text tSend
Attributes
ID : 2
@@ -52,7 +66,7 @@ Text tSend
x coordinate : 0
y coordinate : 0
Width : 230
Height : 23
Height : 15
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -65,8 +79,8 @@ Text tSend
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Text :
Max. Text Size : 200
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -79,9 +93,9 @@ Text tTmp
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 406
y coordinate : 277
Width : 34
x coordinate : 450
y coordinate : 145
Width : 27
Height : 30
Effect : load
Effect Priority : 0
@@ -109,10 +123,10 @@ Text tInstruction
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 290
x coordinate : 296
y coordinate : 0
Width : 100
Height : 30
Height : 20
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -139,9 +153,9 @@ Text tId
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 99
y coordinate : 290
Width : 39
x coordinate : 449
y coordinate : 187
Width : 30
Height : 30
Effect : load
Effect Priority : 0
@@ -259,8 +273,8 @@ Text t2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 314
y coordinate : 159
x coordinate : 306
y coordinate : 145
Width : 50
Height : 50
Effect : load
@@ -309,7 +323,7 @@ Text tPlayPause
Send Component ID : disabled
Opacity : 127
x coordinate : 203
y coordinate : 159
y coordinate : 145
Width : 50
Height : 50
Effect : load
@@ -357,8 +371,8 @@ Text t0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 92
y coordinate : 159
x coordinate : 96
y coordinate : 145
Width : 50
Height : 50
Effect : load
@@ -437,7 +451,7 @@ Text t1
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 222
y coordinate : 201
Width : 50
Height : 50
Effect : load
@@ -487,7 +501,7 @@ Text t3
Send Component ID : disabled
Opacity : 127
x coordinate : 397
y coordinate : 222
y coordinate : 201
Width : 50
Height : 50
Effect : load
@@ -528,6 +542,176 @@ Text t3
prints tSend.txt,0
prints crcval,2
Text t4
Attributes
ID : 24
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 21
y coordinate : 262
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 2
Back. Color : 6371
Font Color : 50712
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSpeaker
Attributes
ID : 25
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 94
y coordinate : 262
Width : 267
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="speaker-sel,"+tSpeaker.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t6
Attributes
ID : 26
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 381
y coordinate : 262
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 2
Back. Color : 6371
Font Color : 50712
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
//speaker
tSpeaker.pco=65535
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
vaSpeakerPos.val+=1
if(tSpeaker.txt=="")
{
vaSpeakerPos.val=0
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
}
Text t5
Attributes
ID : 29
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 397
y coordinate : 145
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 2
Back. Color : 6371
Font Color : 50712
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-OnOff"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Picture p0
Attributes
ID : 1
@@ -554,7 +738,7 @@ Slider hVolume
Send Component ID : disabled
Opacity : 127
x coordinate : 59
y coordinate : 227
y coordinate : 206
Width : 335
Height : 43
Effect : load
@@ -573,7 +757,7 @@ Slider hVolume
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=100
tmCooldown.tim=800
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
@@ -759,6 +943,32 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,"|",7
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tPlayPause.txt,sys0,1
//speaker current
spstr strCommand.txt,tSpeaker.txt,"|",8
if(tSpeaker.txt!="")
{
tSpeaker.pco=1374
}else
{
tSpeaker.pco=65535
}
//speaker list
spstr strCommand.txt,vaSpeakerList.txt,"|",9
if(vaSpeakerList.txt=="")
{
vis t6,0
}
vaSpeakerPos.val=0
// on off button
spstr strCommand.txt,tTmp.txt,"|",10
if(tTmp.txt=="disable")
{
vis t5,0
}else
{
vis t5,1
covx tTmp.txt,t5.pco,0,0
}
}
if(tInstruction.txt=="time")
{

View File

@@ -22,41 +22,41 @@ popupNotify
17 Component(s)
179 Line(s) of event code
118 Unique line(s) of event code
cardEntities
58 Component(s)
824 Line(s) of event code
346 Unique line(s) of event code
cardMedia
30 Component(s)
278 Line(s) of event code
139 Unique line(s) of event code
pageStartup
19 Component(s)
150 Line(s) of event code
113 Unique line(s) of event code
cardAlarm
35 Component(s)
253 Line(s) of event code
160 Unique line(s) of event code
popupLight
27 Component(s)
323 Line(s) of event code
173 Unique line(s) of event code
cardGrid
39 Component(s)
378 Line(s) of event code
219 Unique line(s) of event code
cardThermo
42 Component(s)
406 Line(s) of event code
218 Unique line(s) of event code
cardEntities
54 Component(s)
752 Line(s) of event code
330 Unique line(s) of event code
cardMedia
24 Component(s)
222 Line(s) of event code
116 Unique line(s) of event code
cardGrid
39 Component(s)
378 Line(s) of event code
219 Unique line(s) of event code
popupLight
27 Component(s)
323 Line(s) of event code
174 Unique line(s) of event code
screensaver
26 Component(s)
176 Line(s) of event code
127 Unique line(s) of event code
31 Component(s)
183 Line(s) of event code
133 Unique line(s) of event code
cardAlarm
36 Component(s)
277 Line(s) of event code
173 Unique line(s) of event code
Total
13 Page(s)
334 Component(s)
3089 Line(s) of event code
817 Unique line(s) of event code
350 Component(s)
3248 Line(s) of event code
869 Unique line(s) of event code

View File

@@ -72,8 +72,8 @@ Text tIcons
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text : 
Max. Text Size : 120
Text : 
Max. Text Size : 150
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0

View File

@@ -402,7 +402,7 @@ Text tVersion
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 19
Text : 21
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0

View File

@@ -501,7 +501,7 @@ Slider hBrightness
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=200
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
@@ -546,7 +546,7 @@ Slider hTempSlider
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=200
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0

View File

@@ -41,8 +41,6 @@ Page screensaver
// clear weather elements, to keep example content in HMI
tMainIcon.txt=""
tMainText.txt=""
tMRIcon.txt=""
tMR.txt=""
tForecast1.txt=""
tF1Icon.txt=""
tForecast1Val.txt=""
@@ -67,7 +65,7 @@ Variable (string) strCommand
ID : 5
Scope : local
Text :
Max. Text Size: 100
Max. Text Size: 200
Variable (string) vaTime
Attributes
@@ -85,11 +83,17 @@ Variable (string) vaDate
Variable (string) tId
Attributes
ID : 24
ID : 22
Scope : local
Text :
Max. Text Size: 25
Variable (int32) vaTap
Attributes
ID : 30
Scope: local
Value: 0
Number originPage
Attributes
ID : 3
@@ -145,7 +149,7 @@ Text tInstruction
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -175,7 +179,7 @@ Text tTmp
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -278,9 +282,9 @@ Text tMainIcon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 223
Width : 100
x coordinate : 26
y coordinate : 202
Width : 70
Height : 66
Effect : load
Effect Priority : 0
@@ -308,8 +312,8 @@ Text tMainText
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 114
y coordinate : 214
x coordinate : 7
y coordinate : 267
Width : 110
Height : 43
Effect : load
@@ -330,7 +334,7 @@ Text tMainText
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMRIcon
Text tForecast1
Attributes
ID : 15
Scope : local
@@ -338,69 +342,9 @@ Text tMRIcon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 268
Width : 40
Height : 35
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMR
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 157
y coordinate : 275
Width : 67
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 0 mm
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tForecast1
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 228
x coordinate : 128
y coordinate : 210
Width : 108
Width : 72
Height : 26
Effect : load
Effect Priority : 0
@@ -422,15 +366,15 @@ Text tForecast1
Text tForecast1Val
Attributes
ID : 18
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 228
x coordinate : 126
y coordinate : 277
Width : 108
Width : 72
Height : 26
Effect : load
Effect Priority : 0
@@ -452,13 +396,13 @@ Text tForecast1Val
Text tF1Icon
Attributes
ID : 19
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 262
x coordinate : 146
y coordinate : 239
Width : 40
Height : 35
@@ -482,15 +426,15 @@ Text tF1Icon
Text tForecast2
Attributes
ID : 20
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 341
x coordinate : 212
y coordinate : 210
Width : 107
Width : 72
Height : 25
Effect : load
Effect Priority : 0
@@ -512,16 +456,16 @@ Text tForecast2
Text tF2Icon
Attributes
ID : 21
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 375
y coordinate : 238
x coordinate : 228
y coordinate : 239
Width : 40
Height : 33
Height : 35
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -542,15 +486,15 @@ Text tF2Icon
Text tForecast2Val
Attributes
ID : 22
ID : 20
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 341
x coordinate : 212
y coordinate : 277
Width : 107
Width : 72
Height : 25
Effect : load
Effect Priority : 0
@@ -572,7 +516,7 @@ Text tForecast2Val
Text t10
Attributes
ID : 23
ID : 21
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -602,7 +546,7 @@ Text t10
Text tAMPM
Attributes
ID : 25
ID : 23
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -630,6 +574,186 @@ Text tAMPM
Horizontal Spacing : 0
Vertical Spacing : 0
Text tForecast3Val
Attributes
ID : 24
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 292
y coordinate : 277
Width : 71
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tF3Icon
Attributes
ID : 25
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 309
y coordinate : 239
Width : 40
Height : 35
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tForecast3
Attributes
ID : 26
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 293
y coordinate : 210
Width : 72
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tForecast4
Attributes
ID : 27
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 374
y coordinate : 210
Width : 72
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tF4Icon
Attributes
ID : 28
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 390
y coordinate : 239
Width : 40
Height : 35
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tForecast4Val
Attributes
ID : 29
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 374
y coordinate : 277
Width : 72
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 0
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
@@ -742,28 +866,38 @@ Timer tmSerial
substr pageIcons.tIcons.txt,tMainIcon.txt,sys0,1
//tMainText
spstr strCommand.txt,tMainText.txt,"?",2
//tMRIcon
spstr strCommand.txt,tTmp.txt,"?",3
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMRIcon.txt,sys0,1
//tMR
spstr strCommand.txt,tMR.txt,"?",4
//tForecast1
spstr strCommand.txt,tForecast1.txt,"?",5
spstr strCommand.txt,tForecast1.txt,"?",3
//tF1Icon
spstr strCommand.txt,tTmp.txt,"?",6
spstr strCommand.txt,tTmp.txt,"?",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF1Icon.txt,sys0,1
//tForecast1Val
spstr strCommand.txt,tForecast1Val.txt,"?",7
spstr strCommand.txt,tForecast1Val.txt,"?",5
//tForecast2
spstr strCommand.txt,tForecast2.txt,"?",8
spstr strCommand.txt,tForecast2.txt,"?",6
//tF2Icon
spstr strCommand.txt,tTmp.txt,"?",9
spstr strCommand.txt,tTmp.txt,"?",7
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF2Icon.txt,sys0,1
//tForecast2Val
spstr strCommand.txt,tForecast2Val.txt,"?",10
spstr strCommand.txt,tForecast2Val.txt,"?",8
//tForecast3
spstr strCommand.txt,tForecast3.txt,"?",9
//tF3Icon
spstr strCommand.txt,tTmp.txt,"?",10
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF3Icon.txt,sys0,1
//tForecast3Val
spstr strCommand.txt,tForecast3Val.txt,"?",11
//tForecast4
spstr strCommand.txt,tForecast4.txt,"?",12
//tF4Icon
spstr strCommand.txt,tTmp.txt,"?",13
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF4Icon.txt,sys0,1
//tForecast4Val
spstr strCommand.txt,tForecast4Val.txt,"?",14
}
if(tInstruction.txt=="pageType")
{
@@ -836,7 +970,10 @@ TouchCap tc0
Events
Touch Press Event
tSend.txt="event,buttonPress2,screensaver,bExit"
dim=100
vaTap.val+=1
covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC

Binary file not shown.

Binary file not shown.

View File

@@ -298,8 +298,9 @@ nspanel-1:
heading: Exmaple Thermostat
item: climate.example_climate
- type: cardMedia
heading: Exampe Media
item: media_player.spotify_user
- type: cardAlarm
item: alarm_control_panel.alarmo
```
key | optional | type | default | description
@@ -324,6 +325,9 @@ key | optional | type | default | description
`weather` | True | string | `weather.example` | weather entity from homeassistant
`weatherOverrideForecast1` | True | string | `None` | sensor entity from home assistant here to override the first weather forecast item on the screensaver
`weatherOverrideForecast2` | True | string | `None` | sensor entity from home assistant here to override the second weather forecast item on the screensaver
`weatherOverrideForecast3` | True | string | `None` | sensor entity from home assistant here to override the third weather forecast item on the screensaver
`weatherOverrideForecast4` | True | string | `None` | sensor entity from home assistant here to override the forth weather forecast item on the screensaver
`doubleTapToUnlock` | True | boolean | `False` | requires to tap screensaver two times
`pages` | False | complex | | configuration for pages on panel
#### Schedule screensaver brightness
@@ -372,13 +376,9 @@ HACS will show you that there is an update avalible and ask you to update.
### Update Display Firmware
Use the following command to update or use your own webserver. FlashNextionFast will use Nextion Upload Protocol 1.2 and try to skip unchanged parts of the firmware.
Use the following command to update or use your own webserver.
`FlashNextionFast http://nspanel.pky.eu/lui.tft`
In case this Update failes, reboot tasmota and use the following command:
`FlashNextion http://nspanel.pky.eu/lui.tft`
`FlashNextion http://nspanel.pky.eu/lui-release.tft`
### Update Tasmota Berry Driver
@@ -407,4 +407,23 @@ Reboot Tasmota and try to flash it a second time.
Please check your MQTT Topics in your apps.yaml and your mqtt configuration on tasmota.
### How to upgrade from a release to the current development version
1. Update App in HACS to main
Click redownload in the menu of the app in HACS.
Select main version.
![hacs-main](doc-pics/hacs-main.png)
**Wait for it to load, dropdown needs to be selectable again**
Click download.
2. Restart AppDaemon
3. Flash current Development Firmware in Tasmota Console.
`FlashNextion http://nspanel.pky.eu/lui.tft`

View File

@@ -54,5 +54,6 @@ nspanel-1:
heading: Exmaple Thermostat
item: climate.example_climate
- type: cardMedia
heading: Exampe Media
item: media_player.spotify_user
- type: cardAlarm
item: alarm_control_panel.alarmo

View File

@@ -110,6 +110,9 @@ class LuiBackendConfig(object):
'weather': 'weather.example',
'weatherOverrideForecast1': None,
'weatherOverrideForecast2': None,
'weatherOverrideForecast3': None,
'weatherOverrideForecast4': None,
'doubleTapToUnlock': False,
'pages': [{
'type': 'cardEntities',
'heading': 'Test Entities 1',

View File

@@ -126,8 +126,12 @@ class LuiController(object):
def button_press(self, entity_id, button_type, value):
LOGGER.info(f"Button Press Event; entity_id: {entity_id}; button_type: {button_type}; value: {value} ")
# internal buttons
if entity_id == "screensaver" and button_type == "enter":
self._pages_gen.render_page(self._current_page)
if entity_id == "screensaver" and button_type == "bExit":
if self._config.get("doubleTapToUnlock") and int(value) >= 2:
self._pages_gen.render_page(self._current_page)
elif not self._config.get("doubleTapToUnlock"):
self._pages_gen.render_page(self._current_page)
return
if button_type == "bExit":
self._pages_gen.render_page(self._current_page)
@@ -178,13 +182,18 @@ class LuiController(object):
self._ha_api.get_entity(entity_id).call_service("media_previous_track")
if button_type == "media-pause":
self._ha_api.get_entity(entity_id).call_service("media_play_pause")
if button_type == "hvac_action":
self._ha_api.get_entity(entity_id).call_service("set_hvac_mode", hvac_mode=value)
if button_type == "media-OnOff":
if player.state == "off":
self._ha_api.get_entity(entity_id).call_service("turn_on")
else:
self._ha_api.get_entity(entity_id).call_service("turn_off")
if button_type == "volumeSlider":
pos = int(value)
# HA wants this value between 0 and 1 as float
pos = pos/100
self._ha_api.get_entity(entity_id).call_service("volume_set", volume_level=pos)
if button_type == "speaker-sel":
self._ha_api.get_entity(entity_id).call_service("select_source", source=value)
# for light detail page
if button_type == "brightnessSlider":
@@ -207,3 +216,9 @@ class LuiController(object):
if button_type == "tempUpd":
temp = int(value)/10
self._ha_api.get_entity(entity_id).call_service("set_temperature", temperature=temp)
if button_type == "hvac_action":
self._ha_api.get_entity(entity_id).call_service("set_hvac_mode", hvac_mode=value)
# for alarm page
if button_type in ["disarm", "arm_home", "arm_away", "arm_night", "arm_vacation"]:
self._ha_api.get_entity(entity_id).call_service(f"alarm_{button_type}", code=value)

View File

@@ -42,3 +42,7 @@ def rgb_dec565(rgb_color):
# take in the red, green and blue values (0-255) as 8 bit values and then combine
# and shift them to make them a 16 bit dec value in 565 format.
return ((int(red / 255 * 31) << 11) | (int(green / 255 * 63) << 5) | (int(blue / 255 * 31)))
def get_attr_safe(entity, attr, default):
res = entity.attributes.get(attr, default) if not None else default
return res

View File

@@ -38,6 +38,11 @@ icons = {
'door-open': 36,
'door-closed': 37,
'window-closed': 38,
'shield-off': 39,
'shield': 40,
'shield-lock': 41,
'shield-airplane': 42,
'bell-ring': 43,
}
def get_icon_id(ma_name):

View File

@@ -7,6 +7,13 @@ translations = {
'fan': "Waaier",
'idle': "Onaktief",
'off': "Af",
'arm_away': "Bewapen weg",
'arm_custom_bypass': "Pasgemaakte omseil",
'arm_home': "Bewapen Huis",
'arm_night': "Nag alarm",
'clear_code': "Maak skoon",
'code': "Kode",
'disarm': "Skakel Af",
},
'ca_ES': {
'PRESS': "Prem",
@@ -17,6 +24,14 @@ translations = {
'fan': "Ventilació",
'idle': "Inactiu",
'off': "OFF",
'arm_away': "Activar, fora",
'arm_custom_bypass': "Bypass personalitzat",
'arm_home': "Activar, a casa",
'arm_night': "Activar, nocturn",
'arm_vacation': "Activa en mode vacances",
'clear_code': "Borrar",
'code': "Codi",
'disarm': "Desactivar",
},
'cs_CZ': {
'PRESS': "Stisknutí",
@@ -27,10 +42,21 @@ translations = {
'fan': "Ventilátor",
'idle': "Nečinný",
'off': "Vypnuto",
'arm_away': "Aktivovat režim nepřítomnost",
'arm_custom_bypass': "Vlastní obejítí",
'arm_home': "Aktivovat režim domov",
'arm_night': "Aktivovat noční režim",
'arm_vacation': "Aktivovat režim dovolená",
'clear_code': "Zrušit",
'code': "Kód",
'disarm': "Odbezpečit",
},
'cy_GB': {
'ACTIVATE': "Actifadu",
'off': "I ffwrdd",
'arm_custom_bypass': "Ffordd osgoi personol",
'arm_night': "Larwm nos",
'code': "Cod dilysu dwy-ffactor",
},
'da_DK': {
'PRESS': "Tryk",
@@ -41,6 +67,14 @@ translations = {
'fan': "Blæser",
'idle': "Inaktiv",
'off': "Fra",
'arm_away': "Tilkobl ude",
'arm_custom_bypass': "Brugerdefineret bypass",
'arm_home': "Tilkobl hjemme",
'arm_night': "Tilkoblet nat",
'arm_vacation': "Tilkobl ferie",
'clear_code': "Ryd",
'code': "Kode",
'disarm': "Frakobl",
},
'de_DE': {
'PRESS': "Drücken",
@@ -51,8 +85,14 @@ translations = {
'fan': "Ventilator",
'idle': "Leerlauf",
'off': "Aus",
},
'en_GB': {
'arm_away': "Aktivieren - Unterwegs",
'arm_custom_bypass': "Benutzerdefinierter Bypass",
'arm_home': "Aktivieren - Zuhause",
'arm_night': "Aktivieren - Nacht",
'arm_vacation': "Aktiviere Urlaub",
'clear_code': "Löschen",
'code': "Code",
'disarm': "Deaktivieren",
},
'en_US': {
'PRESS': "Press",
@@ -63,6 +103,14 @@ translations = {
'fan': "Fan",
'idle': "Idle",
'off': "Off",
'arm_away': "Arm away",
'arm_custom_bypass': "Custom bypass",
'arm_home': "Arm home",
'arm_night': "Arm night",
'arm_vacation': "Arm vacation",
'clear_code': "Clear",
'code': "Code",
'disarm': "Disarm",
},
'es_ES': {
'PRESS': "Pulsa",
@@ -73,6 +121,14 @@ translations = {
'fan': "Ventilador",
'idle': "Inactivo",
'off': "Apagado",
'arm_away': "Armar ausente",
'arm_custom_bypass': "Bypass personalizada",
'arm_home': "Armar en casa",
'arm_night': "Armar noche",
'arm_vacation': "Armar por vacaciones",
'clear_code': "Limpiar",
'code': "Código",
'disarm': "Desarmar",
},
'et_EE': {
'PRESS': "Vajuta nuppu",
@@ -83,10 +139,20 @@ translations = {
'fan': "Ventilaator",
'idle': "Ootel",
'off': "Väljas",
'arm_away': "Valvesta eemal",
'arm_custom_bypass': "Eranditega",
'arm_home': "Valvesta kodus",
'arm_night': "Valvesta öine",
'arm_vacation': "Valvesta puhkuse režiimis",
'clear_code': "Puhasta",
'code': "Kood",
'disarm': "Valvest maha",
},
'eu_ES': {
'ACTIVATE': "Aktibatu",
'off': "Itzalita",
'clear_code': "Garbitu",
'code': "Kodea",
},
'fi_FI': {
'PRESS': "Paina",
@@ -97,6 +163,14 @@ translations = {
'fan': "Tuuletin",
'idle': "Lepotilassa",
'off': "Pois",
'arm_away': "Viritä (poissa)",
'arm_custom_bypass': "Mukautettu ohitus",
'arm_home': "Viritä (kotona)",
'arm_night': "Viritä yöksi",
'arm_vacation': "Aktivoi lomatila",
'clear_code': "Tyhjennä",
'code': "Koodi",
'disarm': "Poista hälytys",
},
'fr_FR': {
'PRESS': "Appui",
@@ -107,6 +181,14 @@ translations = {
'fan': "Ventilateur",
'idle': "Inactif",
'off': "Off",
'arm_away': "Armer (absent)",
'arm_custom_bypass': "Bypass personnalisé",
'arm_home': "Armer (présent)",
'arm_night': "Armer nuit",
'arm_vacation': "Armer vacances",
'clear_code': "Effacer",
'code': "Code",
'disarm': "Désarmer",
},
'fy_DE': {
'off': "Út",
@@ -122,6 +204,13 @@ translations = {
'fan': "Ventilator",
'idle': "Neaktivan",
'off': "Isključen",
'arm_away': "Aktiviran odsutno",
'arm_custom_bypass': "Prilagođena premosnica",
'arm_home': "Aktiviran doma",
'arm_night': "Aktiviran nočni",
'clear_code': "Vedro",
'code': "Kod",
'disarm': "Deaktiviraj",
},
'id_ID': {
'PRESS': "Tekan",
@@ -132,6 +221,14 @@ translations = {
'fan': "Kipas",
'idle': "Diam",
'off': "Mati",
'arm_away': "Aktifkan utk keluar",
'arm_custom_bypass': "Diaktifkan khusus",
'arm_home': "Aktifkan utk di rumah",
'arm_night': "Aktifkan utk malam",
'arm_vacation': "Aktifkan utk liburan",
'clear_code': "Hapus",
'code': "Kode",
'disarm': "Nonaktifkan",
},
'is_IS': {
'PRESS': "Ýttu á",
@@ -141,6 +238,14 @@ translations = {
'fan': "Vifta",
'idle': "Aðgerðalaus",
'off': "Slökkt",
'arm_away': "Vörður úti",
'arm_custom_bypass': "Sérsniðin hjáleið",
'arm_home': "Vörður heima",
'arm_night': "Vörður nótt",
'arm_vacation': "Vörður frí",
'clear_code': "Hreinsa",
'code': "Kóði",
'disarm': "Taka af verði",
},
'it_IT': {
'PRESS': "Premi",
@@ -151,6 +256,14 @@ translations = {
'fan': "Ventilatore",
'idle': "Inattivo",
'off': "Spento",
'arm_away': "Attiva fuori casa",
'arm_custom_bypass': "Bypass personalizzato",
'arm_home': "Attiva in casa",
'arm_night': "Attiva notte",
'arm_vacation': "Attiva in vacanza",
'clear_code': "Canc",
'code': "Codice",
'disarm': "Disattiva",
},
'nl_NL': {
'PRESS': "Klik",
@@ -161,6 +274,14 @@ translations = {
'fan': "Ventilator",
'idle': "Inactief",
'off': "Uit",
'arm_away': "Inschakelen voor vertrek",
'arm_custom_bypass': "Inschakelen met overbrugging",
'arm_home': "Inschakelen voor thuis",
'arm_night': "Inschakelen voor 's nachts",
'arm_vacation': "Inschakelen voor vakantie",
'clear_code': "Wis",
'code': "Code",
'disarm': "Uitschakelen",
},
'nn_NO': {
'ACTIVATE': "Aktiver",
@@ -170,6 +291,14 @@ translations = {
'fan': "Vifte",
'idle': "Tomgang",
'off': "Av",
'arm_away': "Bortemodus",
'arm_custom_bypass': "Tilpassa bypass",
'arm_home': "Heimemodus",
'arm_night': "Aktiver natt",
'arm_vacation': "Armert feriemodus",
'clear_code': "Slett alt",
'code': "Kode",
'disarm': "Skru av",
},
'pt_PT': {
'PRESS': "Pressione",
@@ -180,6 +309,13 @@ translations = {
'fan': "Ventoinha",
'idle': "Em espera",
'off': "Desligado",
'arm_away': "Armado ausente",
'arm_custom_bypass': "Desvio personalizado",
'arm_home': "Armado casa",
'arm_night': "Armado noite",
'clear_code': "Apagar",
'code': "Código",
'disarm': "Desarmar",
},
'sr_RS': {
'PRESS': "Pritisnite taster",
@@ -195,6 +331,14 @@ translations = {
'fan': "Fläkt",
'idle': "Inaktiv",
'off': "Av",
'arm_away': "Larma bortaläge",
'arm_custom_bypass': "Larm förbikopplat",
'arm_home': "Larma hemmaläge",
'arm_night': "Larma nattläge",
'arm_vacation': "Larma semesterläge",
'clear_code': "Rensa",
'code': "Kod",
'disarm': "Larma från",
},
}

View File

@@ -3,7 +3,7 @@ import datetime
from icon_mapping import get_icon_id
from icons import get_icon_id_ha
from helper import scale, rgb_dec565, rgb_brightness
from helper import scale, rgb_dec565, rgb_brightness, get_attr_safe
from localization import get_translation
# check Babel
@@ -68,61 +68,35 @@ class LuiPagesGen(object):
icon_cur = get_icon_id_ha("weather", state=we.state)
text_cur = f"{we.attributes.temperature}{unit}"
icon_cur_detail = get_icon_id("water-percent")
text_cur_detail = f"{we.attributes.humidity} %"
wOF1 = self._config.get("weatherOverrideForecast1")
if wOF1 is None:
up1 = we.attributes.forecast[0]['datetime']
up1 = datetime.datetime.fromisoformat(up1)
if babel_spec is not None:
up1 = babel.dates.format_date(up1, "E", locale=self._locale)
weather_res = ""
for i in range(1,5):
wOF = self._config.get(f"weatherOverrideForecast{i}")
if wOF is None:
up = we.attributes.forecast[i-1]['datetime']
up = datetime.datetime.fromisoformat(up)
if babel_spec is not None:
up = babel.dates.format_date(up, "E", locale=self._locale)
else:
up = up.strftime("%a")
icon = get_icon_id_ha("weather", state=we.attributes.forecast[i-1]['condition'])
down = f"{we.attributes.forecast[i-1]['temperature']} {unit}"
else:
up1 = up1.strftime("%a")
icon1 = get_icon_id_ha("weather", state=we.attributes.forecast[0]['condition'])
down1 = f"{we.attributes.forecast[0]['temperature']} {unit}"
else:
LOGGER.info(f"Forecast 1 is overrriden with {wOF1}")
icon = None
name = None
if type(wOF1) is dict:
icon = next(iter(wOF1.items()))[1].get('icon')
name = next(iter(wOF1.items()))[1].get('name')
wOF1 = next(iter(wOF1.items()))[0]
entity = self._ha_api.get_entity(wOF1)
up1 = name if name is not None else entity.attributes.friendly_name
icon1 = get_icon_id_ha("sensor", state=entity.state, device_class=entity.attributes.get("device_class", ""), overwrite=icon)
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
down1 = f"{entity.state} {unit_of_measurement}"
LOGGER.info(f"Forecast 1 is overrriden with {wOF}")
icon = None
name = None
if type(wOF) is dict:
icon = next(iter(wOF.items()))[1].get('icon')
name = next(iter(wOF.items()))[1].get('name')
wOF = next(iter(wOF.items()))[0]
entity = self._ha_api.get_entity(wOF)
up = name if name is not None else entity.attributes.friendly_name
icon = get_icon_id_ha("sensor", state=entity.state, device_class=entity.attributes.get("device_class", ""), overwrite=icon)
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
down = f"{entity.state} {unit_of_measurement}"
weather_res+=f"?{up}?{icon}?{down}"
wOF2 = self._config.get("weatherOverrideForecast2")
if wOF2 is None:
up2 = we.attributes.forecast[1]['datetime']
up2 = datetime.datetime.fromisoformat(up2)
if babel_spec is not None:
up2 = babel.dates.format_date(up2, "E", locale=self._locale)
else:
up2 = up2.strftime("%a")
icon2 = get_icon_id_ha("weather", state=we.attributes.forecast[1]['condition'])
down2 = f"{we.attributes.forecast[1]['temperature']} {unit}"
else:
LOGGER.info(f"Forecast 2 is overrriden with {wOF2}")
icon = None
name = None
if type(wOF2) is dict:
icon = next(iter(wOF2.items()))[1].get('icon')
name = next(iter(wOF2.items()))[1].get('name')
wOF2 = next(iter(wOF2.items()))[0]
entity = self._ha_api.get_entity(wOF2)
up2 = name if name is not None else entity.attributes.friendly_name
icon2 = get_icon_id_ha("sensor", state=entity.state, device_class=entity.attributes.get("device_class", ""), overwrite=icon)
unit_of_measurement = entity.attributes.get("unit_of_measurement", "")
down2 = f"{entity.state} {unit_of_measurement}"
self._send_mqtt_msg(f"weatherUpdate,?{icon_cur}?{text_cur}?{icon_cur_detail}?{text_cur_detail}?{up1}?{icon1}?{down1}?{up2}?{icon2}?{down2}")
self._send_mqtt_msg(f"weatherUpdate,?{icon_cur}?{text_cur}{weather_res}")
def generate_entities_item(self, item):
icon = None
@@ -141,9 +115,10 @@ class LuiPagesGen(object):
page_search = self._config.get_root_page().search_page_by_name(item)
if len(page_search) > 0:
page_data = page_search[0].data
name = page_data.get("heading")
if name is None:
name = page_data.get("heading")
text = get_translation(self._locale,"PRESS")
icon_id = get_icon_id(page_data.get("icon", "gesture-tap-button"))
icon_id = get_icon_id(icon) if icon is not None else get_icon_id(page_data.get("icon", "gesture-tap-button"))
return f",button,{item},{icon_id},17299,{name},{text}"
else:
return f",text,{item},{get_icon_id('alert-circle-outline')},17299,page not found,"
@@ -193,21 +168,22 @@ class LuiPagesGen(object):
self._send_mqtt_msg(command)
def generate_thermo_page(self, item):
if not self._ha_api.entity_exists(item):
command = f"entityUpd,{item},Not found,220,220,Not found,150,300,5"
else:
entity = self._ha_api.get_entity(item)
heading = entity.attributes.friendly_name
current_temp = int(entity.attributes.get("current_temperature", 0)*10)
dest_temp = int(entity.attributes.get("temperature", 0)*10)
status = entity.attributes.get("hvac_action", "")
current_temp = int(get_attr_safe(entity, "current_temperature", 0)*10)
dest_temp = int(get_attr_safe(entity, "temperature", 0)*10)
status = get_attr_safe(entity, "hvac_action", "")
status = get_translation(self._locale,status)
min_temp = int(entity.attributes.get("min_temp", 0)*10)
max_temp = int(entity.attributes.get("max_temp", 0)*10)
step_temp = int(entity.attributes.get("target_temp_step", 0.5)*10)
min_temp = int(get_attr_safe(entity, "min_temp", 0)*10)
max_temp = int(get_attr_safe(entity, "max_temp", 0)*10)
step_temp = int(get_attr_safe(entity, "target_temp_step", 0.5)*10)
icon_res = ""
hvac_modes = entity.attributes.get("hvac_modes", [])
hvac_modes = get_attr_safe(entity, "hvac_modes", [])
for mode in hvac_modes:
icon_id = get_icon_id('alert-circle-outline')
color_on = 64512
@@ -257,14 +233,89 @@ class LuiPagesGen(object):
entity = self._ha_api.get_entity(item)
heading = entity.attributes.friendly_name
icon = 0
title = entity.attributes.get("media_title", "")
author = entity.attributes.get("media_artist", "")
volume = int(entity.attributes.get("volume_level", 0)*100)
title = get_attr_safe(entity, "media_title", "")
author = get_attr_safe(entity, "media_artist", "")
volume = int(get_attr_safe(entity, "volume_level", 0)*100)
iconplaypause = get_icon_id("pause") if entity.state == "playing" else get_icon_id("play")
if "media_content_type" in entity.attributes:
if entity.attributes.media_content_type == "music":
icon = get_icon_id("music")
command = f"entityUpd,|{item}|{heading}|{icon}|{title}|{author}|{volume}|{iconplaypause}"
source = get_attr_safe(entity, "source", "")
speakerlist = get_attr_safe(entity, "source_list",[])
if source in speakerlist:
# move current source to the end of the list
speakerlist.remove(source)
speakerlist.append(source)
if len(speakerlist) == 1:
speakerlist = []
speakerlist = "?".join(speakerlist)
bits = entity.attributes.supported_features
onoffbutton = "disable"
if bits & 0b01000000:
if entity.state == "off":
onoffbutton = 1374
else:
onoffbutton = rgb_dec565([255,255,255])
command = f"entityUpd,|{item}|{heading}|{icon}|{title}|{author}|{volume}|{iconplaypause}|{source}|{speakerlist}|{onoffbutton}"
self._send_mqtt_msg(command)
def generate_alarm_page(self, item):
if not self._ha_api.entity_exists(item):
command = f"entityUpd,{item},Not found,Not found,Check your,Check your,apps.,apps.,yaml,yaml,0,,0"
else:
entity = self._ha_api.get_entity(item)
icon = get_icon_id("shield-off")
color = rgb_dec565([255,255,255])
supported_modes = []
numpad = "enable"
if entity.state == "disarmed":
color = rgb_dec565([13,160,53])
icon = get_icon_id("shield-off")
test = entity.attributes.get("code_arm_required", "false")
if not entity.attributes.get("code_arm_required", False):
numpad = "disable"
bits = entity.attributes.supported_features
if bits & 0b000001:
supported_modes.append("arm_home")
if bits & 0b000010:
supported_modes.append("arm_away")
if bits & 0b000100:
supported_modes.append("arm_night")
if bits & 0b100000:
supported_modes.append("arm_vacation")
else:
supported_modes.append("disarm")
if entity.state == "armed_home":
color = rgb_dec565([223,76,30])
icon = get_icon_id("shield-home")
if entity.state == "armed_away":
color = rgb_dec565([223,76,30])
icon = get_icon_id("shield-lock")
if entity.state == "armed_night":
color = rgb_dec565([223,76,30])
icon = get_icon_id("weather-night")
if entity.state == "armed_vacation":
color = rgb_dec565([223,76,30])
icon = get_icon_id("shield-airplane")
flashing = "disable"
if entity.state in ["arming", "pending"]:
color = rgb_dec565([243,179,0])
icon = get_icon_id("shield")
flashing = "enable"
if entity.state == "triggered":
color = rgb_dec565([223,76,30])
icon = get_icon_id("bell-ring")
flashing = "enable"
# add padding to arm buttons
arm_buttons = ""
for b in supported_modes:
arm_buttons += f",{get_translation(self._locale, b)},{b}"
if len(supported_modes) < 4:
arm_buttons += ","*((4-len(supported_modes))*2)
command = f"entityUpd,{item}{arm_buttons},{icon},{color},{numpad},{flashing}"
self._send_mqtt_msg(command)
def render_page(self, page, send_page_type=True):
@@ -282,6 +333,9 @@ class LuiPagesGen(object):
self.generate_thermo_page(page.data.get("item"))
if page_type == "cardMedia":
self.generate_media_page(page.data.get("item"))
if page_type == "cardAlarm":
self.generate_alarm_page(page.data.get("item"))
def generate_light_detail_page(self, entity):
entity = self._ha_api.get_entity(entity)
@@ -312,6 +366,7 @@ class LuiPagesGen(object):
self._send_mqtt_msg(f"entityUpdateDetail,{get_icon_id('lightbulb')},{icon_color},{switch_val},{brightness},{color_temp},{color}")
def generate_shutter_detail_page(self, entity):
entity = self._ha_api.get_entity(entity)
pos = 100-int(entity.attributes.get("current_position", 50))
self._send_mqtt_msg(f"entityUpdateDetail,{pos}")

View File

@@ -64,8 +64,8 @@ class NsPanelLovelaceUIManager(hass.Hass):
controller = LuiController(self, cfg, send_mqtt_msg)
desired_display_firmware_version = 19
desired_display_firmware_url = "http://nspanel.pky.eu/lovelace-ui/github/nspanel-v1.8.3.tft"
desired_display_firmware_version = 21
desired_display_firmware_url = "http://nspanel.pky.eu/lovelace-ui/github/nspanel-v1.9.1.tft"
desired_tasmota_driver_version = 3
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"

BIN
doc-pics/hacs-main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 321 KiB

View File

@@ -61,8 +61,9 @@ nspanel-1:
heading: Exmaple Thermostat
item: climate.example_climate
- type: cardMedia
heading: Exampe Media
item: media_player.spotify_user
- type: cardAlarm
item: alarm_control_panel.alarmo
```
key | optional | type | default | description

View File

@@ -62,16 +62,13 @@ var button2Page: PageEntities =
export const config: Config = {
panelRecvTopic: "mqtt.0.tele.WzDisplay.RESULT",
panelSendTopic: "mqtt.0.cmnd.WzDisplay.CustomSend",
leftEntity: "alias.0.Batterie.ACTUAL",
leftEntityIcon: 34,
leftEntityText: "Batterie",
leftEntityUnitText: "%",
rightEntity: "alias.0.Pv.ACTUAL",
rightEntityIcon: 32,
rightEntityText: "PV",
rightEntityUnitText: "W",
firstScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.HUMIDITY", ScreensaverEntityIcon: 26, ScreensaverEntityText: "Luft", ScreensaverEntityUnitText: "%" },
secondScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.PRECIPITATION_CHANCE", ScreensaverEntityIcon: 19, ScreensaverEntityText: "Regen", ScreensaverEntityUnitText: "%" },
thirdScreensaverEntity: { ScreensaverEntity: "alias.0.Batterie.ACTUAL", ScreensaverEntityIcon: 34, ScreensaverEntityText: "Batterie", ScreensaverEntityUnitText: "%" },
fourthScreensaverEntity: { ScreensaverEntity: "alias.0.Pv.ACTUAL", ScreensaverEntityIcon: 32, ScreensaverEntityText: "PV", ScreensaverEntityUnitText: "W" },
timeoutScreensaver: 15,
dimmode: 8,
screenSaverDoubleClick: false,
locale: "de_DE",
timeFormat: "%H:%M",
dateFormat: "%A, %d. %B %Y",
@@ -104,15 +101,21 @@ schedule("0 * * * *", function () {
});
// Only monitor the extra nodes if one or both are present
// Only monitor the extra nodes if present
var updateArray: string[] = [];
if (config.rightEntity !== null && existsState(config.rightEntity)) {
updateArray.push(config.rightEntity)
if (config.firstScreensaverEntity !== null && config.firstScreensaverEntity.ScreensaverEntity != null && existsState(config.firstScreensaverEntity.ScreensaverEntity)) {
updateArray.push(config.firstScreensaverEntity.ScreensaverEntity)
}
if (config.secondScreensaverEntity !== null && config.secondScreensaverEntity.ScreensaverEntity != null && existsState(config.secondScreensaverEntity.ScreensaverEntity)) {
updateArray.push(config.secondScreensaverEntity.ScreensaverEntity)
}
if (config.thirdScreensaverEntity !== null && config.thirdScreensaverEntity.ScreensaverEntity != null && existsState(config.thirdScreensaverEntity.ScreensaverEntity)) {
updateArray.push(config.thirdScreensaverEntity.ScreensaverEntity)
}
if (config.fourthScreensaverEntity !== null && config.fourthScreensaverEntity.ScreensaverEntity != null && existsState(config.fourthScreensaverEntity.ScreensaverEntity)) {
updateArray.push(config.fourthScreensaverEntity.ScreensaverEntity)
}
if (config.leftEntity !== null && existsState(config.leftEntity)) {
updateArray.push(config.leftEntity)
}
if (updateArray.length > 0) {
on(updateArray, function () {
HandleScreensaverUpdate();
@@ -123,15 +126,7 @@ on({ id: config.panelRecvTopic }, function (obj) {
var json = JSON.parse(obj.state.val);
var split = json.CustomRecv.split(",");
if (split[1] == "pageOpenDetail") {
UnsubscribeWatcher();
let pageItem = config.pages[pageId].items.find(e => e.id === split[3]);
if (pageItem !== undefined)
SendToPanel(GenerateDetailPage(split[2], pageItem));
}
else {
HandleMessage(split[0], split[1], parseInt(split[2]), split);
}
HandleMessage(split[0], split[1], parseInt(split[2]), split);
}
});
@@ -147,18 +142,18 @@ function SendToPanel(val: Payload | Payload[]): void {
function HandleMessage(typ: string, method: string, page: number, words: Array<string>): void {
if (typ == "event") {
switch (method) {
case "pageOpen":
var pageNum = (page % config.pages.length);
pageId = Math.abs(pageNum);
UnsubscribeWatcher();
GeneratePage(config.pages[pageId]);
break;
case "startup":
UnsubscribeWatcher();
HandleStartupProcess();
pageId = 0;
GeneratePage(config.pages[0]);
break;
case "pageOpenDetail":
UnsubscribeWatcher();
let pageItem = config.pages[pageId].items.find(e => e.id === words[3]);
if (pageItem !== undefined)
SendToPanel(GenerateDetailPage(words[2], pageItem));
case "buttonPress2":
HandleButtonEvent(words);
break;
@@ -236,7 +231,7 @@ function SendTime(): void {
function GenerateEntitiesPage(page: PageEntities): Payload[] {
var out_msgs: Array<Payload> = [];
out_msgs = [{ payload: "pageType,cardEntities" }, { payload: "entityUpdHeading," + page.heading }]
out_msgs.push({ payload: GeneratePageElements(page.items, 4,page.useColor) });
out_msgs.push({ payload: GeneratePageElements(page.items, 4, page.useColor) });
return out_msgs
}
@@ -317,14 +312,15 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
case "blind":
type = "shutter"
iconId = pageItem.icon !== undefined ? pageItem.icon : 0;
iconId = pageItem.icon !== undefined ? pageItem.icon : 11;
iconColor = GetIconColor(pageItem, existsState(pageItem.id + ".ACTUAL") ? getState(pageItem.id + ".ACTUAL").val : true, useColors);
return "," + type + "," + pageItem.id + "," + iconId + "," + iconColor + "," + name + ","
case "info":
case "value.temperature":
case "thermostat":
type = "text";
iconId = pageItem.icon !== undefined ? pageItem.icon : 11;
iconId = pageItem.icon !== undefined ? pageItem.icon : o.common.role == "value.temperature" || o.common.role == "thermostat" ? 2 : 0;
let unit = "";
var optVal = "0"
if (existsState(pageItem.id + ".ON_ACTUAL")) {
@@ -432,12 +428,15 @@ function GenerateThermoPage(page: PageThermo): Payload[] {
currentTemp = parseInt(getState(id + ".ACTUAL").val) * 10;
let destTemp = 0;
if (existsState(id + ".SET"))
destTemp = parseInt(getState(id + ".SET").val) * 10;
if (existsState(id + ".SET")) {
destTemp = getState(id + ".SET").val.toFixed(2) * 10;
log(id + ".SET " + destTemp)
}
let status = ""
if (existsState(id + ".MODE"))
status = destTemp = getState(id + ".MODE").val;
status = getState(id + ".MODE").val;
let minTemp = 180
let maxTemp = 300
let stepTemp = 5
@@ -459,7 +458,6 @@ function setIfExists(id: string, value: any, type: string | null = null): boolea
else {
let obj = getObject(id);
if (existsState(id) && obj.common.type !== undefined && obj.common.type === type) {
log(id)
setState(id, value);
return true;
}
@@ -478,46 +476,65 @@ function toggleState(id: string): boolean {
function HandleButtonEvent(words): void {
let id = words[2]
let buttonAction = words[3];
if (words[3] == "OnOff" && existsObject(id)) {
var action = false
if (words[4] == "1")
action = true
let o = getObject(id)
switch (o.common.role) {
case "light":
setState(id + ".SET", action);
break;
case "dimmer":
if (existsState(id + ".ON_SET"))
setState(id + ".ON_SET", action);
else if (existsState(id + ".ON_ACTUAL"))
setState(id + ".ON_ACTUAL", action);
}
}
if (words[3] == "up")
setState(id + ".OPEN", true)
if (words[3] == "stop")
setState(id + ".STOP", true)
if (words[3] == "down")
setState(id + ".CLOSE", true)
if (words[3] == "button") {
toggleState(id + ".SET") ? true : toggleState(id + ".ON_SET")
}
if (words[3] == "positionSlider")
setState(id + ".SET", parseInt(words[4]))
if (words[3] == "brightnessSlider")
if (existsState(id + ".SET"))
setState(id + ".SET", parseInt(words[4]));
else if (existsState(id + ".ACTUAL"))
setState(id + ".ACTUAL", parseInt(words[4]));
// out_msgs.push({ payload: id, action: "turn_on", domain: "lightBrightness", brightness: parseInt(words[7]) })
// if (words[6] == "colorTempSlider")
// out_msgs.push({ payload: id, action: "turn_on", domain: "lightTemperature", temperature: parseInt(words[7]) })
if (words[3] == "tempUpd") {
setState(id + ".SET", parseInt(words[4]) / 10)
switch (buttonAction) {
case "bNext":
var pageNum = ((pageId + 1) % config.pages.length);
pageId = Math.abs(pageNum);
UnsubscribeWatcher();
GeneratePage(config.pages[pageId]);
break;
case "bPrev":
var pageNum = ((pageId - 1) % config.pages.length);
pageId = Math.abs(pageNum);
UnsubscribeWatcher();
GeneratePage(config.pages[pageId]);
break;
case "bExit":
if (config.screenSaverDoubleClick) {
if (words[4] == 2)
GeneratePage(config.pages[pageId]);
}
else
GeneratePage(config.pages[pageId]);
break;
case "OnOff":
if (existsObject(id)) {
var action = false
if (words[4] == "1")
action = true
let o = getObject(id)
switch (o.common.role) {
case "light":
setIfExists(id + ".SET", action);
break;
case "dimmer":
setIfExists(id + ".ON_SET", action) ? true : setIfExists(id + ".ON_ACTUAL", action);
}
}
break;
case "up":
setIfExists(id + ".OPEN", true)
break;
case "stop":
setIfExists(id + ".STOP", true)
break;
case "down":
setIfExists(id + ".CLOSE", true)
break;
case "button":
toggleState(id + ".SET") ? true : toggleState(id + ".ON_SET")
break;
case "positionSlider":
case "brightnessSlider":
setIfExists(id + ".SET", parseInt(words[4])) ? true : setIfExists(id + ".ACTUAL", parseInt(words[4]));
break;
case "tempUpd":
setIfExists(id + ".SET", parseInt(words[4]) / 10)
break;
default:
break;
}
}
@@ -616,33 +633,30 @@ function HandleScreensaverUpdate(): void {
let temperature: string =
existsState(config.weatherEntity + ".ACTUAL") ? getState(config.weatherEntity + ".ACTUAL").val :
existsState(config.weatherEntity + ".TEMP") ? getState(config.weatherEntity + ".TEMP").val : "null";
let humidity = getState(config.weatherEntity + ".HUMIDITY").val;
let payloadString =
"weatherUpdate,?" + GetAccuWeatherIcon(parseInt(icon)) + "?"
+ temperature + " " + config.temperatureUnit + "?26?"
+ humidity + " %?";
+ temperature + " " + config.temperatureUnit + "?"
if (existsState(config.leftEntity)) {
let u1 = getState(config.leftEntity).val;
payloadString += config.leftEntityText + "?" + config.leftEntityIcon + "?" + u1 + " " + config.leftEntityUnitText + "?";
}
else {
payloadString += "???";
}
payloadString += GetScreenSaverEntityString(config.firstScreensaverEntity);
payloadString += GetScreenSaverEntityString(config.secondScreensaverEntity);
payloadString += GetScreenSaverEntityString(config.thirdScreensaverEntity);
payloadString += GetScreenSaverEntityString(config.fourthScreensaverEntity);
if (existsState(config.rightEntity)) {
let u2 = getState(config.rightEntity).val;
payloadString += config.rightEntityText + "?" + config.rightEntityIcon + "?" + u2 + " " + config.rightEntityUnitText;
}
else {
payloadString += "??";
}
SendToPanel(<Payload>{ payload: payloadString });
}
}
function GetScreenSaverEntityString(configElement: ScreenSaverElement | null): string {
if (configElement != null && configElement.ScreensaverEntity != null && existsState(configElement.ScreensaverEntity)) {
let u1 = getState(configElement.ScreensaverEntity).val;
return configElement.ScreensaverEntityText + "?" + configElement.ScreensaverEntityIcon + "?" + u1 + " " + configElement.ScreensaverEntityUnitText + "?";
}
else {
return "???";
}
}
function GetAccuWeatherIcon(icon: number): number {
switch (icon) {
case 24: // Ice
@@ -793,15 +807,12 @@ type Config = {
timeFormat: string,
dateFormat: string,
weatherEntity: string | null,
screenSaverDoubleClick: boolean,
temperatureUnit: string,
leftEntity: string,
leftEntityIcon: number,
leftEntityText: string,
leftEntityUnitText: string | null,
rightEntity: string,
rightEntityIcon: number,
rightEntityText: string,
rightEntityUnitText: string | null,
firstScreensaverEntity: ScreenSaverElement | null,
secondScreensaverEntity: ScreenSaverElement | null,
thirdScreensaverEntity: ScreenSaverElement | null,
fourthScreensaverEntity: ScreenSaverElement | null,
defaultColor: RGB,
defaultOnColor: RGB,
defaultOffColor: RGB,
@@ -809,3 +820,10 @@ type Config = {
button1Page: (PageThermo | PageEntities | PageGrid | null),
button2Page: (PageThermo | PageEntities | PageGrid | null),
};
type ScreenSaverElement = {
ScreensaverEntity: string | null,
ScreensaverEntityIcon: number | null,
ScreensaverEntityText: string | null,
ScreensaverEntityUnitText: string | null,
}

View File

@@ -66,14 +66,12 @@ const BatteryEmpty: RGB = { red: 179, green: 45, blue: 25 }
var config: Config = {
panelRecvTopic: "mqtt.0.tele.WzDisplay.RESULT", // This is the object where the panel send the data to.
panelSendTopic: "mqtt.0.cmnd.WzDisplay.CustomSend", // This is the object where data is send to the panel.
leftEntity: "alias.0.Batterie.ACTUAL", // This is a state will be displayed on the left side.
leftEntityIcon: 34, // This is a icon which will be displayed on the left side.
leftEntityText: "Batterie", // The label for the left side.
leftEntityUnitText: "%", // The unit which will be appendon the left side.
rightEntity: "alias.0.Pv.ACTUAL", // The same but for the right side.
rightEntityIcon: 32,
rightEntityText: "PV",
rightEntityUnitText: "W",
firstScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.HUMIDITY", ScreensaverEntityIcon: 26, ScreensaverEntityText: "Luft", ScreensaverEntityUnitText: "%" },
// Items which should be presented on the screensaver page
secondScreensaverEntity: { ScreensaverEntity: "alias.0.Wetter.PRECIPITATION_CHANCE", ScreensaverEntityIcon: 19, ScreensaverEntityText: "Regen", ScreensaverEntityUnitText: "%" },
thirdScreensaverEntity: { ScreensaverEntity: "alias.0.Batterie.ACTUAL", ScreensaverEntityIcon: 34, ScreensaverEntityText: "Batterie", ScreensaverEntityUnitText: "%" },
fourthScreensaverEntity: { ScreensaverEntity: "alias.0.Pv.ACTUAL", ScreensaverEntityIcon: 32, ScreensaverEntityText: "PV", ScreensaverEntityUnitText: "W" },
screenSaverDoubleClick: false, // Doubletouch needed for leaving screensaver.
timeoutScreensaver: 15, // Timeout for screensaver
dimmode: 8, // Display dim
locale: "de_DE", // not used right now
@@ -84,6 +82,14 @@ var config: Config = {
defaultOnColor: RGB, // Default on state color for items
defaultOffColor: RGB, // Default off state color for page
temperatureUnit: "°C", // Unit to append on temperature sensors
<<<<<<< HEAD
pages: [Wohnen, Strom,
{
"type": "cardThermo",
"heading": "Thermostat",
"useColor": true,
"items": [<PageItem>{ id: "alias.0.WzNsPanel" }]
=======
pages: [
{
"type": "cardEntities", // card type (cardEntities, cardThermo)
@@ -114,6 +120,7 @@ var config: Config = {
"heading": "Thermostat",
"useColor": false, // should colors be enabled on this page, can be overridden in PageItem
"item": "alias.0.WzNsPanel" // Needs to be a thermostat in the device panel
>>>>>>> 8a48ff35d408a7712a3052ee3cf8fc84e8b699c7
}
],
button1Page: button1Page, // A cardEntities, cardThermo or nothing. This will be opened when pressing button1