Nanoleaf Updates (#1724)

* Add new devices

* Do not restore ExtControl state
This commit is contained in:
LordGrey
2024-04-16 21:57:51 +02:00
committed by GitHub
parent c2fe42a731
commit aca757138e
3 changed files with 11 additions and 3 deletions

View File

@@ -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;
}
@@ -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;

View File

@@ -179,7 +179,11 @@ private:
LIGHT_LINES = 17,
LIGHT_LINES_SINGLZONE = 18,
CONTROLLER_CAP = 19,
POWER_CONNECTOR = 20
POWER_CONNECTOR = 20,
NL_4D_LIGHTSTRIP = 29,
SKYLIGHT_PANEL = 30,
SKYLIGHT_CONTROLLER_PRIMARY = 31,
SKYLIGHT_CONTROLLER_PASSIV = 32
};
///