Add smooth brightness change for dimmable zigbee lights

This commit is contained in:
Simon Stürz 2020-11-30 17:45:29 +01:00
parent 482a7d90e3
commit e835bdb326

View File

@ -705,7 +705,7 @@ void IntegrationPluginZigbeeGenericLights::executeBrightnessAction(ThingActionIn
return;
}
ZigbeeClusterReply *reply = levelCluster->commandMoveToLevelWithOnOff(level);
ZigbeeClusterReply *reply = levelCluster->commandMoveToLevelWithOnOff(level, 5);
connect(reply, &ZigbeeClusterReply::finished, info, [=](){
// Note: reply will be deleted automatically
if (reply->error() != ZigbeeClusterReply::ErrorNoError) {
@ -755,7 +755,7 @@ void IntegrationPluginZigbeeGenericLights::executeColorAction(ThingActionInfo *i
// Note: time unit is 1/10 s
QPoint colorXyInt = ZigbeeUtils::convertColorToXYInt(color);
ZigbeeClusterReply *reply = colorCluster->commandMoveToColor(colorXyInt.x(), colorXyInt.y(), 2);
ZigbeeClusterReply *reply = colorCluster->commandMoveToColor(colorXyInt.x(), colorXyInt.y(), 5);
connect(reply, &ZigbeeClusterReply::finished, info, [=](){
// Note: reply will be deleted automatically
if (reply->error() != ZigbeeClusterReply::ErrorNoError) {