Files
esphome/tests/components/lvgl/common.yaml
J. Nick Koston 100ea46f03
CI / Create common environment (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run pytest (macOS-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Run pytest (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Run pytest (windows-latest, 3.11) (push) Has been cancelled
CI / Determine which jobs to run (push) Has been cancelled
CI / Run integration tests (push) Has been cancelled
CI / Run C++ unit tests (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Run script/clang-tidy for ZEPHYR (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Test components batch (${{ matrix.components }}) (push) Has been cancelled
CI / pre-commit.ci lite (push) Has been cancelled
CI / Build target branch for memory impact (push) Has been cancelled
CI / Build PR branch for memory impact (push) Has been cancelled
CI / Comment memory impact (push) Has been cancelled
CI / CI Status (push) Has been cancelled
[tests] Fix SNTP time ID conflicts in component tests for grouped testing (#11990)
2025-11-18 23:19:54 -06:00

144 lines
3.1 KiB
YAML

touchscreen:
- platform: ft63x6
i2c_id: i2c_bus
id: tft_touch
display: tft_display
update_interval: 50ms
threshold: 1
font:
- file: "$component_dir/roboto.ttf"
id: roboto20
size: 20
- file: "$component_dir/helvetica.ttf"
id: helvetica20
- file: "$component_dir/roboto.ttf"
id: roboto10
size: 10
bpp: 4
sensor:
- platform: lvgl
id: lvgl_sensor_id
name: "LVGL Arc Sensor"
widget: lv_arc
- platform: lvgl
widget: slider_id
name: LVGL Slider Sensor
- platform: lvgl
widget: bar_id
id: lvgl_bar_sensor
name: LVGL Bar Sensor
- platform: lvgl
widget: spinbox_id
name: LVGL Spinbox Sensor
number:
- platform: lvgl
widget: slider_id
name: LVGL Slider Number
update_on_release: true
restore_value: true
- platform: lvgl
widget: lv_arc
id: lvgl_arc_number
name: LVGL Arc Number
- platform: lvgl
widget: bar_id
id: lvgl_bar_number
name: LVGL Bar Number
- platform: lvgl
widget: spinbox_id
id: lvgl_spinbox_number
name: LVGL Spinbox Number
- platform: template
id: test_brightness
name: "Test Brightness"
min_value: 0
max_value: 255
step: 1
optimistic: true
# Test lambda in automation accessing x parameter directly
# This is a real-world pattern from user configs
on_value:
- lambda: !lambda |-
// Direct use of x parameter in automation
ESP_LOGD("test", "Brightness: %.0f", x);
light:
- platform: lvgl
name: LVGL LED
id: lv_light
widget: lv_led
binary_sensor:
- platform: lvgl
id: lvgl_pressbutton
name: Pressbutton
widget: spin_up
trigger_on_initial_state: true
- platform: lvgl
name: ButtonMatrix button
widget: button_a
- platform: lvgl
id: switch_d
name: Matrix switch D
widget: button_d
on_click:
then:
- lvgl.page.previous:
animation: move_right
time: 600ms
- platform: lvgl
id: button_checker
name: LVGL button
widget: spin_up
on_state:
then:
- lvgl.checkbox.update:
id: checkbox_id
state:
checked: !lambda return x;
text: Unchecked
- platform: lvgl
name: LVGL checkbox
widget: checkbox_id
on_state:
then:
- lvgl.image.update:
id: lv_image
src: !lambda if (x) return id(cat_image); else return id(dog_image);
wifi:
ssid: SSID
password: PASSWORD123
time:
- platform: sntp
id: sntp_time
text:
- id: lvgl_text
platform: lvgl
widget: hello_label
mode: text
text_sensor:
- platform: template
id: test_text_sensor
name: "Test Text Sensor"
# Test nested lambdas in LVGL actions can access automation parameters
on_value:
- lvgl.label.update:
id: hello_label
text: !lambda return x.c_str();
- lvgl.label.update:
id: hello_label
text: !lambda |-
// Test complex lambda with conditionals accessing x parameter
if (x == "*") {
return "WILDCARD";
}
return x.c_str();