Mennekes: Assume full range limits if vehicle or cable can't report the max
parent
9a8377f93a
commit
4fb80af76e
|
|
@ -427,8 +427,13 @@ void IntegrationPluginMennekes::setupAmtronECUConnection(ThingSetupInfo *info)
|
|||
qCDebug(dcMennekes()) << "min current limit changed:" << minCurrentLimit;
|
||||
thing->setStateMinValue(amtronECUMaxChargingCurrentStateTypeId, minCurrentLimit);
|
||||
});
|
||||
connect(amtronECUConnection, &AmtronECUModbusTcpConnection::maxCurrentLimitChanged, thing, [thing](quint16 maxCurrentLimit) {
|
||||
connect(amtronECUConnection, &AmtronECUModbusTcpConnection::maxCurrentLimitChanged, thing, [this, thing](quint16 maxCurrentLimit) {
|
||||
qCDebug(dcMennekes()) << "max current limit changed:" << maxCurrentLimit;
|
||||
// If the vehicle or cable are not capable of reporting the maximum, this will be 0
|
||||
// We'll reset to the max defined in the json file in that case
|
||||
if (maxCurrentLimit == 0) {
|
||||
maxCurrentLimit = supportedThings().findById(amtronECUThingClassId).stateTypes().findById(amtronECUMaxChargingCurrentStateTypeId).maxValue().toUInt();
|
||||
}
|
||||
thing->setStateMaxValue(amtronECUMaxChargingCurrentStateTypeId, maxCurrentLimit);
|
||||
});
|
||||
connect(amtronECUConnection, &AmtronECUModbusTcpConnection::hemsCurrentLimitChanged, thing, [thing](quint16 hemsCurrentLimit) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue