From 7e22b9d23af7528fb9a404ace6a5d490faf95d3e Mon Sep 17 00:00:00 2001 From: Ryan howard Date: Thu, 19 Sep 2024 17:20:35 -0400 Subject: [PATCH] only do the toggle on > 2.20 --- api/src/opentrons/protocol_api/instrument_context.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/src/opentrons/protocol_api/instrument_context.py b/api/src/opentrons/protocol_api/instrument_context.py index aefb06e5fa5..98bdc8c1fc6 100644 --- a/api/src/opentrons/protocol_api/instrument_context.py +++ b/api/src/opentrons/protocol_api/instrument_context.py @@ -545,14 +545,16 @@ def mix( ), ): self.aspirate(volume, location, rate) - auto_presence = self.liquid_presence_detection - self.liquid_presence_detection = False + if self.api_version >= APIVersion(2, 20): + auto_presence = self.liquid_presence_detection + self.liquid_presence_detection = False while repetitions - 1 > 0: self.dispense(volume, rate=rate, **dispense_kwargs) self.aspirate(volume, rate=rate) repetitions -= 1 self.dispense(volume, rate=rate) - self.liquid_presence_detection = auto_presence + if self.api_version >= APIVersion(2, 20): + self.liquid_presence_detection = auto_presence return self @requires_version(2, 0)