Skip to content

Commit

Permalink
chore: ruff RET508 (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokam authored Jun 15, 2024
1 parent 00a2ac1 commit e2189a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions midealocal/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def refresh_status(self, wait_response: bool = False) -> None:
result = self.parse_message(msg)
if result == ParseMessageResult.SUCCESS:
break
elif result == ParseMessageResult.PADDING:
if result == ParseMessageResult.PADDING:
continue
else:
error_count += 1
Expand Down Expand Up @@ -515,7 +515,7 @@ def run(self) -> None:
_LOGGER.debug("[%s] Message 'ERROR' received", self._device_id)
self.close_socket()
break
elif result == ParseMessageResult.SUCCESS:
if result == ParseMessageResult.SUCCESS:
timeout_counter = 0
except TimeoutError:
timeout_counter = timeout_counter + 1
Expand Down
3 changes: 1 addition & 2 deletions midealocal/devices/ac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ def process_message(self, msg: bytes) -> dict[str, Any]:
for k, v in MideaACDevice._fresh_air_fan_speeds.items():
if self._attributes[DeviceAttributes.fresh_air_fan_speed] < k:
break
else:
self._attributes[DeviceAttributes.fresh_air_mode] = v
self._attributes[DeviceAttributes.fresh_air_mode] = v
else:
self._attributes[DeviceAttributes.fresh_air_mode] = "Off"
new_status[DeviceAttributes.fresh_air_mode.value] = self._attributes[
Expand Down

0 comments on commit e2189a9

Please sign in to comment.