[tesla] Remove the minimum 5A charge current limit (#15711)

While the app can't go lower than 5A, the API allows setting values down
to 0A, and at least going to 2-3A can make sense if you want to put
excess solar power into the car without also drawing some from the grid.

Due to the overhead this causes it can be wasteful, so keep logging the
warning about going below 5A.

Signed-off-by: Ulrich Spörlein <uspoerlein@gmail.com>
This commit is contained in:
uqs 2023-10-11 23:10:37 +02:00 committed by GitHub
parent 7f32499a8a
commit 2797e6f278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,10 +283,13 @@ public class TeslaVehicleHandler extends BaseThingHandler {
}
}
if (amps != null) {
if (amps < 5 || amps > 32) {
logger.warn("Charging amps can only be set in a range of 5-32A, but not to {}A.", amps);
if (amps > 32) {
logger.warn("Charging amps cannot be set higher than 32A, {}A was requested", amps);
return;
}
if (amps < 5) {
logger.info("Charging amps should be set higher than 5A to avoid excessive losses.");
}
setChargingAmps(amps);
}
break;