From 8a177be97498c21a1990dc127ac269c81d526030 Mon Sep 17 00:00:00 2001 From: LordGrey Date: Fri, 10 Feb 2023 20:30:45 +0100 Subject: [PATCH] WLED - Fix to not overwrite on state when not isStayOnAfterStreaming --- libsrc/leddevice/dev_net/LedDeviceWled.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libsrc/leddevice/dev_net/LedDeviceWled.cpp b/libsrc/leddevice/dev_net/LedDeviceWled.cpp index 7b4fed2a..3aa4662f 100644 --- a/libsrc/leddevice/dev_net/LedDeviceWled.cpp +++ b/libsrc/leddevice/dev_net/LedDeviceWled.cpp @@ -523,7 +523,10 @@ bool LedDeviceWled::restoreState() _originalStateProperties[STATE_LIVE] = false; _originalStateProperties[STATE_TRANSITIONTIME_CURRENTCALL] = 0; - _originalStateProperties[STATE_ON] = _isStayOnAfterStreaming; + if (_isStayOnAfterStreaming) + { + _originalStateProperties[STATE_ON] = true; + } httpResponse response = _restApi->put(_originalStateProperties); if ( response.error() )