mirror of
https://github.com/esphome/esphome.git
synced 2026-05-27 11:56:11 +08:00
[lvgl] Fix arc indicator widget not registered in widget_map (#14986)
This commit is contained in:
@@ -406,7 +406,7 @@ class MeterType(WidgetType):
|
|||||||
lv.scale_section_set_style(
|
lv.scale_section_set_style(
|
||||||
tvar, LV_PART.MAIN, await arc_style.get_var()
|
tvar, LV_PART.MAIN, await arc_style.get_var()
|
||||||
)
|
)
|
||||||
lw = Widget(tvar, arc_indicator_type)
|
lw = Widget.create(iid, tvar, arc_indicator_type)
|
||||||
await set_indicator_values(lw, v)
|
await set_indicator_values(lw, v)
|
||||||
|
|
||||||
if t == CONF_TICK_STYLE:
|
if t == CONF_TICK_STYLE:
|
||||||
|
|||||||
@@ -37,7 +37,11 @@ lvgl:
|
|||||||
on_resume:
|
on_resume:
|
||||||
logger.log: LVGL has resumed
|
logger.log: LVGL has resumed
|
||||||
on_boot:
|
on_boot:
|
||||||
logger.log: LVGL has started
|
- logger.log: LVGL has started
|
||||||
|
- lvgl.indicator.update:
|
||||||
|
id: meter_arc_indicator
|
||||||
|
start_value: 0
|
||||||
|
end_value: 180
|
||||||
bg_color: light_blue
|
bg_color: light_blue
|
||||||
disp_bg_color: color_id
|
disp_bg_color: color_id
|
||||||
disp_bg_image: cat_image
|
disp_bg_image: cat_image
|
||||||
@@ -1110,6 +1114,12 @@ lvgl:
|
|||||||
color: 0xA0A0A0
|
color: 0xA0A0A0
|
||||||
length: 80%
|
length: 80%
|
||||||
opa: 0%
|
opa: 0%
|
||||||
|
- arc:
|
||||||
|
id: meter_arc_indicator
|
||||||
|
color: 0xFF0000
|
||||||
|
width: 6
|
||||||
|
start_value: 0
|
||||||
|
end_value: 360
|
||||||
- id: page3
|
- id: page3
|
||||||
layout: Horizontal
|
layout: Horizontal
|
||||||
pad_all: 6px
|
pad_all: 6px
|
||||||
|
|||||||
Reference in New Issue
Block a user