|
@@ -318,7 +318,13 @@ void MiLightClient::update(JsonObject request) {
|
|
|
|
|
|
|
|
// Always turn on first
|
|
// Always turn on first
|
|
|
if (parsedStatus == ON) {
|
|
if (parsedStatus == ON) {
|
|
|
- if (transition == 0) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ transition == 0
|
|
|
|
|
+ // Do not generate a transition if a brightness field is also set, since that will also
|
|
|
|
|
+ // generate a transition.
|
|
|
|
|
+ || request.containsKey(GroupStateFieldNames::BRIGHTNESS)
|
|
|
|
|
+ || request.containsKey(GroupStateFieldNames::LEVEL)
|
|
|
|
|
+ ) {
|
|
|
this->updateStatus(ON);
|
|
this->updateStatus(ON);
|
|
|
} else {
|
|
} else {
|
|
|
handleTransition(GroupStateField::STATUS, status, transition);
|
|
handleTransition(GroupStateField::STATUS, status, transition);
|