From 06d245b3fac704d59a19bcdf8ff25b89453dd0f3 Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Tue, 19 Oct 2021 22:00:25 +0200 Subject: [PATCH] Fix compile error for uptime sensor with esp-idf (#1534) Co-authored-by: Maurice Makaay --- components/sensor/uptime.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/sensor/uptime.rst b/components/sensor/uptime.rst index 04dc86209..58fbff2d0 100644 --- a/components/sensor/uptime.rst +++ b/components/sensor/uptime.rst @@ -56,10 +56,10 @@ with human readable output. int minutes = seconds / 60; seconds = seconds % 60; return ( - (days ? String(days) + "d " : "") + - (hours ? String(hours) + "h " : "") + - (minutes ? String(minutes) + "m " : "") + - (String(seconds) + "s") + (days ? to_string(days) + "d " : "") + + (hours ? to_string(hours) + "h " : "") + + (minutes ? to_string(minutes) + "m " : "") + + (to_string(seconds) + "s") ).c_str(); See Also