Compare commits

...

2 Commits

Author SHA1 Message Date
stefan-hoehn
b49a253bf7
Merge 20155f0cf1 into 6af04fc31f 2025-01-02 23:23:35 +01:00
Stefan Höhn
20155f0cf1 upnp: ignore negative volume values
Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
2024-12-28 11:02:30 +01:00

View File

@ -1113,6 +1113,11 @@ public class UpnpRendererHandler extends UpnpHandler {
long volume = Long.valueOf(value);
volume = volume * 100 / config.maxvolume;
if (volume < 0) {
logger.warn("UPnP device {} received invalid volume value {}", thing.getLabel(), value);
return;
}
String upnpChannel = variable.replace("Volume", "volume").replace("Master", "");
updateState(upnpChannel, new PercentType((int) volume));