diff --git a/src/linkplay/bridge.py b/src/linkplay/bridge.py index 6fc9d10..59e1bad 100644 --- a/src/linkplay/bridge.py +++ b/src/linkplay/bridge.py @@ -163,9 +163,9 @@ async def set_play_mode(self, mode: PlayingMode) -> None: async def play_preset(self, preset_number: int) -> None: """Play a preset.""" - max_number_of_presets_allowed = self.bridge.device.properties.get( + max_number_of_presets_allowed = int(self.bridge.device.properties.get( DeviceAttribute.PRESET_KEY, 10 - ) + )) if not 0 < preset_number <= max_number_of_presets_allowed: raise ValueError( f"Preset must be between 1 and {max_number_of_presets_allowed}."