You are so welcome.
It is practically a plain copy of the start of the "Dlog start" script.
var defaultValues = storage.getItem("LiPoChargeValues", {
startCurrent: 1.5,
stopCurrent: 0.1,
maxChargeTime: 10,
});
var values = await input({
title: "Start Dlog",
fields: [
{
name: "startCurrent",
displayName: "Charging current",
unit: "current",
validators: [validators.rangeInclusive(0.1, 5)]
},
{
name: "stopCurrent",
displayName: "End ocf charge current",
unit: "current",
validators: [validators.rangeInclusive(0.01, 0.5)]
},
{
name: "maxChargeTime",
displayName: "Max charging time",
unit: "time",
validators: [validators.rangeInclusive(1, 86400000)]
}
]
}, defaultValues);
if (!values) {
session.deleteScriptLogEntry();
return;
}
storage.setItem("LiPoChargeValues", values);
session.scriptParameters = values;