Skip to content

Commit

Permalink
馃敡 bump python-miio to v0.5.5.2 (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Apr 8, 2021
1 parent cb86416 commit 3fd2c3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/xiaomi_miot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,10 @@ def __init__(self, miot_service=None, device=None, **kwargs):
try:
device = MiotDevice(ip=host, token=token)
device.mapping = self._miot_mapping
except TypeError as exc:
if f'{exc}'.find('mapping') >= 0:
# for python-miio <= v0.5.4
device = MiotDevice(self._miot_mapping, host, token)
except ValueError as exc:
_LOGGER.warning('Initializing with host %s (%s) failed: %s', host, name, exc)

Expand Down

0 comments on commit 3fd2c3a

Please sign in to comment.