mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
Fix compile error for uptime sensor with esp-idf (#1534)
Co-authored-by: Maurice Makaay <account-github@makaay.nl>
This commit is contained in:
parent
ffcd66ebe3
commit
06d245b3fa
@ -56,10 +56,10 @@ with human readable output.
|
|||||||
int minutes = seconds / 60;
|
int minutes = seconds / 60;
|
||||||
seconds = seconds % 60;
|
seconds = seconds % 60;
|
||||||
return (
|
return (
|
||||||
(days ? String(days) + "d " : "") +
|
(days ? to_string(days) + "d " : "") +
|
||||||
(hours ? String(hours) + "h " : "") +
|
(hours ? to_string(hours) + "h " : "") +
|
||||||
(minutes ? String(minutes) + "m " : "") +
|
(minutes ? to_string(minutes) + "m " : "") +
|
||||||
(String(seconds) + "s")
|
(to_string(seconds) + "s")
|
||||||
).c_str();
|
).c_str();
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
|
Loading…
Reference in New Issue
Block a user