mirror of
https://github.com/esphome/esphome.git
synced 2026-09-29 16:00:23 +00:00
[display_menu_base] Use the apply helpers for the eight display_menu actions and is_active (#19626)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
button:
|
||||
- platform: template
|
||||
name: Menu Actions
|
||||
on_press:
|
||||
- display_menu.show: test_lcd_menu
|
||||
- display_menu.up: test_lcd_menu
|
||||
- display_menu.down: test_lcd_menu
|
||||
- display_menu.left: test_lcd_menu
|
||||
- display_menu.right: test_lcd_menu
|
||||
- display_menu.enter: test_lcd_menu
|
||||
- if:
|
||||
condition:
|
||||
display_menu.is_active: test_lcd_menu
|
||||
then:
|
||||
- display_menu.hide: test_lcd_menu
|
||||
else:
|
||||
- display_menu.show_main: test_lcd_menu
|
||||
@@ -0,0 +1,11 @@
|
||||
substitutions:
|
||||
d0_pin: GPIO0
|
||||
d1_pin: GPIO2
|
||||
d2_pin: GPIO14
|
||||
d3_pin: GPIO15
|
||||
enable_pin: GPIO16
|
||||
rs_pin: GPIO5
|
||||
|
||||
packages:
|
||||
lcd_menu: !include common.yaml
|
||||
actions: !include common-actions.yaml
|
||||
Reference in New Issue
Block a user