diff --git a/webasto/integrationpluginwebasto.cpp b/webasto/integrationpluginwebasto.cpp index a4407aa..f7e05af 100644 --- a/webasto/integrationpluginwebasto.cpp +++ b/webasto/integrationpluginwebasto.cpp @@ -185,7 +185,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) thing->setStateValue(liveWallboxPowerActionTypeId, enabled); int ampere = 0; if (enabled) { - ampere = thing->stateValue(liveWallboxChargeCurrentStateTypeId).toInt(); + ampere = thing->stateValue(liveWallboxMaxChargingCurrentStateTypeId).toInt(); } QUuid requestId = connection->setChargeCurrent(ampere); if (requestId.isNull()) { @@ -193,9 +193,9 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) } else { m_asyncActions.insert(requestId, info); } - } else if (action.actionTypeId() == liveWallboxChargeCurrentActionTypeId) { - int ampere = action.paramValue(liveWallboxChargeCurrentActionChargeCurrentParamTypeId).toInt(); - thing->setStateValue(liveWallboxChargeCurrentStateTypeId, ampere); + } else if (action.actionTypeId() == liveWallboxMaxChargingCurrentActionTypeId) { + int ampere = action.paramValue(liveWallboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); + thing->setStateValue(liveWallboxMaxChargingCurrentStateTypeId, ampere); QUuid requestId = connection->setChargeCurrent(ampere); if (requestId.isNull()) { info->finish(Thing::ThingErrorHardwareFailure); diff --git a/webasto/integrationpluginwebasto.json b/webasto/integrationpluginwebasto.json index e344844..824bb22 100644 --- a/webasto/integrationpluginwebasto.json +++ b/webasto/integrationpluginwebasto.json @@ -87,7 +87,7 @@ }, { "id": "96ed77ce-c5cf-4981-8a72-b619f5702724", - "name": "chargeCurrent", + "name": "maxChargingCurrent", "displayName": "Charging current", "displayNameAction": "Set charging current", "displayNameEvent": "Charging current changed",