1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-03 18:42:23 +01:00

Fix Nextion set_component_picture call (#6378)

This fixes the call to the Nextion display to change the pic id from a component.
It was previously changing the attribute `val`, which is related to something else.
In addition, I've changed the parameter for picture_id to be uint_8, as Nextion requires an integer from 0 to 255 on this attribute.
This commit is contained in:
Edward Firmo
2024-03-16 06:19:25 +01:00
committed by GitHub
parent 4f59b14ab0
commit e753ac3a97
2 changed files with 5 additions and 5 deletions

View File

@@ -197,8 +197,8 @@ void Nextion::disable_component_touch(const char *component) {
this->add_no_result_to_queue_with_printf_("disable_component_touch", "tsw %s,0", component);
}
void Nextion::set_component_picture(const char *component, const char *picture) {
this->add_no_result_to_queue_with_printf_("set_component_picture", "%s.val=%s", component, picture);
void Nextion::set_component_picture(const char *component, uint8_t picture_id) {
this->add_no_result_to_queue_with_printf_("set_component_picture", "%s.pic=%d", component, picture_id);
}
void Nextion::set_component_text(const char *component, const char *text) {