1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00

[lvgl] fix bg_image_src (#8005)

Co-authored-by: clydeps <U5yx99dok9>
This commit is contained in:
Clyde Stubbs
2025-01-13 05:42:03 +11:00
committed by GitHub
parent 4530e4d60f
commit 8a98b69a57
4 changed files with 14 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ from ..defines import (
CONF_START_VALUE,
CONF_TICKS,
)
from ..helpers import add_lv_use
from ..helpers import add_lv_use, lvgl_components_required
from ..lv_validation import (
angle,
get_end_value,
@@ -182,6 +182,7 @@ class MeterType(WidgetType):
async def to_code(self, w: Widget, config):
"""For a meter object, create and set parameters"""
lvgl_components_required.add(CONF_METER)
var = w.obj
for scale_conf in config.get(CONF_SCALES, ()):
rotation = 90 + (360 - scale_conf[CONF_ANGLE_RANGE]) / 2