From 8eb7136981aea634b18e813bb35b4d0fb31cc44e Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Mon, 4 Dec 2023 12:31:21 +0100 Subject: [PATCH] Additional delay for exchange rate fetch --- lib/EntsoePriceApi/src/EntsoeApi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/EntsoePriceApi/src/EntsoeApi.cpp b/lib/EntsoePriceApi/src/EntsoeApi.cpp index 53a09df4..5039364e 100644 --- a/lib/EntsoePriceApi/src/EntsoeApi.cpp +++ b/lib/EntsoePriceApi/src/EntsoeApi.cpp @@ -317,7 +317,7 @@ float EntsoeApi::getCurrencyMultiplier(const char* from, const char* to, time_t if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("(EntsoeApi) Resulting currency multiplier: %.4f\n"), currencyMultiplier); tmElements_t tm; breakTime(t, tm); - lastCurrencyFetch = now + (SECS_PER_DAY * 1000) - (((((tm.Hour * 60) + tm.Minute) * 60) + tm.Second) * 1000) + (3600000 * 6); + lastCurrencyFetch = now + (SECS_PER_DAY * 1000) - (((((tm.Hour * 60) + tm.Minute) * 60) + tm.Second) * 1000) + (3600000 * 6) + (tomorrowFetchMinute * 60); this->currencyMultiplier = currencyMultiplier; } else { if(debugger->isActive(RemoteDebug::WARNING)) debugger->printf_P(PSTR("(EntsoeApi) Multiplier ended in success, but without value\n"));