diff --git a/custom_components/oasis_mini/pyoasiscontrol/device.py b/custom_components/oasis_mini/pyoasiscontrol/device.py index 73ebba9..721dd3c 100644 --- a/custom_components/oasis_mini/pyoasiscontrol/device.py +++ b/custom_components/oasis_mini/pyoasiscontrol/device.py @@ -654,7 +654,7 @@ class OasisDevice: Accepts a single track ID or an iterable of track IDs, stops the device, replaces the playlist, and resumes playback based on the `start_playing` - parameter or, if unspecified, the device’s prior playing state. + parameter or, if unspecified, the device's prior playing state. Parameters: playlist (int | Iterable[int]): @@ -666,12 +666,12 @@ class OasisDevice: """ playlist = [playlist] if isinstance(playlist, int) else list(playlist) if start_playing is None: - start_playing = self.status_code == STATUS_PLAYING and len(playlist) > 0 + start_playing = self.status_code == STATUS_PLAYING client = self._require_client() await client.async_send_stop_command(self) # needed before replacing playlist await client.async_send_set_playlist_command(self, playlist) - if start_playing: + if start_playing and len(playlist) > 0: await client.async_send_play_command(self) async def async_set_repeat_playlist(self, repeat: bool) -> None: