From b35845cc997150d3fd9296d0dd6bcdfd8ee3c36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 28 Oct 2021 10:50:44 +0200 Subject: [PATCH] Update max charging current --- wallbe/integrationpluginwallbe.json | 2 +- webasto/integrationpluginwebasto.cpp | 4 ++-- webasto/integrationpluginwebasto.json | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wallbe/integrationpluginwallbe.json b/wallbe/integrationpluginwallbe.json index e968af2..aa7f37a 100644 --- a/wallbe/integrationpluginwallbe.json +++ b/wallbe/integrationpluginwallbe.json @@ -82,7 +82,7 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "double", + "type": "uint", "unit": "Ampere", "minValue": 6, "maxValue": 80, diff --git a/webasto/integrationpluginwebasto.cpp b/webasto/integrationpluginwebasto.cpp index 7b37899..0994652 100644 --- a/webasto/integrationpluginwebasto.cpp +++ b/webasto/integrationpluginwebasto.cpp @@ -209,7 +209,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) thing->setStateValue(liveWallboxPowerActionTypeId, enabled); int ampere = 0; if (enabled) { - ampere = thing->stateValue(liveWallboxMaxChargingCurrentStateTypeId).toInt(); + ampere = thing->stateValue(liveWallboxMaxChargingCurrentStateTypeId).toUInt(); } QUuid requestId = connection->setChargeCurrent(ampere); if (requestId.isNull()) { @@ -218,7 +218,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) m_asyncActions.insert(requestId, info); } } else if (action.actionTypeId() == liveWallboxMaxChargingCurrentActionTypeId) { - int ampere = action.paramValue(liveWallboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); + int ampere = action.paramValue(liveWallboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); thing->setStateValue(liveWallboxMaxChargingCurrentStateTypeId, ampere); QUuid requestId = connection->setChargeCurrent(ampere); if (requestId.isNull()) { diff --git a/webasto/integrationpluginwebasto.json b/webasto/integrationpluginwebasto.json index c1717a2..2844375 100644 --- a/webasto/integrationpluginwebasto.json +++ b/webasto/integrationpluginwebasto.json @@ -91,11 +91,11 @@ "displayName": "Charging current", "displayNameAction": "Set charging current", "displayNameEvent": "Charging current changed", - "type": "double", + "type": "uint", "unit": "Ampere", - "minValue": 6.00, - "maxValue": 80.00, - "defaultValue": 6.00, + "minValue": 6, + "maxValue": 80, + "defaultValue": 6, "writable": true }, {