Files
ESPHome_ButtonPlusV2/package/1bar_1display_scripts.yaml
T

62 lines
2.1 KiB
YAML

##############################################
## ##
## filename: 1bar_1display_scripts.yaml ##
## description: Specific pre-defined ##
## scripts for 1 BAR 1 Display setup ##
## ##
##############################################
script:
script:
- id: update_bars
then:
- lambda: |-
// update display left:
id(display_bar1_left).turn_on();
id(bar_display).set_rotation(270);
id(bar1_left_page1).execute();
id(bar_display).update();
id(display_bar1_left).turn_off();
// update display right:
id(bar_display).set_rotation(90);
id(bar1_right_page1).execute();
id(display_bar1_right).turn_on();
id(bar_display).update();
id(display_bar1_right).turn_off();
- id: bar1_left_page1
then:
- lambda: |-
id(bar_display).image(80, 0, id(icon_temp_inside), ImageAlign::TOP_CENTER, id(orange));
- id: bar1_right_page1
then:
- lambda: |-
id(bar_display).image(80, 0, id(icon_temp_outside), ImageAlign::TOP_CENTER, id(orange));
- id: update_main
then:
- component.update: main_display
- id: update_all
then:
- component.update: main_display
- component.update: bar1_display_left
- component.update: bar1_display_right
- id: next_page_main
then:
- display.page.show_next: main_display
- script.execute: update_main
- id: next_page_all
then:
- display.page.show_next: main_display
- display.page.show_next: bar1_display_left
- display.page.show_next: bar1_display_right
- script.execute: update_all
- id: prev_page_main
then:
- display.page.show_previous: main_display
- script.execute: update_main
- id: prev_page_all
then:
- display.page.show_previous: main_display
- display.page.show_previous: bar1_display_left
- display.page.show_previous: bar1_display_right
- script.execute: update_all