mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Merge 20155f0cf1
into adacdebb9f
This commit is contained in:
commit
d5503c6c46
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user