modified: packages/devices_v0_7/display.yaml
This commit is contained in:
@@ -67,10 +67,11 @@ binary_sensor:
|
|||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
on_press:
|
||||||
then:
|
then:
|
||||||
# woke up when on the screensaver, as well do not include the logo page and screensaver in a loop when pushing a button
|
# cycle through pages: first_page -> second_page -> third_page -> last_page -> first_page
|
||||||
|
# screensaver is excluded from the cycle — button press wakes it to first_page
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
# on the last page go to the first page skipping the screensaver and logo page
|
# on the last page wrap around to the first page (skip screensaver)
|
||||||
display.is_displaying_page: last_page
|
display.is_displaying_page: last_page
|
||||||
then:
|
then:
|
||||||
- display.page.show: first_page
|
- display.page.show: first_page
|
||||||
@@ -78,13 +79,13 @@ binary_sensor:
|
|||||||
else:
|
else:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
# on the screensaver, show the logo for a while and display the first page
|
# button wakes screensaver — jump to first page
|
||||||
display.is_displaying_page: screensaver
|
display.is_displaying_page: screensaver
|
||||||
then:
|
then:
|
||||||
- display.page.show: first_page
|
- display.page.show: first_page
|
||||||
- component.update: oled_display
|
- component.update: oled_display
|
||||||
else:
|
else:
|
||||||
# not the last page and screensaver go to the next page
|
# advance to the next page (first -> second -> third -> last)
|
||||||
- display.page.show_next: oled_display
|
- display.page.show_next: oled_display
|
||||||
- component.update: oled_display
|
- component.update: oled_display
|
||||||
# restart screensaver script
|
# restart screensaver script
|
||||||
|
|||||||
Reference in New Issue
Block a user