1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00

[lvgl] Bugfixes #3 (#7472)

This commit is contained in:
Clyde Stubbs
2024-10-07 11:27:08 +11:00
committed by GitHub
parent cbc03aae80
commit 81f6750211
16 changed files with 148 additions and 76 deletions

View File

@@ -31,7 +31,6 @@ from .defines import (
literal,
)
from .helpers import esphome_fonts_used, lv_fonts_used, requires_component
from .lvcode import lv_expr
from .types import lv_font_t, lv_gradient_t, lv_img_t
opacity_consts = LvConstant("LV_OPA_", "TRANSP", "COVER")
@@ -330,7 +329,7 @@ def image_validator(value):
lv_image = LValidator(
image_validator,
lv_img_t,
retmapper=lambda x: lv_expr.img_from(MockObj(x)),
retmapper=lambda x: MockObj(x, "->").get_lv_img_dsc(),
requires="image",
)
lv_bool = LValidator(cv.boolean, cg.bool_, retmapper=literal)