updated readme and example to match new changes
This commit is contained in:
+100
-102
@@ -46,9 +46,7 @@ packages:
|
|||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: !extend page_names
|
- id: !extend page_names
|
||||||
initial_value: '{"Page 1","Music","Page 3"}'
|
initial_value: '{"page 2","Music","Page 3"}'
|
||||||
- id: !extend active_page_name
|
|
||||||
initial_value: ""
|
|
||||||
|
|
||||||
font:
|
font:
|
||||||
- file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf"
|
- file: "https://github.com/web-fonts/ttf/raw/refs/heads/master/bpg-ingiri-arial-webfont.ttf"
|
||||||
@@ -108,80 +106,80 @@ event:
|
|||||||
name: BAR1 button Left event
|
name: BAR1 button Left event
|
||||||
id: bar1_btn_left_event
|
id: bar1_btn_left_event
|
||||||
event_types:
|
event_types:
|
||||||
- "press page 0"
|
|
||||||
- "release page 0"
|
|
||||||
- "long press page 0"
|
|
||||||
- "press page 1"
|
- "press page 1"
|
||||||
- "release page 1"
|
- "release page 1"
|
||||||
- "long press page 1"
|
- "long press page 1"
|
||||||
- "press page 2"
|
- "press page 2"
|
||||||
- "release page 2"
|
- "release page 2"
|
||||||
- "long press page 2"
|
- "long press page 2"
|
||||||
|
- "press page 3"
|
||||||
|
- "release page 3"
|
||||||
|
- "long press page 3"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: BAR1 button Right event
|
name: BAR1 button Right event
|
||||||
id: bar1_btn_right_event
|
id: bar1_btn_right_event
|
||||||
event_types:
|
event_types:
|
||||||
- "press page 0"
|
|
||||||
- "release page 0"
|
|
||||||
- "long press page 0"
|
|
||||||
- "press page 1"
|
- "press page 1"
|
||||||
- "release page 1"
|
- "release page 1"
|
||||||
- "long press page 1"
|
- "long press page 1"
|
||||||
- "press page 2"
|
- "press page 2"
|
||||||
- "release page 2"
|
- "release page 2"
|
||||||
- "long press page 2"
|
- "long press page 2"
|
||||||
|
- "press page 3"
|
||||||
|
- "release page 3"
|
||||||
|
- "long press page 3"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: BAR2 button Left event
|
name: BAR2 button Left event
|
||||||
id: bar2_btn_left_event
|
id: bar2_btn_left_event
|
||||||
event_types:
|
event_types:
|
||||||
- "press page 0"
|
|
||||||
- "release page 0"
|
|
||||||
- "long press page 0"
|
|
||||||
- "press page 1"
|
- "press page 1"
|
||||||
- "release page 1"
|
- "release page 1"
|
||||||
- "long press page 1"
|
- "long press page 1"
|
||||||
- "press page 2"
|
- "press page 2"
|
||||||
- "release page 2"
|
- "release page 2"
|
||||||
- "long press page 2"
|
- "long press page 2"
|
||||||
|
- "press page 3"
|
||||||
|
- "release page 3"
|
||||||
|
- "long press page 3"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: BAR2 button Right event
|
name: BAR2 button Right event
|
||||||
id: bar2_btn_right_event
|
id: bar2_btn_right_event
|
||||||
event_types:
|
event_types:
|
||||||
- "press page 0"
|
|
||||||
- "release page 0"
|
|
||||||
- "long press page 0"
|
|
||||||
- "press page 1"
|
- "press page 1"
|
||||||
- "release page 1"
|
- "release page 1"
|
||||||
- "long press page 1"
|
- "long press page 1"
|
||||||
- "press page 2"
|
- "press page 2"
|
||||||
- "release page 2"
|
- "release page 2"
|
||||||
- "long press page 2"
|
- "long press page 2"
|
||||||
|
- "press page 3"
|
||||||
|
- "release page 3"
|
||||||
|
- "long press page 3"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: BAR3 button Left event
|
name: BAR3 button Left event
|
||||||
id: bar3_btn_left_event
|
id: bar3_btn_left_event
|
||||||
event_types:
|
event_types:
|
||||||
- "press page 0"
|
|
||||||
- "release page 0"
|
|
||||||
- "long press page 0"
|
|
||||||
- "press page 1"
|
- "press page 1"
|
||||||
- "release page 1"
|
- "release page 1"
|
||||||
- "long press page 1"
|
- "long press page 1"
|
||||||
- "press page 2"
|
- "press page 2"
|
||||||
- "release page 2"
|
- "release page 2"
|
||||||
- "long press page 2"
|
- "long press page 2"
|
||||||
|
- "press page 3"
|
||||||
|
- "release page 3"
|
||||||
|
- "long press page 3"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: BAR3 button Right event
|
name: BAR3 button Right event
|
||||||
id: bar3_btn_right_event
|
id: bar3_btn_right_event
|
||||||
event_types:
|
event_types:
|
||||||
- "press page 0"
|
|
||||||
- "release page 0"
|
|
||||||
- "long press page 0"
|
|
||||||
- "press page 1"
|
- "press page 1"
|
||||||
- "release page 1"
|
- "release page 1"
|
||||||
- "long press page 1"
|
- "long press page 1"
|
||||||
- "press page 2"
|
- "press page 2"
|
||||||
- "release page 2"
|
- "release page 2"
|
||||||
- "long press page 2"
|
- "long press page 2"
|
||||||
|
- "press page 3"
|
||||||
|
- "release page 3"
|
||||||
|
- "long press page 3"
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- id: !extend main_display_btn_left
|
- id: !extend main_display_btn_left
|
||||||
@@ -194,29 +192,29 @@ binary_sensor:
|
|||||||
on_click:
|
on_click:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar1_btn_left_event).trigger("press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar1_btn_left_event).trigger("press page 1");
|
id(bar1_btn_left_event).trigger("press page 1");
|
||||||
id(music_card_vol_down).execute();
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar1_btn_left_event).trigger("press page 2");
|
id(bar1_btn_left_event).trigger("press page 2");
|
||||||
|
id(music_card_vol_down).execute();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar1_btn_left_event).trigger("press page 3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
on_release:
|
on_release:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar1_btn_left_event).trigger("release page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar1_btn_left_event).trigger("release page 1");
|
id(bar1_btn_left_event).trigger("release page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar1_btn_left_event).trigger("release page 2");
|
id(bar1_btn_left_event).trigger("release page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar1_btn_left_event).trigger("release page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -224,43 +222,43 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar1_btn_left_event).trigger("long press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar1_btn_left_event).trigger("long press page 1");
|
id(bar1_btn_left_event).trigger("long press page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar1_btn_left_event).trigger("long press page 2");
|
id(bar1_btn_left_event).trigger("long press page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar1_btn_left_event).trigger("long press page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
- id: !extend bar1_btn_right
|
- id: !extend bar1_btn_right
|
||||||
on_click:
|
on_click:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar1_btn_right_event).trigger("press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar1_btn_right_event).trigger("press page 1");
|
id(bar1_btn_right_event).trigger("press page 1");
|
||||||
id(music_card_vol_up).execute();
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar1_btn_right_event).trigger("press page 2");
|
id(bar1_btn_right_event).trigger("press page 2");
|
||||||
|
id(music_card_vol_up).execute();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar1_btn_right_event).trigger("press page 3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
on_release:
|
on_release:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar1_btn_right_event).trigger("release page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar1_btn_right_event).trigger("release page 1");
|
id(bar1_btn_right_event).trigger("release page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar1_btn_right_event).trigger("release page 2");
|
id(bar1_btn_right_event).trigger("release page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar1_btn_right_event).trigger("release page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -268,43 +266,43 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar1_btn_right_event).trigger("long press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar1_btn_right_event).trigger("long press page 1");
|
id(bar1_btn_right_event).trigger("long press page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar1_btn_right_event).trigger("long press page 2");
|
id(bar1_btn_right_event).trigger("long press page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar1_btn_right_event).trigger("long press page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
- id: !extend bar2_btn_left
|
- id: !extend bar2_btn_left
|
||||||
on_click:
|
on_click:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar2_btn_left_event).trigger("press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar2_btn_left_event).trigger("press page 1");
|
id(bar2_btn_left_event).trigger("press page 1");
|
||||||
id(music_card_prev).execute();
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar2_btn_left_event).trigger("press page 2");
|
id(bar2_btn_left_event).trigger("press page 2");
|
||||||
|
id(music_card_prev).execute();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar2_btn_left_event).trigger("press page 3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
on_release:
|
on_release:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar2_btn_left_event).trigger("release page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar2_btn_left_event).trigger("release page 1");
|
id(bar2_btn_left_event).trigger("release page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar2_btn_left_event).trigger("release page 2");
|
id(bar2_btn_left_event).trigger("release page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar2_btn_left_event).trigger("release page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -312,43 +310,43 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar2_btn_left_event).trigger("long press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar2_btn_left_event).trigger("long press page 1");
|
id(bar2_btn_left_event).trigger("long press page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar2_btn_left_event).trigger("long press page 2");
|
id(bar2_btn_left_event).trigger("long press page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar2_btn_left_event).trigger("long press page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
- id: !extend bar2_btn_right
|
- id: !extend bar2_btn_right
|
||||||
on_click:
|
on_click:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar2_btn_right_event).trigger("press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar2_btn_right_event).trigger("press page 1");
|
id(bar2_btn_right_event).trigger("press page 1");
|
||||||
id(music_card_next).execute();
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar2_btn_right_event).trigger("press page 2");
|
id(bar2_btn_right_event).trigger("press page 2");
|
||||||
|
id(music_card_next).execute();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar2_btn_right_event).trigger("press page 3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
on_release:
|
on_release:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar2_btn_right_event).trigger("release page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar2_btn_right_event).trigger("release page 1");
|
id(bar2_btn_right_event).trigger("release page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar2_btn_right_event).trigger("release page 2");
|
id(bar2_btn_right_event).trigger("release page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar2_btn_right_event).trigger("release page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -356,43 +354,43 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar2_btn_right_event).trigger("long press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar2_btn_right_event).trigger("long press page 1");
|
id(bar2_btn_right_event).trigger("long press page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar2_btn_right_event).trigger("long press page 2");
|
id(bar2_btn_right_event).trigger("long press page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar2_btn_right_event).trigger("long press page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
- id: !extend bar3_btn_left
|
- id: !extend bar3_btn_left
|
||||||
on_click:
|
on_click:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar3_btn_left_event).trigger("press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar3_btn_left_event).trigger("press page 1");
|
id(bar3_btn_left_event).trigger("press page 1");
|
||||||
id(music_card_power).execute();
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar3_btn_left_event).trigger("press page 2");
|
id(bar3_btn_left_event).trigger("press page 2");
|
||||||
|
id(music_card_power).execute();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar3_btn_left_event).trigger("press page 3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
on_release:
|
on_release:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar3_btn_left_event).trigger("release page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar3_btn_left_event).trigger("release page 1");
|
id(bar3_btn_left_event).trigger("release page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar3_btn_left_event).trigger("release page 2");
|
id(bar3_btn_left_event).trigger("release page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar3_btn_left_event).trigger("release page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -400,43 +398,43 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar3_btn_left_event).trigger("long press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar3_btn_left_event).trigger("long press page 1");
|
id(bar3_btn_left_event).trigger("long press page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar3_btn_left_event).trigger("long press page 2");
|
id(bar3_btn_left_event).trigger("long press page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar3_btn_left_event).trigger("long press page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
- id: !extend bar3_btn_right
|
- id: !extend bar3_btn_right
|
||||||
on_click:
|
on_click:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar3_btn_right_event).trigger("press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar3_btn_right_event).trigger("press page 1");
|
id(bar3_btn_right_event).trigger("press page 1");
|
||||||
id(music_card_playpause).execute();
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar3_btn_right_event).trigger("press page 2");
|
id(bar3_btn_right_event).trigger("press page 2");
|
||||||
|
id(music_card_playpause).execute();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar3_btn_right_event).trigger("press page 3");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
on_release:
|
on_release:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar3_btn_right_event).trigger("release page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar3_btn_right_event).trigger("release page 1");
|
id(bar3_btn_right_event).trigger("release page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar3_btn_right_event).trigger("release page 2");
|
id(bar3_btn_right_event).trigger("release page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar3_btn_right_event).trigger("release page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
on_multi_click:
|
on_multi_click:
|
||||||
- timing:
|
- timing:
|
||||||
@@ -444,15 +442,15 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
|
||||||
id(bar3_btn_right_event).trigger("long press page 0");
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
id(bar3_btn_right_event).trigger("long press page 1");
|
id(bar3_btn_right_event).trigger("long press page 1");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
id(bar3_btn_right_event).trigger("long press page 2");
|
id(bar3_btn_right_event).trigger("long press page 2");
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
id(bar3_btn_right_event).trigger("long press page 3");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
@@ -491,13 +489,13 @@ display:
|
|||||||
lambda: |-
|
lambda: |-
|
||||||
id(all_pages_main).execute();
|
id(all_pages_main).execute();
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(containers).execute();
|
id(containers).execute();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card).execute(20, 125);
|
id(music_card).execute(20, 125);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
it.print(100, 160, id(font_arial20), "This is page 3!");
|
it.print(100, 160, id(font_arial20), "This is page 3!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -556,13 +554,13 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card_bar).execute("volume_down");
|
id(music_card_bar).execute("volume_down");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -570,13 +568,13 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card_bar).execute("volume_up");
|
id(music_card_bar).execute("volume_up");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -584,13 +582,13 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card_bar).execute("prev");
|
id(music_card_bar).execute("prev");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -598,13 +596,13 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card_bar).execute("next");
|
id(music_card_bar).execute("next");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -612,13 +610,13 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card_bar).execute("power");
|
id(music_card_bar).execute("power");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -626,13 +624,13 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
switch (id(actual_page)){
|
switch (id(actual_page)){
|
||||||
case 0:
|
case 1:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(red));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 2:
|
||||||
id(music_card_bar).execute("playpause");
|
id(music_card_bar).execute("playpause");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 3:
|
||||||
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
id(bar_display).image(80, 0, id(lightbulb), ImageAlign::TOP_CENTER, id(blue));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ The Button+ is a modular control panel for home automation systems. It is design
|
|||||||
|
|
||||||
__You can order the Button+ on there [website](https://button.plus).__ this is also the place to find the original firmware, in case you want to revert back.
|
__You can order the Button+ on there [website](https://button.plus).__ this is also the place to find the original firmware, in case you want to revert back.
|
||||||
|
|
||||||
To make the Button+ work with ESPHome we needed at least a list of used components and a pinout/IO-list. I spend a couple of evenings with my multimeter, making my wife crazy with the beeps, googled and collected data sheets of the components, broke a the display of 1 BAR module and did a trail-on-error to make stuf work with ESPHome. Here in this repo you'll find the [results](./Components) of my journy.
|
To make the Button+ work with ESPHome we needed at least a list of used components and a pinout/IO-list. I spend a couple of evenings with my multimeter, making my wife crazy with the beeps, googled and collected data sheets of the components, broke a the display of 1 BAR module and did a trail-on-error to make stuff work with ESPHome. Here in this repo you'll find the [results](./Components) of my journey.
|
||||||
|
|
||||||
The ESPHome integration adds more flexebility and features, but also add some more complexity. To minimize the complexity I started this repo to collect examples and improve my work.
|
The ESPHome integration adds more flexibility and features, but also add some more complexity. To minimize the complexity I started this repo to collect examples and improve my work.
|
||||||
|
|
||||||
> Want to help? Pull requests are welcome!
|
> Want to help? Pull requests are welcome!
|
||||||
|
|
||||||
@@ -20,21 +20,42 @@ The ESPHome integration adds more flexebility and features, but also add some mo
|
|||||||
TODO
|
TODO
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## Usefull Links
|
## Changes:
|
||||||
|
|
||||||
|
### NEXT: 0.2.0
|
||||||
|
#### NEW:
|
||||||
|
- added display item card (thanks @balk77)
|
||||||
|
- menu can now be controlled from HA and has page naming (thanks @balk77)
|
||||||
|
|
||||||
|
#### BREAKING:
|
||||||
|
- global `nr_of_pages` is now replaced by `nr_of_pages` ***substitution***, if you have compile errors please see the basic examples
|
||||||
|
- paging is now indexed by 1 > first page has number 1. Page 0>1, 1>2 etc.
|
||||||
|
|
||||||
|
|
||||||
|
### 0.1.1
|
||||||
|
Serialized the mini displays, by toggling the CS pins we need only 1 display instance now.
|
||||||
|
|
||||||
|
### 0.1.0
|
||||||
|
Created a Package
|
||||||
|
|
||||||
|
### Before 0.1.0
|
||||||
|
versions with first prove of concepts
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
The documentation of the Button+ ESPHome integration can be found in the [Docs directory](./Docs)
|
||||||
|
|
||||||
|
## Useful Links
|
||||||
|
|
||||||
* Display Items: https://esphome.io/components/display/
|
* Display Items: https://esphome.io/components/display/
|
||||||
* Fonts: https://esphome.io/components/font#display-fonts
|
* Fonts: https://esphome.io/components/font#display-fonts
|
||||||
* Icon's and images: https://esphome.io/components/image#display-image
|
* Icon's and images: https://esphome.io/components/image#display-image
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
The documentaion of the Button+ ESPHome integration can befound in the [Docs directory](./Docs)
|
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
All the features, i the Buton+ has to offer should work with the [`basic_example.yaml`](./Examples/basic_example.yaml). Please reffer the ESPHome documentaion for more information on how to build your own menu or ... (?)
|
All the features the Button+ has to offer should work with the [`3pages_TotalExample.yaml`](./Examples/3pages_TotalExample.yml). Please refer the ESPHome documentation for more information on how to build your own menu or ... (?)
|
||||||
|
|
||||||
The documentaion is yet to be made... Again If you want to help... Pull requests are welcome!
|
The documentation is work in progress.. Again If you want to help... Pull requests are welcome!
|
||||||
|
|
||||||
## TODO:
|
## TODO:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user