Hi here !
I try to manage a shopping list with HA on a Waveshare ESP32 S3 7" touch display. I managed to get the list from HA in a list of stuff separated by a “,”. Now, I want to dynamically create checkboxes depending on this list. Here is a part of my code. containertaches is a lvgl obj which acts as a parent for my checkboxes
text_sensor:
# Get open ToDos
- platform: homeassistant
id: todo_taches
entity_id: sensor.todo_taches_items
internal: true
on_value:
lambda: |-
// Erase datas
lv_obj_clean(containertaches);
// Get string from HA
std::string items = id(todo_taches).state;
// create an array with datas
std::vector<std::string> list;
size_t start = 0, end;
while ((end = items.find(',', start)) != std::string::npos) {
list.push_back(items.substr(start, end - start));
start = end + 1;
}
list.push_back(items.substr(start));
// Generate checkboxes
for (auto & item : list) {
lv_obj_t * cb = lv_obj_create(containertaches);
lv_obj_set_text(cb, item.c_str());
}
I have this error : error: ‘lv_checkbox_create’ was not declared in this scope
lv_obj_clean above works so compilator can get access to lgvl’s functions but not these one which exists in LVGL’s docs. When I look in Esphome’s docs, it sends me to the LVGL’s doc. Is there a list somewhere of functions actually supported by Esphome ? If you have any idea on how to fix this, I would be very happy also.
Thank you for your help.