[graphical_display_menu] Build on_redraw with build_callback_automation (#20452)

This commit is contained in:
J. Nick Koston
2026-10-09 15:36:57 -10:00
committed by GitHub
parent 1b49e79bf8
commit 5d2433f69a
5 changed files with 35 additions and 26 deletions
@@ -0,0 +1,24 @@
display:
- platform: ssd1306_i2c
i2c_id: i2c_bus
id: graphical_display_menu_triggers_display
model: SSD1306_128X64
reset_pin: ${reset_pin}
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height());
font:
- file: "gfonts://Roboto"
id: graphical_display_menu_triggers_font
size: 20
graphical_display_menu:
id: graphical_display_menu_triggers_menu
display: graphical_display_menu_triggers_display
font: graphical_display_menu_triggers_font
on_redraw:
then:
lambda: 'ESP_LOGI("graphical_display_menu", "redraw, active: %d", it->is_active());'
items:
- type: label
text: "Label"
@@ -0,0 +1,6 @@
substitutions:
reset_pin: GPIO15
packages:
i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml
graphical_display_menu: !include common-triggers.yaml