Hello all, i just wanted to test a lcd_menu on my 16x2 lcd display. For this I have copied large parts from the documentation and adapted for my use case. My config is as follows:
... init here
i2c:
sda: D2
scl: D1
# Example configuration entry
display:
- platform: lcd_pcf8574
id: my_lcd
dimensions: 16x2
address: 0x27
user_characters:
- position: 0
data: # mark_back symbol
- 0b00100
- 0b01000
- 0b11110
- 0b01001
- 0b00101
- 0b00001
- 0b11110
- 0b00000
lambda: |-
id(my_lcd_menu).draw();
if (!id(my_lcd_menu).is_active())
it.print("Menu is not active");
# Declare a LCD menu
lcd_menu:
id: my_lcd_menu
display_id: my_lcd
active: true
mode: joystick
on_enter:
then:
lambda: 'ESP_LOGI("display_menu", "root enter");'
on_leave:
then:
lambda: 'ESP_LOGI("display_menu", "root leave");'
items:
- type: back
text: 'Back'
- type: label
text: 'Label 1'
# A debounced GPIO push button is used to 'click'
binary_sensor:
# green button
- platform: gpio
id: green
pin:
number: D5
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_on: 30ms
- delayed_off: 30ms
on_press:
- display_menu.up:
# orange button
- platform: gpio
id: orange
pin:
number: D6
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_on: 30ms
- delayed_off: 30ms
on_press:
- display_menu.down:
# white button
- platform: gpio
id: white
pin:
number: D7
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_on: 30ms
- delayed_off: 30ms
on_press:
- display_menu.enter:
But I get the following error message:
Failed config
lcd_menu: [source .\nmcuv3-005.yaml:103]
Component not found: lcd_menu.
What am I doing wrong?