mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Compare commits
2 Commits
d5503c6c46
...
b49a253bf7
Author | SHA1 | Date | |
---|---|---|---|
|
b49a253bf7 | ||
|
20155f0cf1 |
@ -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