diff --git a/include/hueplusplus/Bridge.h b/include/hueplusplus/Bridge.h
index 4a214fb..44dcab0 100644
--- a/include/hueplusplus/Bridge.h
+++ b/include/hueplusplus/Bridge.h
@@ -174,6 +174,9 @@ public:
//! \brief Sets refresh interval for the whole bridge state.
//! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever.
+ //!
+ //! Also sets refresh duration on all resource lists on the bridge, but not on already existing lights.
+ //! The resource lists (such as lights()) can have their own durations, but those must be set after calling this function.
void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration);
//! \brief Function to get the ip address of the hue bridge
diff --git a/src/Bridge.cpp b/src/Bridge.cpp
index 07d8835..f35af79 100644
--- a/src/Bridge.cpp
+++ b/src/Bridge.cpp
@@ -20,6 +20,8 @@
along with hueplusplus. If not, see .
**/
+#include "hueplusplus/Bridge.h"
+
#include
#include
#include
@@ -29,7 +31,6 @@
#include
#include
-#include "hueplusplus/Bridge.h"
#include "hueplusplus/HueExceptionMacro.h"
#include "hueplusplus/LibConfig.h"
#include "hueplusplus/UPnP.h"
@@ -185,6 +186,13 @@ void Bridge::refresh()
void Bridge::setRefreshDuration(std::chrono::steady_clock::duration refreshDuration)
{
stateCache->setRefreshDuration(refreshDuration);
+ lightList.setRefreshDuration(refreshDuration);
+ groupList.setRefreshDuration(refreshDuration);
+ scheduleList.setRefreshDuration(refreshDuration);
+ sceneList.setRefreshDuration(refreshDuration);
+ sensorList.setRefreshDuration(refreshDuration);
+ ruleList.setRefreshDuration(refreshDuration);
+ bridgeConfig.setRefreshDuration(refreshDuration);
}
std::string Bridge::getBridgeIP() const