Use ama for backwards compatibility

This commit is contained in:
Simon Stürz 2021-09-30 11:53:21 +02:00
parent c4150a4d7b
commit 53fe473913

View File

@ -205,7 +205,7 @@ void IntegrationPluginGoECharger::executeAction(ThingActionInfo *info)
uint maxChargingCurrent = action.paramValue(goeHomeMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); uint maxChargingCurrent = action.paramValue(goeHomeMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt();
qCDebug(dcGoECharger()) << "Setting max charging current to" << maxChargingCurrent << "A"; qCDebug(dcGoECharger()) << "Setting max charging current to" << maxChargingCurrent << "A";
// Set the allow value // Set the allow value
QString configuration = QString("amx=%1").arg(maxChargingCurrent); QString configuration = QString("amp=%1").arg(maxChargingCurrent);
sendActionRequest(thing, info, configuration); sendActionRequest(thing, info, configuration);
return; return;
} else if (action.actionTypeId() == goeHomeAbsoluteMaxAmpereActionTypeId) { } else if (action.actionTypeId() == goeHomeAbsoluteMaxAmpereActionTypeId) {
@ -346,7 +346,7 @@ void IntegrationPluginGoECharger::update(Thing *thing, const QVariantMap &status
thing->setStateValue(goeHomeUpdateAvailableStateTypeId, (statusMap.value("upd").toUInt() == 0 ? false : true)); thing->setStateValue(goeHomeUpdateAvailableStateTypeId, (statusMap.value("upd").toUInt() == 0 ? false : true));
thing->setStateValue(goeHomeCloudStateTypeId, (statusMap.value("cdi").toUInt() == 0 ? false : true)); thing->setStateValue(goeHomeCloudStateTypeId, (statusMap.value("cdi").toUInt() == 0 ? false : true));
thing->setStateValue(goeHomeFirmwareVersionStateTypeId, statusMap.value("fwv").toString()); thing->setStateValue(goeHomeFirmwareVersionStateTypeId, statusMap.value("fwv").toString());
thing->setStateValue(goeHomeMaxChargingCurrentStateTypeId, statusMap.value("amx").toUInt()); thing->setStateValue(goeHomeMaxChargingCurrentStateTypeId, statusMap.value("amp").toUInt());
thing->setStateValue(goeHomeLedBrightnessStateTypeId, statusMap.value("lbr").toUInt()); thing->setStateValue(goeHomeLedBrightnessStateTypeId, statusMap.value("lbr").toUInt());
thing->setStateValue(goeHomeLedEnergySaveStateTypeId, statusMap.value("lse").toBool()); thing->setStateValue(goeHomeLedEnergySaveStateTypeId, statusMap.value("lse").toBool());
thing->setStateValue(goeHomeSerialNumberStateTypeId, statusMap.value("sse").toString()); thing->setStateValue(goeHomeSerialNumberStateTypeId, statusMap.value("sse").toString());