mirror of
https://github.com/esphome/esphome.git
synced 2026-05-31 17:06:40 +08:00
[lvgl] Fix crash with unconfigured top_layer (#13846)
This commit is contained in:
@@ -436,6 +436,7 @@ def container_schema(widget_type: WidgetType, extras=None):
|
|||||||
schema = schema.extend(widget_type.schema)
|
schema = schema.extend(widget_type.schema)
|
||||||
|
|
||||||
def validator(value):
|
def validator(value):
|
||||||
|
value = value or {}
|
||||||
return append_layout_schema(schema, value)(value)
|
return append_layout_schema(schema, value)(value)
|
||||||
|
|
||||||
return validator
|
return validator
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ lvgl:
|
|||||||
- id: lvgl_0
|
- id: lvgl_0
|
||||||
default_font: space16
|
default_font: space16
|
||||||
displays: sdl0
|
displays: sdl0
|
||||||
|
top_layer:
|
||||||
|
|
||||||
- id: lvgl_1
|
- id: lvgl_1
|
||||||
displays: sdl1
|
displays: sdl1
|
||||||
on_idle:
|
on_idle:
|
||||||
|
|||||||
Reference in New Issue
Block a user