From d28c32624cd59fc09d769db3f7f9359267e2b96e Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Sat, 14 Sep 2024 15:52:23 +0200 Subject: [PATCH] Use debug/warning instead of info log level in components [b] (#125954) --- homeassistant/components/bbox/device_tracker.py | 5 ++--- homeassistant/components/blackbird/media_player.py | 2 +- .../components/bluetooth_le_tracker/device_tracker.py | 2 +- homeassistant/components/broadlink/remote.py | 2 +- homeassistant/components/bt_home_hub_5/device_tracker.py | 3 +-- homeassistant/components/bt_smarthub/device_tracker.py | 4 ++-- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/bbox/device_tracker.py b/homeassistant/components/bbox/device_tracker.py index 20ee0fa2820..12174d395f7 100644 --- a/homeassistant/components/bbox/device_tracker.py +++ b/homeassistant/components/bbox/device_tracker.py @@ -54,7 +54,6 @@ class BboxDeviceScanner(DeviceScanner): self.last_results: list[Device] = [] self.success_init = self._update_info() - _LOGGER.info("Scanner initialized") def scan_devices(self): """Scan for new devices and return a list with found device IDs.""" @@ -78,7 +77,7 @@ class BboxDeviceScanner(DeviceScanner): Returns boolean if scanning successful. """ - _LOGGER.info("Scanning") + _LOGGER.debug("Scanning") box = pybbox.Bbox(ip=self.host) result = box.get_all_connected_devices() @@ -96,5 +95,5 @@ class BboxDeviceScanner(DeviceScanner): self.last_results = last_results - _LOGGER.info("Scan successful") + _LOGGER.debug("Scan successful") return True diff --git a/homeassistant/components/blackbird/media_player.py b/homeassistant/components/blackbird/media_player.py index 46cabaf4099..37672e98e0b 100644 --- a/homeassistant/components/blackbird/media_player.py +++ b/homeassistant/components/blackbird/media_player.py @@ -103,7 +103,7 @@ def setup_platform( devices = [] for zone_id, extra in config[CONF_ZONES].items(): - _LOGGER.info("Adding zone %d - %s", zone_id, extra[CONF_NAME]) + _LOGGER.debug("Adding zone %d - %s", zone_id, extra[CONF_NAME]) unique_id = f"{connection}-{zone_id}" device = BlackbirdZone(blackbird, sources, zone_id, extra[CONF_NAME]) hass.data[DATA_BLACKBIRD][unique_id] = device diff --git a/homeassistant/components/bluetooth_le_tracker/device_tracker.py b/homeassistant/components/bluetooth_le_tracker/device_tracker.py index 24b03b2f566..25e620ff15d 100644 --- a/homeassistant/components/bluetooth_le_tracker/device_tracker.py +++ b/homeassistant/components/bluetooth_le_tracker/device_tracker.py @@ -194,7 +194,7 @@ async def async_setup_scanner( # noqa: C901 if track_new: if mac not in devs_to_track and mac not in devs_no_track: - _LOGGER.info("Discovered Bluetooth LE device %s", mac) + _LOGGER.debug("Discovered Bluetooth LE device %s", mac) hass.async_create_task( async_see_device(mac, service_info.name, new_device=True) ) diff --git a/homeassistant/components/broadlink/remote.py b/homeassistant/components/broadlink/remote.py index 710b4a34a11..18a3a82017c 100644 --- a/homeassistant/components/broadlink/remote.py +++ b/homeassistant/components/broadlink/remote.py @@ -377,7 +377,7 @@ class BroadlinkRemote(BroadlinkEntity, RemoteEntity, RestoreEntity): device.api.check_frequency ) if is_found: - _LOGGER.info("Radiofrequency detected: %s MHz", frequency) + _LOGGER.debug("Radiofrequency detected: %s MHz", frequency) break else: await device.async_request(device.api.cancel_sweep_frequency) diff --git a/homeassistant/components/bt_home_hub_5/device_tracker.py b/homeassistant/components/bt_home_hub_5/device_tracker.py index 10c1b32c310..cbd06381578 100644 --- a/homeassistant/components/bt_home_hub_5/device_tracker.py +++ b/homeassistant/components/bt_home_hub_5/device_tracker.py @@ -41,7 +41,6 @@ class BTHomeHub5DeviceScanner(DeviceScanner): def __init__(self, config): """Initialise the scanner.""" - _LOGGER.info("Initialising BT Home Hub 5") self.host = config[CONF_HOST] self.last_results = {} @@ -69,7 +68,7 @@ class BTHomeHub5DeviceScanner(DeviceScanner): def update_info(self): """Ensure the information from the BT Home Hub 5 is up to date.""" - _LOGGER.info("Scanning") + _LOGGER.debug("Scanning") data = bthomehub5_devicelist.get_devicelist(self.host) diff --git a/homeassistant/components/bt_smarthub/device_tracker.py b/homeassistant/components/bt_smarthub/device_tracker.py index 3e2565e0904..29f60bd317f 100644 --- a/homeassistant/components/bt_smarthub/device_tracker.py +++ b/homeassistant/components/bt_smarthub/device_tracker.py @@ -67,7 +67,7 @@ class BTSmartHubScanner(DeviceScanner): if self.get_bt_smarthub_data(): self.success_init = True else: - _LOGGER.info("Failed to connect to %s", self.smarthub.router_ip) + _LOGGER.warning("Failed to connect to %s", self.smarthub.router_ip) def scan_devices(self): """Scan for new devices and return a list with found device IDs.""" @@ -88,7 +88,7 @@ class BTSmartHubScanner(DeviceScanner): if not self.success_init: return - _LOGGER.info("Scanning") + _LOGGER.debug("Scanning") if not (data := self.get_bt_smarthub_data()): _LOGGER.warning("Error scanning devices") return