New sleep flow
This commit is contained in:
@@ -6,7 +6,6 @@ Program.s
|
||||
int p=0,q=0,t=0,f=0
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int sleep_mode=0
|
||||
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
|
||||
int brightness=100,brightness_dim=40
|
||||
int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape
|
||||
|
||||
@@ -12,8 +12,6 @@ Page home
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
dimtimer.en=1
|
||||
sleeptimer.en=1
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
@@ -44,36 +42,30 @@ Page home
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) disdim
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 39
|
||||
ID : 36
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) climate_entity
|
||||
Attributes
|
||||
ID : 40
|
||||
ID : 37
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 48
|
||||
ID : 45
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Text time
|
||||
Attributes
|
||||
ID : 5
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -83,7 +75,7 @@ Text time
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 6
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -93,7 +85,7 @@ Text current_temp
|
||||
|
||||
Text outdoor_temp
|
||||
Attributes
|
||||
ID : 7
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -103,7 +95,7 @@ Text outdoor_temp
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 8
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -113,7 +105,7 @@ Text date
|
||||
|
||||
Text value01_state
|
||||
Attributes
|
||||
ID : 10
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -123,7 +115,7 @@ Text value01_state
|
||||
|
||||
Text left_bt_text
|
||||
Attributes
|
||||
ID : 14
|
||||
ID : 11
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -133,7 +125,7 @@ Text left_bt_text
|
||||
|
||||
Text right_bt_text
|
||||
Attributes
|
||||
ID : 15
|
||||
ID : 12
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -143,7 +135,7 @@ Text right_bt_text
|
||||
|
||||
Text icon_top_01
|
||||
Attributes
|
||||
ID : 16
|
||||
ID : 13
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -153,7 +145,7 @@ Text icon_top_01
|
||||
|
||||
Text icon_top_02
|
||||
Attributes
|
||||
ID : 17
|
||||
ID : 14
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -163,7 +155,7 @@ Text icon_top_02
|
||||
|
||||
Text icon_top_03
|
||||
Attributes
|
||||
ID : 18
|
||||
ID : 15
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -173,7 +165,7 @@ Text icon_top_03
|
||||
|
||||
Text icon_top_04
|
||||
Attributes
|
||||
ID : 19
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -183,7 +175,7 @@ Text icon_top_04
|
||||
|
||||
Text icon_top_05
|
||||
Attributes
|
||||
ID : 20
|
||||
ID : 17
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -193,7 +185,7 @@ Text icon_top_05
|
||||
|
||||
Text icon_top_06
|
||||
Attributes
|
||||
ID : 21
|
||||
ID : 18
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -203,7 +195,7 @@ Text icon_top_06
|
||||
|
||||
Text icon_top_07
|
||||
Attributes
|
||||
ID : 22
|
||||
ID : 19
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -213,7 +205,7 @@ Text icon_top_07
|
||||
|
||||
Text icon_top_08
|
||||
Attributes
|
||||
ID : 23
|
||||
ID : 20
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -223,7 +215,7 @@ Text icon_top_08
|
||||
|
||||
Text icon_top_09
|
||||
Attributes
|
||||
ID : 24
|
||||
ID : 21
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -233,7 +225,7 @@ Text icon_top_09
|
||||
|
||||
Text icon_top_10
|
||||
Attributes
|
||||
ID : 25
|
||||
ID : 22
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -243,7 +235,7 @@ Text icon_top_10
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 26
|
||||
ID : 23
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -253,7 +245,7 @@ Text value01_icon
|
||||
|
||||
Text value03_state
|
||||
Attributes
|
||||
ID : 27
|
||||
ID : 24
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -263,7 +255,7 @@ Text value03_state
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 28
|
||||
ID : 25
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -273,7 +265,7 @@ Text value03_icon
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 29
|
||||
ID : 26
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -283,7 +275,7 @@ Text value02_icon
|
||||
|
||||
Text value02_state
|
||||
Attributes
|
||||
ID : 30
|
||||
ID : 27
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -293,7 +285,7 @@ Text value02_state
|
||||
|
||||
Text wifi_icon
|
||||
Attributes
|
||||
ID : 31
|
||||
ID : 28
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -303,7 +295,7 @@ Text wifi_icon
|
||||
|
||||
Text indoortempicon
|
||||
Attributes
|
||||
ID : 32
|
||||
ID : 29
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -313,7 +305,7 @@ Text indoortempicon
|
||||
|
||||
Text bt_notific
|
||||
Attributes
|
||||
ID : 33
|
||||
ID : 30
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -330,7 +322,7 @@ Text bt_notific
|
||||
|
||||
Text bt_qrcode
|
||||
Attributes
|
||||
ID : 34
|
||||
ID : 31
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -344,7 +336,7 @@ Text bt_qrcode
|
||||
|
||||
Text bt_entities
|
||||
Attributes
|
||||
ID : 35
|
||||
ID : 32
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -361,7 +353,7 @@ Text bt_entities
|
||||
|
||||
Text bt_alarm
|
||||
Attributes
|
||||
ID : 36
|
||||
ID : 33
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -378,7 +370,7 @@ Text bt_alarm
|
||||
|
||||
Text meridiem
|
||||
Attributes
|
||||
ID : 38
|
||||
ID : 35
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -388,7 +380,7 @@ Text meridiem
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 45
|
||||
ID : 42
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -416,7 +408,7 @@ Text button01
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 46
|
||||
ID : 43
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -444,7 +436,7 @@ Text button02
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 47
|
||||
ID : 44
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -472,14 +464,14 @@ Text button03
|
||||
|
||||
Picture weather
|
||||
Attributes
|
||||
ID : 9
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Dual-state Button left_bt_pic
|
||||
Attributes
|
||||
ID : 42
|
||||
ID : 39
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -489,7 +481,7 @@ Dual-state Button left_bt_pic
|
||||
|
||||
Dual-state Button right_bt_pic
|
||||
Attributes
|
||||
ID : 43
|
||||
ID : 40
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -499,7 +491,7 @@ Dual-state Button right_bt_pic
|
||||
|
||||
Hotspot fc_weather
|
||||
Attributes
|
||||
ID : 11
|
||||
ID : 9
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
@@ -513,7 +505,7 @@ Hotspot fc_weather
|
||||
|
||||
Hotspot jump_climate
|
||||
Attributes
|
||||
ID : 12
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
@@ -550,7 +542,7 @@ Hotspot jump_climate
|
||||
|
||||
Hotspot settings_click
|
||||
Attributes
|
||||
ID : 37
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -562,23 +554,9 @@ Hotspot settings_click
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Timer dimtimer
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : global
|
||||
Period (ms): 50000
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(disdim.val==0)
|
||||
{
|
||||
dims=brightness_dim // Dim down screen to val set from HA
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 4
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
@@ -588,25 +566,9 @@ Timer swipestore
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer sleeptimer
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Period (ms): 65000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(sleep_mode==1)
|
||||
{
|
||||
screensaver.orign.val=0
|
||||
// Go to screensaver page
|
||||
page screensaver
|
||||
}
|
||||
|
||||
Timer settings_timer
|
||||
Attributes
|
||||
ID : 41
|
||||
ID : 38
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
@@ -617,7 +579,7 @@ Timer settings_timer
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 44
|
||||
ID : 41
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
@@ -640,7 +602,7 @@ Timer wakeup_timer
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 49
|
||||
ID : 46
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
@@ -658,16 +620,14 @@ Timer click_timer
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 3
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
dim=brightness // Set brightness to saved value (from HA)
|
||||
dimtimer.en=1 // Enable timer to calc down for dimming screen
|
||||
sleeptimer.en=1
|
||||
wakeup_timer.en=1 // Set brightness to saved value (from HA)
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
|
||||
@@ -26,7 +26,7 @@ Page screensaver
|
||||
Variable (int32) orign
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope: global
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
TouchCap wakeup
|
||||
|
||||
@@ -22,6 +22,8 @@ Page settings
|
||||
prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
vis lbl_sleep,0
|
||||
vis bt_sleep,0
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
|
||||
Reference in New Issue
Block a user