[display] Use register_apply_condition for display.is_displaying_page (#19705)

This commit is contained in:
J. Nick Koston
2026-09-26 01:36:31 +00:00
committed by GitHub
parent d2c33b0f6f
commit 1de5a58dbe
4 changed files with 25 additions and 23 deletions
@@ -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