Make minimal charging current writable and update the state value on action executed
parent
eeb5bb23a3
commit
ba3254dc46
|
|
@ -899,6 +899,9 @@ void IntegrationPluginGenericThings::executeAction(ThingActionInfo *info)
|
|||
thing->setStateValue(carBatteryLevelStateTypeId, action.paramValue(carBatteryLevelActionBatteryLevelParamTypeId));
|
||||
thing->setStateValue(carBatteryCriticalStateTypeId, action.paramValue(carBatteryLevelActionBatteryLevelParamTypeId).toInt() < 10);
|
||||
info->finish(Thing::ThingErrorNoError);
|
||||
} else if (action.actionTypeId() == carMinimalChargingCurrentActionTypeId) {
|
||||
thing->setStateValue(carMinimalChargingCurrentStateTypeId, action.paramValue(carMinimalChargingCurrentActionMinimalChargingCurrentParamTypeId).toUInt());
|
||||
info->finish(Thing::ThingErrorNoError);
|
||||
}
|
||||
} else {
|
||||
Q_ASSERT_X(false, "executeAction", QString("Unhandled thingClassId: %1").arg(thing->thingClassId().toString()).toUtf8());
|
||||
|
|
|
|||
|
|
@ -1819,6 +1819,7 @@
|
|||
"name": "minimalChargingCurrent",
|
||||
"displayName": "Minimal charging current",
|
||||
"displayNameEvent": "Minimal charging current changed",
|
||||
"displayNameAction": "Set minimal charging current",
|
||||
"type": "uint",
|
||||
"unit": "Ampere",
|
||||
"writable": true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue