From afdaf4e5e249f0c0747c7014c3277d4cf0b5b14d Mon Sep 17 00:00:00 2001 From: lolodomo Date: Wed, 14 Aug 2024 13:58:45 +0200 Subject: [PATCH] [freeboxos] Avoid a call to the lcd API when no required (#17254) Fix #17253 Signed-off-by: Laurent Garnier Signed-off-by: Ciprian Pascu --- .../freeboxos/internal/handler/RevolutionHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/RevolutionHandler.java b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/RevolutionHandler.java index b687fdedb57..8a9f914cad9 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/RevolutionHandler.java +++ b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/RevolutionHandler.java @@ -47,18 +47,17 @@ public class RevolutionHandler extends ServerHandler { @Override protected boolean internalHandleCommand(String channelId, Command command) throws FreeboxException { LcdManager manager = getManager(LcdManager.class); - Config config = manager.getConfig(); switch (channelId) { case LCD_BRIGHTNESS: - setBrightness(manager, config, command); + setBrightness(manager, manager.getConfig(), command); internalPoll(); return true; case LCD_ORIENTATION: - setOrientation(manager, config, command); + setOrientation(manager, manager.getConfig(), command); internalPoll(); return true; case LCD_FORCED: - setForced(manager, config, command); + setForced(manager, manager.getConfig(), command); internalPoll(); return true; }