WLED - Fix to not overwrite on state when not isStayOnAfterStreaming

This commit is contained in:
LordGrey 2023-02-10 20:30:45 +01:00
parent d82a90bf65
commit 8a177be974

View File

@ -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() )