updated to fit the new evcharger interface
parent
59510f23ea
commit
92c7ce7494
|
|
@ -185,7 +185,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info)
|
||||||
thing->setStateValue(liveWallboxPowerActionTypeId, enabled);
|
thing->setStateValue(liveWallboxPowerActionTypeId, enabled);
|
||||||
int ampere = 0;
|
int ampere = 0;
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
ampere = thing->stateValue(liveWallboxChargeCurrentStateTypeId).toInt();
|
ampere = thing->stateValue(liveWallboxMaxChargingCurrentStateTypeId).toInt();
|
||||||
}
|
}
|
||||||
QUuid requestId = connection->setChargeCurrent(ampere);
|
QUuid requestId = connection->setChargeCurrent(ampere);
|
||||||
if (requestId.isNull()) {
|
if (requestId.isNull()) {
|
||||||
|
|
@ -193,9 +193,9 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info)
|
||||||
} else {
|
} else {
|
||||||
m_asyncActions.insert(requestId, info);
|
m_asyncActions.insert(requestId, info);
|
||||||
}
|
}
|
||||||
} else if (action.actionTypeId() == liveWallboxChargeCurrentActionTypeId) {
|
} else if (action.actionTypeId() == liveWallboxMaxChargingCurrentActionTypeId) {
|
||||||
int ampere = action.paramValue(liveWallboxChargeCurrentActionChargeCurrentParamTypeId).toInt();
|
int ampere = action.paramValue(liveWallboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt();
|
||||||
thing->setStateValue(liveWallboxChargeCurrentStateTypeId, ampere);
|
thing->setStateValue(liveWallboxMaxChargingCurrentStateTypeId, ampere);
|
||||||
QUuid requestId = connection->setChargeCurrent(ampere);
|
QUuid requestId = connection->setChargeCurrent(ampere);
|
||||||
if (requestId.isNull()) {
|
if (requestId.isNull()) {
|
||||||
info->finish(Thing::ThingErrorHardwareFailure);
|
info->finish(Thing::ThingErrorHardwareFailure);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "96ed77ce-c5cf-4981-8a72-b619f5702724",
|
"id": "96ed77ce-c5cf-4981-8a72-b619f5702724",
|
||||||
"name": "chargeCurrent",
|
"name": "maxChargingCurrent",
|
||||||
"displayName": "Charging current",
|
"displayName": "Charging current",
|
||||||
"displayNameAction": "Set charging current",
|
"displayNameAction": "Set charging current",
|
||||||
"displayNameEvent": "Charging current changed",
|
"displayNameEvent": "Charging current changed",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue