From 232caaaeeea57f7f83c8d874c7ad669df05323f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Fri, 6 Oct 2023 21:04:22 +0200 Subject: [PATCH] [tesla] Remove the minimum 5A charge current limit 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. Leave the limiting/validation of values >32A up to the API, not this addon. Signed-off-by: Ulrich Spörlein --- .../binding/tesla/internal/handler/TeslaVehicleHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 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 826316f5e6ef5..ff6b7da000199 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,9 +283,8 @@ 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); - return; + if (amps < 5) { + logger.warn("Charging amps should be set higher than 5A to avoid excessive losses."); } setChargingAmps(amps); }