Skip to content

Commit

Permalink
[freeboxos] Remove veto policy on key-code channel (openhab#17224)
Browse files Browse the repository at this point in the history
This allows to have as status the last command sent.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Christian Koch <christian@koch-bensheim.de>
  • Loading branch information
lolodomo authored and chilobo committed Nov 20, 2024
1 parent 743c661 commit 57d1c2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@
<option value="home">Home</option>
</options>
</state>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>

<channel-type id="ip-address" advanced="true">
Expand Down

0 comments on commit 57d1c2b

Please sign in to comment.