From 622e9aa3dc94b11c7c0f72bcd10fd26bf0aaa0cd Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Tue, 17 Sep 2024 18:39:11 +0200 Subject: [PATCH] Use debug/warning/error instead of info log level in components [n] (#126137) --- homeassistant/components/nanoleaf/config_flow.py | 2 +- homeassistant/components/neato/vacuum.py | 4 +++- homeassistant/components/netatmo/__init__.py | 4 ++-- homeassistant/components/netatmo/data_handler.py | 4 ++-- homeassistant/components/netgear/__init__.py | 2 +- homeassistant/components/nmap_tracker/__init__.py | 2 +- homeassistant/components/numato/__init__.py | 4 ++-- homeassistant/components/numato/binary_sensor.py | 2 +- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/nanoleaf/config_flow.py b/homeassistant/components/nanoleaf/config_flow.py index 080b8131b1d..cc34e30eb59 100644 --- a/homeassistant/components/nanoleaf/config_flow.py +++ b/homeassistant/components/nanoleaf/config_flow.py @@ -215,7 +215,7 @@ class NanoleafConfigFlow(ConfigFlow, domain=DOMAIN): self.discovery_conf.pop(self.nanoleaf.host) if self.device_id in self.discovery_conf: self.discovery_conf.pop(self.device_id) - _LOGGER.info( + _LOGGER.debug( "Successfully imported Nanoleaf %s from the discovery integration", name, ) diff --git a/homeassistant/components/neato/vacuum.py b/homeassistant/components/neato/vacuum.py index b750b121f58..77ca5346b10 100644 --- a/homeassistant/components/neato/vacuum.py +++ b/homeassistant/components/neato/vacuum.py @@ -376,7 +376,9 @@ class NeatoConnectedVacuum(NeatoEntity, StateVacuumEntity): "Zone '%s' was not found for the robot '%s'", zone, self.entity_id ) return - _LOGGER.info("Start cleaning zone '%s' with robot %s", zone, self.entity_id) + _LOGGER.debug( + "Start cleaning zone '%s' with robot %s", zone, self.entity_id + ) self._attr_state = STATE_CLEANING try: diff --git a/homeassistant/components/netatmo/__init__.py b/homeassistant/components/netatmo/__init__.py index f402009e13b..6f14c9c76bb 100644 --- a/homeassistant/components/netatmo/__init__.py +++ b/homeassistant/components/netatmo/__init__.py @@ -164,7 +164,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: try: await hass.data[DOMAIN][entry.entry_id][AUTH].async_addwebhook(webhook_url) - _LOGGER.info("Register Netatmo webhook: %s", webhook_url) + _LOGGER.debug("Register Netatmo webhook: %s", webhook_url) except pyatmo.ApiError as err: _LOGGER.error("Error during webhook registration - %s", err) else: @@ -224,7 +224,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: await data[entry.entry_id][AUTH].async_dropwebhook() except pyatmo.ApiError: _LOGGER.debug("No webhook to be dropped") - _LOGGER.info("Unregister Netatmo webhook") + _LOGGER.debug("Unregister Netatmo webhook") unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS) diff --git a/homeassistant/components/netatmo/data_handler.py b/homeassistant/components/netatmo/data_handler.py index a4c4dbfa21d..3a28c3b8336 100644 --- a/homeassistant/components/netatmo/data_handler.py +++ b/homeassistant/components/netatmo/data_handler.py @@ -215,11 +215,11 @@ class NetatmoDataHandler: async def handle_event(self, event: dict) -> None: """Handle webhook events.""" if event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_ACTIVATION: - _LOGGER.info("%s webhook successfully registered", MANUFACTURER) + _LOGGER.debug("%s webhook successfully registered", MANUFACTURER) self._webhook = True elif event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_DEACTIVATION: - _LOGGER.info("%s webhook unregistered", MANUFACTURER) + _LOGGER.debug("%s webhook unregistered", MANUFACTURER) self._webhook = False elif event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_NACAMERA_CONNECTION: diff --git a/homeassistant/components/netgear/__init__.py b/homeassistant/components/netgear/__init__.py index 445453ad2aa..58f63e5212a 100644 --- a/homeassistant/components/netgear/__init__.py +++ b/homeassistant/components/netgear/__init__.py @@ -48,7 +48,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: if port != router.port or ssl != router.ssl: data = {**entry.data, CONF_PORT: router.port, CONF_SSL: router.ssl} hass.config_entries.async_update_entry(entry, data=data) - _LOGGER.info( + _LOGGER.warning( ( "Netgear port-SSL combination updated from (%i, %r) to (%i, %r), " "this should only occur after a firmware update" diff --git a/homeassistant/components/nmap_tracker/__init__.py b/homeassistant/components/nmap_tracker/__init__.py index ffc4b975308..dcb4e1361fd 100644 --- a/homeassistant/components/nmap_tracker/__init__.py +++ b/homeassistant/components/nmap_tracker/__init__.py @@ -380,7 +380,7 @@ class NmapDeviceScanner: ) if mac is None: self._async_device_offline(ipv4, "No MAC address found", now) - _LOGGER.info("No MAC address found for %s", ipv4) + _LOGGER.warning("No MAC address found for %s", ipv4) continue formatted_mac = format_mac(mac) diff --git a/homeassistant/components/numato/__init__.py b/homeassistant/components/numato/__init__.py index 3b99079f949..28aa8623a7e 100644 --- a/homeassistant/components/numato/__init__.py +++ b/homeassistant/components/numato/__init__.py @@ -139,11 +139,11 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool: try: gpio.discover(config[DOMAIN][CONF_DISCOVER]) except gpio.NumatoGpioError as err: - _LOGGER.info("Error discovering Numato devices: %s", err) + _LOGGER.error("Error discovering Numato devices: %s", err) gpio.cleanup() return False - _LOGGER.info( + _LOGGER.debug( "Initializing Numato 32 port USB GPIO expanders with IDs: %s", ", ".join(str(d) for d in gpio.devices), ) diff --git a/homeassistant/components/numato/binary_sensor.py b/homeassistant/components/numato/binary_sensor.py index a369be43b43..0f4ea23e722 100644 --- a/homeassistant/components/numato/binary_sensor.py +++ b/homeassistant/components/numato/binary_sensor.py @@ -71,7 +71,7 @@ def setup_platform( api.edge_detect(device_id, port, partial(read_gpio, device_id)) except NumatoGpioError as err: - _LOGGER.info( + _LOGGER.error( "Notification setup failed on device %s, " "updates on binary sensor %s only in polling mode: %s", device_id,