mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 07:58:09 +01:00
Merge branch 'nvds-new-espnow' of https://github.com/nielsnl68/esphome into nvds-new-espnow
This commit is contained in:
commit
2725b33835
2 changed files with 6 additions and 2 deletions
|
@ -12,7 +12,7 @@ from .defines import (
|
||||||
)
|
)
|
||||||
from .helpers import add_lv_use
|
from .helpers import add_lv_use
|
||||||
from .lvcode import LambdaContext, LocalVariable, lv, lv_assign, lv_variable
|
from .lvcode import LambdaContext, LocalVariable, lv, lv_assign, lv_variable
|
||||||
from .schemas import ALL_STYLES
|
from .schemas import ALL_STYLES, STYLE_REMAP
|
||||||
from .types import lv_lambda_t, lv_obj_t, lv_obj_t_ptr
|
from .types import lv_lambda_t, lv_obj_t, lv_obj_t_ptr
|
||||||
from .widgets import Widget, add_widgets, set_obj_properties, theme_widget_map
|
from .widgets import Widget, add_widgets, set_obj_properties, theme_widget_map
|
||||||
from .widgets.obj import obj_spec
|
from .widgets.obj import obj_spec
|
||||||
|
@ -31,7 +31,8 @@ async def styles_to_code(config):
|
||||||
value = await validator.process(value)
|
value = await validator.process(value)
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
value = "|".join(value)
|
value = "|".join(value)
|
||||||
lv.call(f"style_set_{prop}", svar, literal(value))
|
remapped_prop = STYLE_REMAP.get(prop, prop)
|
||||||
|
lv.call(f"style_set_{remapped_prop}", svar, literal(value))
|
||||||
|
|
||||||
|
|
||||||
async def theme_to_code(config):
|
async def theme_to_code(config):
|
||||||
|
|
|
@ -67,6 +67,9 @@ lvgl:
|
||||||
border_width: 2
|
border_width: 2
|
||||||
pad_all: 4
|
pad_all: 4
|
||||||
align: center
|
align: center
|
||||||
|
- id: image_recolor
|
||||||
|
image_recolor: 0x10ca1e
|
||||||
|
image_recolor_opa: cover
|
||||||
|
|
||||||
touchscreens:
|
touchscreens:
|
||||||
- touchscreen_id: tft_touch
|
- touchscreen_id: tft_touch
|
||||||
|
|
Loading…
Reference in a new issue