Skip to content

Commit

Permalink
Update automations.rst (#3076)
Browse files Browse the repository at this point in the history
Added .c_str() for string output in logger example. 
On line 290, changed:

ESP_LOGD(TAG, "%s: %d", id(my_global_string), id(my_global_int));

to:

ESP_LOGD(TAG, "%s: %d", id(my_global_string).c_str(), id(my_global_int));
  • Loading branch information
KevynWithaY authored Jul 18, 2023
1 parent 046e7ba commit e2ae2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/automations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ global variables can be used to store the state of a garage door.
id(my_global_int) += 10;
}
ESP_LOGD(TAG, "%s: %d", id(my_global_string), id(my_global_int));
ESP_LOGD(TAG, "%s: %d", id(my_global_string).c_str(), id(my_global_int));
Configuration variables:

Expand Down

0 comments on commit e2ae2de

Please sign in to comment.