]> git.basschouten.com Git - openhab-addons.git/commitdiff
[freeboxos] Remove veto policy on key-code channel (#17224)
authorlolodomo <lg.hc@free.fr>
Sun, 11 Aug 2024 07:32:21 +0000 (09:32 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Aug 2024 07:32:21 +0000 (09:32 +0200)
This allows to have as status the last command sent.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/handler/PlayerHandler.java
bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/channel-types.xml

index fc89e510a56532f9ebe623b784b13be50ca4a9b2..5504ccd97cd538b8d9c01a7c580f7b052ca79ed2 100644 (file)
@@ -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);
index bf1c744156913e4b434a0c11ab92f964a7247173..a600362214742c0693191a9e77932ee76f989d3e 100644 (file)
                                <option value="home">Home</option>
                        </options>
                </state>
-               <autoUpdatePolicy>veto</autoUpdatePolicy>
        </channel-type>
 
        <channel-type id="ip-address" advanced="true">