Skip to content

Commit

Permalink
[tesla] Remove the minimum 5A charge current limit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
uqs committed Oct 10, 2023
1 parent b9286b0 commit 39f23b1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,13 @@ public void handleCommand(ChannelUID channelUID, Command command) {
}
}
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;
Expand Down

0 comments on commit 39f23b1

Please sign in to comment.