Skip to content

Commit

Permalink
push fix
Browse files Browse the repository at this point in the history
  • Loading branch information
silamon authored Nov 2, 2024
1 parent 587aeb8 commit d9b6dd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linkplay/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}."
Expand Down

0 comments on commit d9b6dd2

Please sign in to comment.