From 57d1c2bfed47bd76678d7aef40f6c3881a17d748 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sun, 11 Aug 2024 09:32:21 +0200 Subject: [PATCH] [freeboxos] Remove veto policy on key-code channel (#17224) This allows to have as status the last command sent. Signed-off-by: Laurent Garnier Signed-off-by: Christian Koch --- .../binding/freeboxos/internal/handler/PlayerHandler.java | 4 ++-- .../src/main/resources/OH-INF/thing/channel-types.xml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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 fc89e510a5653..5504ccd97cd53 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 void sendKey(String key, boolean longPress, int count) { 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 bf1c744156913..a600362214742 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