diff --git a/homeassistant/components/x10/light.py b/homeassistant/components/x10/light.py index 29c15f66993..23343cb0f8d 100644 --- a/homeassistant/components/x10/light.py +++ b/homeassistant/components/x10/light.py @@ -54,7 +54,7 @@ def setup_platform( try: x10_command("info") except CalledProcessError as err: - _LOGGER.info("Assuming that the device is CM17A: %s", err.output) + _LOGGER.warning("Assuming that the device is CM17A: %s", err.output) is_cm11a = False add_entities(X10Light(light, is_cm11a) for light in config[CONF_DEVICES]) diff --git a/homeassistant/components/xiaomi/camera.py b/homeassistant/components/xiaomi/camera.py index 8ab15f85147..cb8d5f39dec 100644 --- a/homeassistant/components/xiaomi/camera.py +++ b/homeassistant/components/xiaomi/camera.py @@ -140,7 +140,7 @@ class XiaomiCamera(Camera): videos = [v for v in ftp.nlst() if ".tmp" not in v] if not videos: - _LOGGER.info('Video folder "%s" is empty; delaying', latest_dir) + _LOGGER.debug('Video folder "%s" is empty; delaying', latest_dir) return False if self._model == MODEL_XIAOFANG: diff --git a/homeassistant/components/xiaomi/device_tracker.py b/homeassistant/components/xiaomi/device_tracker.py index 04f3ea6667a..9d4a29d2c78 100644 --- a/homeassistant/components/xiaomi/device_tracker.py +++ b/homeassistant/components/xiaomi/device_tracker.py @@ -139,7 +139,7 @@ def _retrieve_list(host, token, **kwargs): _LOGGER.exception("No list in response from mi router. %s", result) return None else: - _LOGGER.info( + _LOGGER.warning( "Receive wrong Xiaomi code %s, expected 0 in response %s", xiaomi_code, result, diff --git a/homeassistant/components/xiaomi_miio/__init__.py b/homeassistant/components/xiaomi_miio/__init__.py index bea8d9b402f..9e14a3c58ba 100644 --- a/homeassistant/components/xiaomi_miio/__init__.py +++ b/homeassistant/components/xiaomi_miio/__init__.py @@ -186,7 +186,9 @@ def _async_update_data_default(hass, device): except DeviceException as ex: if getattr(ex, "code", None) != -9999: raise UpdateFailed(ex) from ex - _LOGGER.info("Got exception while fetching the state, trying again: %s", ex) + _LOGGER.error( + "Got exception while fetching the state, trying again: %s", ex + ) # Try to fetch the data a second time after error code -9999 try: return await _async_fetch_data() @@ -273,7 +275,9 @@ def _async_update_data_vacuum( except DeviceException as ex: if getattr(ex, "code", None) != -9999: raise UpdateFailed(ex) from ex - _LOGGER.info("Got exception while fetching the state, trying again: %s", ex) + _LOGGER.error( + "Got exception while fetching the state, trying again: %s", ex + ) # Try to fetch the data a second time after error code -9999 try: diff --git a/homeassistant/components/xiaomi_miio/device_tracker.py b/homeassistant/components/xiaomi_miio/device_tracker.py index 30cbf699646..1dfc5e53410 100644 --- a/homeassistant/components/xiaomi_miio/device_tracker.py +++ b/homeassistant/components/xiaomi_miio/device_tracker.py @@ -37,12 +37,12 @@ def get_scanner( host = config[CONF_HOST] token = config[CONF_TOKEN] - _LOGGER.info("Initializing with host %s (token %s...)", host, token[:5]) + _LOGGER.debug("Initializing with host %s (token %s...)", host, token[:5]) try: device = WifiRepeater(host, token) device_info = device.info() - _LOGGER.info( + _LOGGER.debug( "%s %s %s detected", device_info.model, device_info.firmware_version, diff --git a/homeassistant/components/xiaomi_miio/gateway.py b/homeassistant/components/xiaomi_miio/gateway.py index ffd6279f639..dd5deec2296 100644 --- a/homeassistant/components/xiaomi_miio/gateway.py +++ b/homeassistant/components/xiaomi_miio/gateway.py @@ -87,7 +87,7 @@ class ConnectXiaomiGateway: try: self._gateway_device.discover_devices() except DeviceException as error: - _LOGGER.info( + _LOGGER.error( ( "DeviceException during getting subdevices of xiaomi gateway" " with host %s, trying cloud to obtain subdevices: %s" diff --git a/homeassistant/components/xiaomi_miio/remote.py b/homeassistant/components/xiaomi_miio/remote.py index 72707109ad6..9c83f3f4674 100644 --- a/homeassistant/components/xiaomi_miio/remote.py +++ b/homeassistant/components/xiaomi_miio/remote.py @@ -77,7 +77,7 @@ async def async_setup_platform( token = config[CONF_TOKEN] # Create handler - _LOGGER.info("Initializing with host %s (token %s...)", host, token[:5]) + _LOGGER.debug("Initializing with host %s (token %s...)", host, token[:5]) # The Chuang Mi IR Remote Controller wants to be re-discovered every # 5 minutes. As long as polling is disabled the device should be @@ -89,7 +89,7 @@ async def async_setup_platform( device_info = await hass.async_add_executor_job(device.info) model = device_info.model unique_id = f"{model}-{device_info.mac_address}" - _LOGGER.info( + _LOGGER.debug( "%s %s %s detected", model, device_info.firmware_version, diff --git a/homeassistant/components/xmpp/notify.py b/homeassistant/components/xmpp/notify.py index c73248f2524..3fb5dd166a1 100644 --- a/homeassistant/components/xmpp/notify.py +++ b/homeassistant/components/xmpp/notify.py @@ -190,13 +190,13 @@ async def async_send_message( # noqa: C901 _LOGGER.debug("Timeout set to %ss", timeout) url = await self.upload_file(timeout=timeout) - _LOGGER.info("Upload success") + _LOGGER.debug("Upload success") for recipient in recipients: if room: - _LOGGER.info("Sending file to %s", room) + _LOGGER.debug("Sending file to %s", room) message = self.Message(sto=room, stype="groupchat") else: - _LOGGER.info("Sending file to %s", recipient) + _LOGGER.debug("Sending file to %s", recipient) message = self.Message(sto=recipient, stype="chat") message["body"] = url message["oob"]["url"] = url @@ -264,7 +264,7 @@ async def async_send_message( # noqa: C901 uploaded via XEP_0363 and HTTP and returns the resulting URL """ - _LOGGER.info("Getting file from %s", url) + _LOGGER.debug("Getting file from %s", url) def get_url(url): """Return result for GET request to url.""" @@ -295,7 +295,7 @@ async def async_send_message( # noqa: C901 _LOGGER.debug("Got %s extension", extension) filename = self.get_random_filename(None, extension=extension) - _LOGGER.info("Uploading file from URL, %s", filename) + _LOGGER.debug("Uploading file from URL, %s", filename) return await self["xep_0363"].upload_file( filename, @@ -313,7 +313,7 @@ async def async_send_message( # noqa: C901 async def upload_file_from_path(self, path: str, timeout=None): """Upload a file from a local file path via XEP_0363.""" - _LOGGER.info("Uploading file from path, %s", path) + _LOGGER.debug("Uploading file from path, %s", path) if not hass.config.is_allowed_path(path): raise PermissionError("Could not access file. Path not allowed") @@ -374,6 +374,6 @@ async def async_send_message( # noqa: C901 @staticmethod def discard_ssl_invalid_cert(event): """Do nothing if ssl certificate is invalid.""" - _LOGGER.info("Ignoring invalid SSL certificate as requested") + _LOGGER.debug("Ignoring invalid SSL certificate as requested") SendNotificationBot()