Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(device)!: socket exception and process rebuild #296

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions midealocal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
get_midea_cloud,
get_preset_account_cloud,
)
from midealocal.device import AuthException, MideaDevice, ProtocolVersion, RefreshFailed
from midealocal.device import (
AuthException,
MideaDevice,
NoSupportedProtocol,
ProtocolVersion,
)
from midealocal.devices import device_selector
from midealocal.discover import discover
from midealocal.exceptions import SocketException
Expand Down Expand Up @@ -121,7 +126,7 @@ async def discover(self) -> list[MideaDevice]:
_LOGGER.debug("Unable to connect with key: %s", key)
except SocketException:
_LOGGER.exception("Device socket closed.")
except RefreshFailed:
except NoSupportedProtocol:
_LOGGER.exception("Unable to retrieve device attributes.")
else:
_LOGGER.info("Found device:\n%s", dev.attributes)
Expand Down
Loading