diff --git a/custom_components/localtuya/common.py b/custom_components/localtuya/common.py index d2f52d3..9bdfa03 100644 --- a/custom_components/localtuya/common.py +++ b/custom_components/localtuya/common.py @@ -150,12 +150,12 @@ class TuyaDevice(pytuya.TuyaListener): _LOGGER.debug("Retrieving initial state") status = await self._interface.status() if status is None: - raise Exception("failed to retrieve status") + raise Exception("Failed to retrieve status") self.status_updated(status) self._connection_attempts = 0 except Exception: - _LOGGER.exception("connect failed") + _LOGGER.exception(f"Connect to {self._config_entry[CONF_HOST]} failed") self._connection_attempts += 1 if self._interface is not None: self._interface.close() diff --git a/custom_components/localtuya/pytuya/__init__.py b/custom_components/localtuya/pytuya/__init__.py index 0abc507..58b608f 100644 --- a/custom_components/localtuya/pytuya/__init__.py +++ b/custom_components/localtuya/pytuya/__init__.py @@ -7,7 +7,7 @@ Mostly derived from Shenzhen Xenon ESP8266MOD WiFi smart devices E.g. https://wikidevi.com/wiki/Xenon_SM-PW701U Author: clach04 -Maintained by: rospogrigio +Maintained by: postlund For more information see https://github.com/clach04/python-tuya @@ -24,7 +24,6 @@ Functions add_dps_to_request(dps_index) # adds dps_index to the list of dps used by the # device (to be queried in the payload) set_dps(on, dps_index) # Set value of any dps index. - set_timer(num_secs): Credits @@ -51,9 +50,9 @@ from abc import ABC, abstractmethod from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes -version_tuple = (8, 1, 0) +version_tuple = (9, 0, 0) version = version_string = __version__ = "%d.%d.%d" % version_tuple -__author__ = "rospogrigio" +__author__ = "postlund" _LOGGER = logging.getLogger(__name__) @@ -351,7 +350,7 @@ class TuyaProtocol(asyncio.Protocol): def connection_lost(self, exc): """Disconnected from device.""" - self.log.debug("connection_lost: %s", exc) + self.log.debug("Connection lost: %s", exc) try: self.close() except Exception: