From 53c23dfb6fb81f13a200069e91589afac7e77ca4 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Mon, 16 Sep 2024 11:41:26 +0200 Subject: [PATCH] Use debug/warning instead of info log level in components [g] (#126032) --- .../components/generic_hygrostat/humidifier.py | 6 +++--- homeassistant/components/generic_thermostat/climate.py | 10 +++++----- homeassistant/components/geniushub/__init__.py | 2 +- homeassistant/components/gree/coordinator.py | 2 +- .../components/growatt_server/sensor/__init__.py | 2 +- homeassistant/components/guardian/util.py | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/generic_hygrostat/humidifier.py b/homeassistant/components/generic_hygrostat/humidifier.py index 0aa4ba2e515..69c4fb3cdf4 100644 --- a/homeassistant/components/generic_hygrostat/humidifier.py +++ b/homeassistant/components/generic_hygrostat/humidifier.py @@ -480,7 +480,7 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity): ): self._active = True force = True - _LOGGER.info( + _LOGGER.debug( ( "Obtained current and target humidity. " "Generic hygrostat active. %s, %s" @@ -530,7 +530,7 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity): ) or ( self._device_class == HumidifierDeviceClass.DEHUMIDIFIER and too_dry ): - _LOGGER.info("Turning off humidifier %s", self._switch_entity_id) + _LOGGER.debug("Turning off humidifier %s", self._switch_entity_id) await self._async_device_turn_off() elif time is not None: # The time argument is passed only in keep-alive case @@ -538,7 +538,7 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity): elif ( self._device_class == HumidifierDeviceClass.HUMIDIFIER and too_dry ) or (self._device_class == HumidifierDeviceClass.DEHUMIDIFIER and too_wet): - _LOGGER.info("Turning on humidifier %s", self._switch_entity_id) + _LOGGER.debug("Turning on humidifier %s", self._switch_entity_id) await self._async_device_turn_on() elif time is not None: # The time argument is passed only in keep-alive case diff --git a/homeassistant/components/generic_thermostat/climate.py b/homeassistant/components/generic_thermostat/climate.py index 2a118b70879..d68eaccbb0c 100644 --- a/homeassistant/components/generic_thermostat/climate.py +++ b/homeassistant/components/generic_thermostat/climate.py @@ -500,7 +500,7 @@ class GenericThermostat(ClimateEntity, RestoreEntity): self._target_temp, ): self._active = True - _LOGGER.info( + _LOGGER.debug( ( "Obtained current and target temperature. " "Generic thermostat active. %s, %s" @@ -539,21 +539,21 @@ class GenericThermostat(ClimateEntity, RestoreEntity): too_hot = self._cur_temp >= self._target_temp + self._hot_tolerance if self._is_device_active: if (self.ac_mode and too_cold) or (not self.ac_mode and too_hot): - _LOGGER.info("Turning off heater %s", self.heater_entity_id) + _LOGGER.debug("Turning off heater %s", self.heater_entity_id) await self._async_heater_turn_off() elif time is not None: # The time argument is passed only in keep-alive case - _LOGGER.info( + _LOGGER.debug( "Keep-alive - Turning on heater heater %s", self.heater_entity_id, ) await self._async_heater_turn_on() elif (self.ac_mode and too_hot) or (not self.ac_mode and too_cold): - _LOGGER.info("Turning on heater %s", self.heater_entity_id) + _LOGGER.debug("Turning on heater %s", self.heater_entity_id) await self._async_heater_turn_on() elif time is not None: # The time argument is passed only in keep-alive case - _LOGGER.info( + _LOGGER.debug( "Keep-alive - Turning off heater %s", self.heater_entity_id ) await self._async_heater_turn_off() diff --git a/homeassistant/components/geniushub/__init__.py b/homeassistant/components/geniushub/__init__.py index 836add310b6..0609b675504 100644 --- a/homeassistant/components/geniushub/__init__.py +++ b/homeassistant/components/geniushub/__init__.py @@ -239,7 +239,7 @@ class GeniusBroker: await self.client.update() if self._connect_error: self._connect_error = False - _LOGGER.info("Connection to geniushub re-established") + _LOGGER.warning("Connection to geniushub re-established") except ( aiohttp.ClientResponseError, aiohttp.client_exceptions.ClientConnectorError, diff --git a/homeassistant/components/gree/coordinator.py b/homeassistant/components/gree/coordinator.py index ae8b22706ef..42d6734a6b2 100644 --- a/homeassistant/components/gree/coordinator.py +++ b/homeassistant/components/gree/coordinator.py @@ -138,7 +138,7 @@ class DiscoveryService(Listener): except DeviceTimeoutError: _LOGGER.error("Timeout trying to bind to gree device: %s", device_info) - _LOGGER.info( + _LOGGER.debug( "Adding Gree device %s at %s:%i", device.device_info.name, device.device_info.ip, diff --git a/homeassistant/components/growatt_server/sensor/__init__.py b/homeassistant/components/growatt_server/sensor/__init__.py index b0a93879bb3..e77660e6a3a 100644 --- a/homeassistant/components/growatt_server/sensor/__init__.py +++ b/homeassistant/components/growatt_server/sensor/__init__.py @@ -72,7 +72,7 @@ async def async_setup_entry( # If the URL has been deprecated then change to the default instead if url in DEPRECATED_URLS: - _LOGGER.info( + _LOGGER.warning( "URL: %s has been deprecated, migrating to the latest default: %s", url, DEFAULT_URL, diff --git a/homeassistant/components/guardian/util.py b/homeassistant/components/guardian/util.py index 4b9a2835474..48e0a51c70a 100644 --- a/homeassistant/components/guardian/util.py +++ b/homeassistant/components/guardian/util.py @@ -55,7 +55,7 @@ def async_finish_entity_domain_replacements( continue old_entity_id = registry_entry.entity_id - LOGGER.info('Removing old entity: "%s"', old_entity_id) + LOGGER.debug('Removing old entity: "%s"', old_entity_id) ent_reg.async_remove(old_entity_id)