mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 16:30:22 +00:00
[display] Use register_apply_condition for display.is_displaying_page (#19705)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
button:
|
||||
- platform: template
|
||||
name: Page check
|
||||
on_press:
|
||||
- if:
|
||||
condition:
|
||||
display.is_displaying_page: ssd1306_i2c_page1
|
||||
then:
|
||||
- logger.log: On page 1
|
||||
- if:
|
||||
condition:
|
||||
display.is_displaying_page:
|
||||
id: ssd1306_i2c_ssd1306_i2c_display
|
||||
page_id: ssd1306_i2c_page2
|
||||
then:
|
||||
- logger.log: On page 2
|
||||
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
reset_pin: GPIO2
|
||||
|
||||
packages:
|
||||
i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml
|
||||
ssd1306_i2c: !include common.yaml
|
||||
actions: !include common-actions.yaml
|
||||
Reference in New Issue
Block a user