11# File: lvgl_tab_scenes.yaml
22# Purpose: creates a tab for controlling scenes, displaying scene buttons.
33# List of subtitutions:
4- # - none
4+ # - scene1_icon
5+ # - scene1_name
6+ # - scene1_action_type
7+ # - scene1_entity_id
8+ # - .... all repeated for scene2 and scene3 ...
59
610- obj :
711 width : 100%
1418 flex_align_cross : center
1519 widgets :
1620 - button :
21+ id : btn_scene1
1722 width : 100%
1823 height : 60
1924 bg_color : $icon_temp_color
2732 flex_align_track : center
2833 pad_column : 10
2934 on_click :
35+ - logger.log :
36+ level : INFO
37+ format : " Scene button clicked: ${scene1_name} (${scene1_entity_id})"
3038 - homeassistant.action :
31- action : scene.turn_on
39+ action : ${scene1_action_type}
3240 data :
3341 entity_id : ${scene1_entity_id}
3442 widgets :
3543 - label :
36- text : " $mdi_white_balance_sunny "
44+ text : " ${scene1_icon} "
3745 text_align : CENTER
3846 text_color : $label_spinbtn_color
3947 text_font : $icon_font
4452 text_color : $label_spinbtn_color
4553 align : CENTER
4654 - button :
55+ id : btn_scene2
4756 width : 100%
4857 height : 60
4958 bg_color : $icon_temp_color
5766 flex_align_track : center
5867 pad_column : 10
5968 on_click :
69+ - logger.log :
70+ level : INFO
71+ format : " Scene button clicked: ${scene2_name} (${scene2_entity_id})"
6072 - homeassistant.action :
61- action : scene.turn_on
73+ action : ${scene2_action_type}
6274 data :
6375 entity_id : ${scene2_entity_id}
6476 widgets :
6577 - label :
66- text : " $mdi_bed "
78+ text : " ${scene2_icon} "
6779 text_align : CENTER
6880 text_color : $label_spinbtn_color
6981 text_font : $icon_font
7284 text : " ${scene2_name}"
7385 text_align : CENTER
7486 text_color : $label_spinbtn_color
87+ align : CENTER
88+ - button :
89+ id : btn_scene3
90+ width : 100%
91+ height : 60
92+ bg_color : $icon_temp_color
93+ pressed :
94+ bg_color : darkorange
95+ layout :
96+ type : flex
97+ flex_flow : row
98+ flex_align_main : center
99+ flex_align_cross : center
100+ flex_align_track : center
101+ pad_column : 10
102+ on_click :
103+ - logger.log :
104+ level : INFO
105+ format : " Scene button clicked: ${scene3_name} (${scene3_entity_id})"
106+ - homeassistant.action :
107+ action : ${scene3_action_type}
108+ data :
109+ entity_id : ${scene3_entity_id}
110+ widgets :
111+ - label :
112+ text : " ${scene3_icon}"
113+ text_align : CENTER
114+ text_color : $label_spinbtn_color
115+ text_font : $icon_font
116+ align : CENTER
117+ - label :
118+ text : " ${scene3_name}"
119+ text_align : CENTER
120+ text_color : $label_spinbtn_color
121+ align : CENTER
122+ - button :
123+ id : btn_scene4
124+ width : 100%
125+ height : 60
126+ bg_color : $icon_temp_color
127+ pressed :
128+ bg_color : darkorange
129+ layout :
130+ type : flex
131+ flex_flow : row
132+ flex_align_main : center
133+ flex_align_cross : center
134+ flex_align_track : center
135+ pad_column : 10
136+ on_click :
137+ - logger.log :
138+ level : INFO
139+ format : " Scene button clicked: ${scene4_name} (${scene4_entity_id})"
140+ - homeassistant.action :
141+ action : ${scene4_action_type}
142+ data :
143+ entity_id : ${scene4_entity_id}
144+ widgets :
145+ - label :
146+ text : " ${scene4_icon}"
147+ text_align : CENTER
148+ text_color : $label_spinbtn_color
149+ text_font : $icon_font
150+ align : CENTER
151+ - label :
152+ text : " ${scene4_name}"
153+ text_align : CENTER
154+ text_color : $label_spinbtn_color
75155 align : CENTER
0 commit comments