updated to fit the new evcharger interface

master
Boernsman 2021-02-15 16:51:03 +01:00
parent 59510f23ea
commit 92c7ce7494
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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",