1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

[lvgl] Add start_value to bar; make values templatable and updateable (#9056)

This commit is contained in:
Clyde Stubbs
2025-06-23 12:23:41 +10:00
committed by GitHub
parent 2a45467bf6
commit 78ec9856fb
3 changed files with 49 additions and 21 deletions

View File

@@ -728,12 +728,15 @@ lvgl:
value: 30
max_value: 100
min_value: 10
start_value: 20
mode: range
on_click:
then:
- lvgl.bar.update:
id: bar_id
value: !lambda return (int)((float)rand() / RAND_MAX * 100);
start_value: !lambda return (int)((float)rand() / RAND_MAX * 100);
mode: symmetrical
- logger.log:
format: "bar value %f"
args: [x]