From 2797e6f278481502876e67291ff190f6de2033b0 Mon Sep 17 00:00:00 2001 From: uqs Date: Wed, 11 Oct 2023 23:10:37 +0200 Subject: [PATCH] [tesla] Remove the minimum 5A charge current limit (#15711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../tesla/internal/handler/TeslaVehicleHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java index 826316f5e..aa9525cff 100644 --- a/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java +++ b/bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/handler/TeslaVehicleHandler.java @@ -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;