Skip to content

Commit

Permalink
Cast iteraction value for framework compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn committed Dec 13, 2024
1 parent ac8c775 commit d619c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/nspanel_esphome_standard_page_buttons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ script:
const uint8_t index = (current_page_id-${PAGE_ID_BUTTONPAGE01})*8 + iteration;
if (is_button_in_mask(index, PageButtonsMaskEnabled)) {
char component[10];
sprintf(component, "button%02lu", iteration+1);
snprintf(component, sizeof(component), "button%02" PRIu8, static_cast<uint8_t>(iteration + 1));
ESP_LOGD("script.page_buttonpage", "Updating state of %s - %s",
current_page->state.c_str(), component);
page_buttonpage_button_renderer->execute(index, current_page_id, component);
Expand Down

0 comments on commit d619c54

Please sign in to comment.