diff --git a/vestel/integrationpluginvestel.cpp b/vestel/integrationpluginvestel.cpp index 6c62a82..052b17f 100644 --- a/vestel/integrationpluginvestel.cpp +++ b/vestel/integrationpluginvestel.cpp @@ -187,7 +187,7 @@ void IntegrationPluginVestel::executeAction(ThingActionInfo *info) // Note: only write the register if power is true, otherwise we would start charging. The state represents the desired current, // once the power is true, the current will be written to the corresponding current. - int maxChargingCurrent = info->action().paramValue(evc04MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); + quint16 maxChargingCurrent = static_cast(qRound(info->action().paramValue(evc04MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); if (info->thing()->stateValue(evc04PowerStateTypeId).toBool()) { qCDebug(dcVestel()) << "Write max charging current" << maxChargingCurrent; diff --git a/vestel/integrationpluginvestel.json b/vestel/integrationpluginvestel.json index 496f31c..2acb0b8 100644 --- a/vestel/integrationpluginvestel.json +++ b/vestel/integrationpluginvestel.json @@ -107,10 +107,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 1.0, "defaultValue": 6, "writable": true },