From 7ce7228a857b1c5d23e16784142aeb682dc8dd99 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Tue, 26 Jan 2021 18:14:28 +0100 Subject: [PATCH] [sonos] Fix sub/surround controls (#9961) Related to #9874 Signed-off-by: Laurent Garnier --- .../openhab/binding/sonos/internal/SonosXMLParser.java | 8 ++++++++ .../binding/sonos/internal/handler/ZonePlayerHandler.java | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java index 1d53b7ce2..3457e9020 100644 --- a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java +++ b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosXMLParser.java @@ -869,6 +869,14 @@ public class SonosXMLParser { case "Bass": case "Treble": case "OutputFixed": + case "NightMode": + case "DialogLevel": + case "SubEnabled": + case "SubGain": + case "SurroundEnabled": + case "SurroundMode": + case "SurroundLevel": + case "MusicSurroundLevel": val = attributes == null ? null : attributes.getValue("val"); if (val != null) { changes.put(qName, val); diff --git a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java index fdb86ce81..f335fc4cf 100644 --- a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java +++ b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/handler/ZonePlayerHandler.java @@ -2028,7 +2028,7 @@ public class ZonePlayerHandler extends BaseThingHandler implements UpnpIOPartici } public void setSubwoofer(Command command) { - setEqualizerBooleanSetting(command, "SubEnabled"); + setEqualizerBooleanSetting(command, "SubEnable"); } public void setSubwooferGain(Command command) { @@ -2036,7 +2036,7 @@ public class ZonePlayerHandler extends BaseThingHandler implements UpnpIOPartici } public void setSurround(Command command) { - setEqualizerBooleanSetting(command, "SurroundEnabled"); + setEqualizerBooleanSetting(command, "SurroundEnable"); } public void setSurroundMusicMode(Command command) {