Merge PR #382: Simulation: EV Charger update interface
This commit is contained in:
commit
72f97880ce
@ -248,7 +248,7 @@ void IntegrationPluginSimulation::executeAction(ThingActionInfo *info)
|
|||||||
} else if(action.actionTypeId() == evChargerMaxChargingCurrentActionTypeId){
|
} else if(action.actionTypeId() == evChargerMaxChargingCurrentActionTypeId){
|
||||||
// get the param value
|
// get the param value
|
||||||
Param maxChargeParam = action.param(evChargerMaxChargingCurrentActionMaxChargingCurrentParamTypeId);
|
Param maxChargeParam = action.param(evChargerMaxChargingCurrentActionMaxChargingCurrentParamTypeId);
|
||||||
uint maxCharge = maxChargeParam.value().toInt();
|
double maxCharge = maxChargeParam.value().toDouble();
|
||||||
qCDebug(dcSimulation()) << "Set maximum charging current to" << maxCharge << "for EV Charger device" << thing->name();
|
qCDebug(dcSimulation()) << "Set maximum charging current to" << maxCharge << "for EV Charger device" << thing->name();
|
||||||
thing->setStateValue(evChargerMaxChargingCurrentStateTypeId, maxCharge);
|
thing->setStateValue(evChargerMaxChargingCurrentStateTypeId, maxCharge);
|
||||||
return info->finish(Thing::ThingErrorNoError);
|
return info->finish(Thing::ThingErrorNoError);
|
||||||
|
|||||||
@ -204,7 +204,7 @@
|
|||||||
"name": "evCharger",
|
"name": "evCharger",
|
||||||
"displayName": "EV Charging Station",
|
"displayName": "EV Charging Station",
|
||||||
"createMethods": ["user"],
|
"createMethods": ["user"],
|
||||||
"interfaces": ["extendedevcharger"],
|
"interfaces": ["evcharger"],
|
||||||
"paramTypes": [ ],
|
"paramTypes": [ ],
|
||||||
"stateTypes": [
|
"stateTypes": [
|
||||||
{
|
{
|
||||||
@ -223,11 +223,11 @@
|
|||||||
"displayName": "Maximum charging current",
|
"displayName": "Maximum charging current",
|
||||||
"displayNameEvent": "MAximum charging current changed",
|
"displayNameEvent": "MAximum charging current changed",
|
||||||
"displayNameAction": "Set maximum charging current",
|
"displayNameAction": "Set maximum charging current",
|
||||||
"type": "uint",
|
"type": "double",
|
||||||
"unit": "MilliAmpere",
|
"unit": "Ampere",
|
||||||
"defaultValue": 0,
|
"defaultValue": 6,
|
||||||
"minValue": 6000,
|
"minValue": 6,
|
||||||
"maxValue": 80000,
|
"maxValue": 80,
|
||||||
"writable": true
|
"writable": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user