Skip to content

Commit

Permalink
Do not restore ExtControl state
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey committed Apr 13, 2024
1 parent c5ebba4 commit 2c41163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libsrc/leddevice/dev_net/LedDeviceNanoleaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ bool LedDeviceNanoleaf::storeState()
QJsonObject effects = responseEffects.getBody().object();
DebugIf(verbose, _log, "effects: [%s]", QString(QJsonDocument(_originalStateProperties).toJson(QJsonDocument::Compact)).toUtf8().constData());
_originalEffect = effects[API_EFFECT_SELECT].toString();
_originalIsDynEffect = _originalEffect == "*Dynamic*" || _originalEffect == "*Solid*";
_originalIsDynEffect = _originalEffect != "*Dynamic*" || _originalEffect == "*Solid*" || _originalEffect == "*ExtControl*";
}
break;
}
Expand Down Expand Up @@ -759,7 +759,7 @@ bool LedDeviceNanoleaf::restoreState()
}
}
else {
Warning(_log, "%s restoring effect failed with error: Cannot restore dynamic or solid effect. Device is switched off", QSTRING_CSTR(_activeDeviceType));
Info(_log, "%s cannot restore dynamic or solid effects. Device is switched off instead", QSTRING_CSTR(_activeDeviceType));
_originalIsOn = false;
}
break;
Expand Down

0 comments on commit 2c41163

Please sign in to comment.