This commit is contained in:
stefan-hoehn 2025-01-08 22:48:07 +01:00 committed by GitHub
commit d5503c6c46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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));