Get an ESPHome device's LVGL styles
esphome_lvgl_get_stylesReads LVGL theme, style definitions, and gradients from an ESPHome device's YAML config. Use it to check available styles before referencing them in new widgets.
Instructions
Get the LVGL theme and style definitions from an ESPHome device config.
Parses the device's YAML and reads the lvgl: section's theme,
style_definitions and gradients keys.
Use when: checking what theme/styles a device's LVGL UI currently uses
before referencing a style name in a new widget.
Not for: page/widget content — use esphome_lvgl_get_pages/
esphome_lvgl_get_page_widgets.
Returns: {"device", "theme", "style_definitions", "gradients"}.
Errors: {"error": "..."} when the file can't be found/parsed, or when
there is no lvgl: section in the device config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_name | Yes | Device name, with or without the '.yaml' suffix, e.g. 'kitchen_display'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||