From ee34dbcd1a66a7bcd86f977abf7967a8642ff05f Mon Sep 17 00:00:00 2001 From: ollo69 Date: Sun, 25 Feb 2024 20:22:24 +0000 Subject: [PATCH] Fix remote start issue for APIv1 device (issue #710) --- .../smartthinq_sensors/wideq/devices/washerDryer.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py b/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py index c52f3468..b6c5900f 100644 --- a/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py +++ b/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py @@ -391,9 +391,12 @@ def _prepare_course_info( break if op_course_key := self.get_course_key(CourseType.OPCOURSE): - if "OpCourse" in course_info: - ret_data[op_course_key] = course_info["OpCourse"] - else: + ref_opcourse_key = ( + "OpCourse" if self.model_info.is_info_v2 else op_course_key + ) + if ref_opcourse_key in course_info: + ret_data[op_course_key] = course_info[ref_opcourse_key] + elif self.model_info.is_info_v2: ret_data.pop(op_course_key, None) for func_key in course_info["function"]: