From: lolodomo Date: Sun, 11 Aug 2024 07:32:21 +0000 (+0200) Subject: [freeboxos] Remove veto policy on key-code channel (#17224) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=9b9cdd579b376d9e2c583a7bb761f8c6dbaa3b8d;p=openhab-addons.git [freeboxos] Remove veto policy on key-code channel (#17224) This allows to have as status the last command sent. Signed-off-by: Laurent Garnier --- diff --git a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/PlayerHandler.java b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/PlayerHandler.java index fc89e510a5..5504ccd97c 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/PlayerHandler.java +++ b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/PlayerHandler.java @@ -88,14 +88,14 @@ public class PlayerHandler extends HostHandler { logger.warn("Player IP is unknown"); } else if (VALID_REMOTE_KEYS.contains(aKey)) { String remoteCode = (String) getConfig().get(PlayerConfiguration.REMOTE_CODE); - if (remoteCode != null) { + if (remoteCode != null && !remoteCode.isBlank()) { try { getManager(PlayerManager.class).sendKey(ip.toCanonicalString(), remoteCode, aKey, longPress, count); } catch (FreeboxException e) { logger.warn("Error sending key: {}", e.getMessage()); } } else { - logger.warn("A remote code must be configured in the on the player thing."); + logger.warn("A remote code must be configured on the player thing."); } } else { logger.warn("Key '{}' is not a valid key expression", key); diff --git a/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/channel-types.xml b/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/channel-types.xml index bf1c744156..a600362214 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/channel-types.xml +++ b/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/channel-types.xml @@ -355,7 +355,6 @@ - veto