Media player - Buttons
- Added code to buttons on media_player page. - Clean-up: - Moved wake-up select from Blueprint to ESPHome component - Removed `switch.xxxxx_confirmation_message`
This commit is contained in:
@@ -66,6 +66,18 @@ Variable (string) lastclick
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (int32) va_current
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) va_total
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -93,7 +105,7 @@ Text vol_text
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 35%
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_vol_down
|
||||
@@ -106,6 +118,16 @@ Text bt_vol_down
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_vol_down\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_vol_up
|
||||
Attributes
|
||||
ID : 9
|
||||
@@ -116,6 +138,16 @@ Text bt_vol_up
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_vol_up\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_mute
|
||||
Attributes
|
||||
ID : 10
|
||||
@@ -126,6 +158,16 @@ Text bt_mute
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_mute\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text time_current
|
||||
Attributes
|
||||
ID : 12
|
||||
@@ -133,7 +175,7 @@ Text time_current
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 2:15
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text time_total
|
||||
@@ -143,7 +185,7 @@ Text time_total
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 7:29
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text track
|
||||
@@ -153,7 +195,7 @@ Text track
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Music name
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Text artist
|
||||
@@ -163,7 +205,7 @@ Text artist
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Artist name
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Text bt_prev
|
||||
@@ -176,6 +218,16 @@ Text bt_prev
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_prev\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_play_pause
|
||||
Attributes
|
||||
ID : 17
|
||||
@@ -186,6 +238,16 @@ Text bt_play_pause
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_play_pause\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_stop
|
||||
Attributes
|
||||
ID : 18
|
||||
@@ -196,6 +258,16 @@ Text bt_stop
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_stop\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 19
|
||||
@@ -206,6 +278,16 @@ Text bt_next
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_next\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 20
|
||||
@@ -216,13 +298,23 @@ Text bt_on_off
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"event\": \"short_click\", \"component\": \"bt_on_off\", \"entity\": \""+entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Progress Bar time_progress
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Value : 34
|
||||
Value : 0
|
||||
|
||||
Slider vol_slider
|
||||
Attributes
|
||||
@@ -230,7 +322,7 @@ Slider vol_slider
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 35
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
@@ -263,3 +355,18 @@ Button button_back
|
||||
page home
|
||||
}
|
||||
|
||||
Timer tm_progress
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(va_current.val<va_total.val)
|
||||
{
|
||||
va_current.val++
|
||||
//covx time_progress.val,target_temp.txt,0,0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user