From 5d14afad92b6448647ed999b8bb10e4db1413174 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Sat, 14 Sep 2024 23:47:27 +0200 Subject: [PATCH] Use debug/warning instead of info log level in components [f] (#125971) --- homeassistant/components/fints/sensor.py | 4 ++-- homeassistant/components/flic/binary_sensor.py | 6 +++--- homeassistant/components/flux_led/__init__.py | 2 +- homeassistant/components/foscam/__init__.py | 2 +- homeassistant/components/foscam/camera.py | 6 +++--- homeassistant/components/freebox/router.py | 2 +- homeassistant/components/fritz/coordinator.py | 4 ++-- homeassistant/components/fritzbox/__init__.py | 4 ++-- homeassistant/components/fritzbox_callmonitor/base.py | 2 +- homeassistant/components/frontier_silicon/media_player.py | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/homeassistant/components/fints/sensor.py b/homeassistant/components/fints/sensor.py index 8a92850ad47..e22b7072786 100644 --- a/homeassistant/components/fints/sensor.py +++ b/homeassistant/components/fints/sensor.py @@ -89,7 +89,7 @@ def setup_platform( for account in balance_accounts: if config[CONF_ACCOUNTS] and account.iban not in account_config: - _LOGGER.info("Skipping account %s for bank %s", account.iban, fints_name) + _LOGGER.debug("Skipping account %s for bank %s", account.iban, fints_name) continue if not (account_name := account_config.get(account.iban)): @@ -99,7 +99,7 @@ def setup_platform( for account in holdings_accounts: if config[CONF_HOLDINGS] and account.accountnumber not in holdings_config: - _LOGGER.info( + _LOGGER.debug( "Skipping holdings %s for bank %s", account.accountnumber, fints_name ) continue diff --git a/homeassistant/components/flic/binary_sensor.py b/homeassistant/components/flic/binary_sensor.py index fcfe4b6604f..cd160480674 100644 --- a/homeassistant/components/flic/binary_sensor.py +++ b/homeassistant/components/flic/binary_sensor.py @@ -108,7 +108,7 @@ def start_scanning(config, add_entities, client): def scan_completed_callback(scan_wizard, result, address, name): """Restart scan wizard to constantly check for new buttons.""" if result == pyflic.ScanWizardResult.WizardSuccess: - _LOGGER.info("Found new button %s", address) + _LOGGER.debug("Found new button %s", address) elif result != pyflic.ScanWizardResult.WizardFailedTimeout: _LOGGER.warning( "Failed to connect to button %s. Reason: %s", address, result @@ -132,7 +132,7 @@ def setup_button( timeout: int = config[CONF_TIMEOUT] ignored_click_types: list[str] | None = config.get(CONF_IGNORED_CLICK_TYPES) button = FlicButton(hass, client, address, timeout, ignored_click_types) - _LOGGER.info("Connected to button %s", address) + _LOGGER.debug("Connected to button %s", address) add_entities([button]) @@ -203,7 +203,7 @@ class FlicButton(BinarySensorEntity): time_string, ) return True - _LOGGER.info( + _LOGGER.debug( "Queued %s allowed for %s. Time in queue was %s", click_type, self._address, diff --git a/homeassistant/components/flux_led/__init__.py b/homeassistant/components/flux_led/__init__.py index b3e17a65a5c..1472dfa4bf1 100644 --- a/homeassistant/components/flux_led/__init__.py +++ b/homeassistant/components/flux_led/__init__.py @@ -136,7 +136,7 @@ async def _async_migrate_unique_ids(hass: HomeAssistant, entry: ConfigEntry) -> new_unique_id = f"{unique_id}{entity_unique_id[len(unique_id):]}" else: return None - _LOGGER.info( + _LOGGER.debug( "Migrating unique_id from [%s] to [%s]", entity_unique_id, new_unique_id, diff --git a/homeassistant/components/foscam/__init__.py b/homeassistant/components/foscam/__init__.py index f8708a589ce..b4d64464972 100644 --- a/homeassistant/components/foscam/__init__.py +++ b/homeassistant/components/foscam/__init__.py @@ -89,6 +89,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: unique_id=None, ) - LOGGER.info("Migration to version %s successful", entry.version) + LOGGER.debug("Migration to version %s successful", entry.version) return True diff --git a/homeassistant/components/foscam/camera.py b/homeassistant/components/foscam/camera.py index 45704515422..075848f6ffb 100644 --- a/homeassistant/components/foscam/camera.py +++ b/homeassistant/components/foscam/camera.py @@ -129,7 +129,7 @@ class HassFoscamCamera(FoscamEntity, Camera): ) if ret == -3: - LOGGER.info( + LOGGER.warning( ( "Can't get motion detection status, camera %s configured with" " non-admin user" @@ -171,7 +171,7 @@ class HassFoscamCamera(FoscamEntity, Camera): if ret != 0: if ret == -3: - LOGGER.info( + LOGGER.warning( ( "Can't set motion detection status, camera %s configured" " with non-admin user" @@ -197,7 +197,7 @@ class HassFoscamCamera(FoscamEntity, Camera): if ret != 0: if ret == -3: - LOGGER.info( + LOGGER.warning( ( "Can't set motion detection status, camera %s configured" " with non-admin user" diff --git a/homeassistant/components/freebox/router.py b/homeassistant/components/freebox/router.py index ed2fbcf1e83..efa96eca5a7 100644 --- a/homeassistant/components/freebox/router.py +++ b/homeassistant/components/freebox/router.py @@ -225,7 +225,7 @@ class FreeboxRouter: fbx_raids: list[dict[str, Any]] = await self._api.storage.get_raids() or [] except HttpRequestError: self.supports_raid = False - _LOGGER.info( + _LOGGER.warning( "Router %s API does not support RAID", self.name, ) diff --git a/homeassistant/components/fritz/coordinator.py b/homeassistant/components/fritz/coordinator.py index 13c442a1ace..4134f0af026 100644 --- a/homeassistant/components/fritz/coordinator.py +++ b/homeassistant/components/fritz/coordinator.py @@ -79,7 +79,7 @@ def device_filter_out_from_trackers( def _ha_is_stopping(activity: str) -> None: """Inform that HA is stopping.""" - _LOGGER.info("Cannot execute %s: HomeAssistant is shutting down", activity) + _LOGGER.warning("Cannot execute %s: HomeAssistant is shutting down", activity) class ClassSetupMissing(Exception): @@ -658,7 +658,7 @@ class FritzBoxTools(DataUpdateCoordinator[UpdateCoordinatorDataType]): entity.domain == DEVICE_TRACKER_DOMAIN or "_internet_access" in entity.unique_id ) and entry_mac not in device_hosts: - _LOGGER.info("Removing orphan entity entry %s", entity.entity_id) + _LOGGER.debug("Removing orphan entity entry %s", entity.entity_id) entity_reg.async_remove(entity.entity_id) device_reg = dr.async_get(self.hass) diff --git a/homeassistant/components/fritzbox/__init__.py b/homeassistant/components/fritzbox/__init__.py index 460e1edd851..ab6d88772d5 100644 --- a/homeassistant/components/fritzbox/__init__.py +++ b/homeassistant/components/fritzbox/__init__.py @@ -29,14 +29,14 @@ async def async_setup_entry(hass: HomeAssistant, entry: FritzboxConfigEntry) -> and "_temperature" not in entry.unique_id ): new_unique_id = f"{entry.unique_id}_temperature" - LOGGER.info( + LOGGER.debug( "Migrating unique_id [%s] to [%s]", entry.unique_id, new_unique_id ) return {"new_unique_id": new_unique_id} if entry.domain == BINARY_SENSOR_DOMAIN and "_" not in entry.unique_id: new_unique_id = f"{entry.unique_id}_alarm" - LOGGER.info( + LOGGER.debug( "Migrating unique_id [%s] to [%s]", entry.unique_id, new_unique_id ) return {"new_unique_id": new_unique_id} diff --git a/homeassistant/components/fritzbox_callmonitor/base.py b/homeassistant/components/fritzbox_callmonitor/base.py index 72d17b57abc..2816880a1b2 100644 --- a/homeassistant/components/fritzbox_callmonitor/base.py +++ b/homeassistant/components/fritzbox_callmonitor/base.py @@ -62,7 +62,7 @@ class FritzBoxPhonebook: for name, nrs in self.phonebook_dict.items() for nr in nrs } - _LOGGER.info("Fritz!Box phone book successfully updated") + _LOGGER.debug("Fritz!Box phone book successfully updated") def get_phonebook_ids(self) -> list[int]: """Return list of phonebook ids.""" diff --git a/homeassistant/components/frontier_silicon/media_player.py b/homeassistant/components/frontier_silicon/media_player.py index cb02d430230..8407e0a869d 100644 --- a/homeassistant/components/frontier_silicon/media_player.py +++ b/homeassistant/components/frontier_silicon/media_player.py @@ -118,7 +118,7 @@ class AFSAPIDevice(MediaPlayerEntity): return if not self._attr_available: - _LOGGER.info( + _LOGGER.warning( "Reconnected to %s", self.name or afsapi.webfsapi_endpoint, )