Skip to content

Commit

Permalink
Fix parsing to handle when volume is a float (openhab#11151)
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Hilbush <[email protected]>
Signed-off-by: Dave J Schoepel <[email protected]>
  • Loading branch information
mhilbush authored and dschoepel committed Nov 9, 2021
1 parent 209f49b commit 2bf5330
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ private void handleMixerMessage(String mac, String[] messageParts) {
String volumeStringValue = decode(messageParts[3]);
updatePlayer(listener -> {
try {
int volume = Integer.parseInt(volumeStringValue);
int volume = Math.round(Float.parseFloat(volumeStringValue));

// Check if we received a relative volume change, or an absolute
// volume value.
Expand Down

0 comments on commit 2bf5330

Please sign in to comment.