From 1d425f3913d220b475c3111d3b9e1a55acfa7377 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Wed, 18 Sep 2024 21:33:52 +0200 Subject: [PATCH] Use debug/warning instead of info log level in components [s] (#126141) * Use debug/warning instead of info log level in components [s] * Fix merge error --- homeassistant/components/samsungtv/__init__.py | 10 +++++----- homeassistant/components/samsungtv/bridge.py | 8 ++++---- homeassistant/components/samsungtv/entity.py | 2 +- homeassistant/components/samsungtv/media_player.py | 6 +++--- homeassistant/components/samsungtv/remote.py | 2 +- homeassistant/components/scsgate/__init__.py | 2 +- homeassistant/components/serial/sensor.py | 2 +- .../components/sighthound/image_processing.py | 2 +- homeassistant/components/simplisafe/__init__.py | 6 +++--- homeassistant/components/simplisafe/binary_sensor.py | 2 +- homeassistant/components/simplisafe/lock.py | 2 +- homeassistant/components/simplisafe/sensor.py | 2 +- homeassistant/components/skybeacon/sensor.py | 4 ++-- homeassistant/components/sms/gateway.py | 2 +- homeassistant/components/snapcast/server.py | 2 +- homeassistant/components/solaredge/coordinator.py | 2 +- homeassistant/components/soma/config_flow.py | 2 +- homeassistant/components/somfy_mylink/cover.py | 2 +- homeassistant/components/sonarr/__init__.py | 2 +- homeassistant/components/songpal/media_player.py | 2 +- homeassistant/components/sonos/__init__.py | 2 +- homeassistant/components/soundtouch/media_player.py | 6 +++--- homeassistant/components/swisscom/device_tracker.py | 6 +++--- homeassistant/components/switchbee/__init__.py | 6 +++--- homeassistant/components/switchbee/entity.py | 2 +- homeassistant/components/syncthing/__init__.py | 4 ++-- homeassistant/components/syncthru/__init__.py | 2 +- homeassistant/components/synology_dsm/common.py | 2 +- homeassistant/components/synology_dsm/config_flow.py | 2 +- .../components/synology_srm/device_tracker.py | 2 -- tests/components/sonos/test_init.py | 2 +- 31 files changed, 49 insertions(+), 51 deletions(-) diff --git a/homeassistant/components/samsungtv/__init__.py b/homeassistant/components/samsungtv/__init__.py index f3b967a485e..1dfd3f00b93 100644 --- a/homeassistant/components/samsungtv/__init__.py +++ b/homeassistant/components/samsungtv/__init__.py @@ -208,7 +208,7 @@ async def _async_create_bridge_with_updated_data( "Failed to determine connection method, make sure the device is on." ) - LOGGER.info("Updated port to %s and method to %s for %s", port, method, host) + LOGGER.debug("Updated port to %s and method to %s for %s", port, method, host) updated_data[CONF_PORT] = port updated_data[CONF_METHOD] = method @@ -235,21 +235,21 @@ async def _async_create_bridge_with_updated_data( if mac and mac != "none": # Samsung sometimes returns a value of "none" for the mac address # this should be ignored - LOGGER.info("Updated mac to %s for %s", mac, host) + LOGGER.debug("Updated mac to %s for %s", mac, host) updated_data[CONF_MAC] = dr.format_mac(mac) else: - LOGGER.info("Failed to get mac for %s", host) + LOGGER.warning("Failed to get mac for %s", host) if not model: LOGGER.debug("Attempting to get model for %s", host) if info: model = info.get("device", {}).get("modelName") if model: - LOGGER.info("Updated model to %s for %s", model, host) + LOGGER.debug("Updated model to %s for %s", model, host) updated_data[CONF_MODEL] = model if model_requires_encryption(model) and method != METHOD_ENCRYPTED_WEBSOCKET: - LOGGER.info( + LOGGER.warning( ( "Detected model %s for %s. Some televisions from H and J series use " "an encrypted protocol but you are using %s which may not be supported" diff --git a/homeassistant/components/samsungtv/bridge.py b/homeassistant/components/samsungtv/bridge.py index f9f5b0d6e73..b4d060372e6 100644 --- a/homeassistant/components/samsungtv/bridge.py +++ b/homeassistant/components/samsungtv/bridge.py @@ -536,7 +536,7 @@ class SamsungTVWSBridge( LOGGER.debug("Working config: %s", config) return RESULT_SUCCESS except ConnectionClosedError as err: - LOGGER.info( + LOGGER.warning( ( "Working but unsupported config: %s, error: '%s'; this may be" " an indication that access to the TV has been denied. Please" @@ -609,7 +609,7 @@ class SamsungTVWSBridge( try: await self._remote.start_listening(self._remote_event) except UnauthorizedError as err: - LOGGER.info( + LOGGER.warning( "Failed to get remote for %s, re-authentication required: %s", self.host, repr(err), @@ -618,7 +618,7 @@ class SamsungTVWSBridge( self._notify_reauth_callback() self._remote = None except ConnectionClosedError as err: - LOGGER.info( + LOGGER.warning( "Failed to get remote for %s: %s", self.host, repr(err), @@ -643,7 +643,7 @@ class SamsungTVWSBridge( # Initialise device info on first connect await self.async_device_info() if self.token != self._remote.token: - LOGGER.info( + LOGGER.warning( "SamsungTVWSBridge has provided a new token %s", self._remote.token, ) diff --git a/homeassistant/components/samsungtv/entity.py b/homeassistant/components/samsungtv/entity.py index 1af7495d78e..61aa8abce53 100644 --- a/homeassistant/components/samsungtv/entity.py +++ b/homeassistant/components/samsungtv/entity.py @@ -93,7 +93,7 @@ class SamsungTVEntity(CoordinatorEntity[SamsungTVDataUpdateCoordinator], Entity) LOGGER.debug("Attempting to turn on %s via automation", self.entity_id) await self._turn_on_action.async_run(self.hass, self._context) elif self._mac: - LOGGER.info( + LOGGER.warning( "Attempting to turn on %s via Wake-On-Lan; if this does not work, " "please ensure that Wake-On-Lan is available for your device or use " "a turn_on automation", diff --git a/homeassistant/components/samsungtv/media_player.py b/homeassistant/components/samsungtv/media_player.py index 960b69f71e3..7180e8a0c1a 100644 --- a/homeassistant/components/samsungtv/media_player.py +++ b/homeassistant/components/samsungtv/media_player.py @@ -284,7 +284,7 @@ class SamsungTVDevice(SamsungTVEntity, MediaPlayerEntity): async def _async_launch_app(self, app_id: str) -> None: """Send launch_app to the tv.""" if self._bridge.power_off_in_progress: - LOGGER.info("TV is powering off, not sending launch_app command") + LOGGER.debug("TV is powering off, not sending launch_app command") return assert isinstance(self._bridge, SamsungTVWSBridge) await self._bridge.async_launch_app(app_id) @@ -293,7 +293,7 @@ class SamsungTVDevice(SamsungTVEntity, MediaPlayerEntity): """Send a key to the tv and handles exceptions.""" assert keys if self._bridge.power_off_in_progress and keys[0] != "KEY_POWEROFF": - LOGGER.info("TV is powering off, not sending keys: %s", keys) + LOGGER.debug("TV is powering off, not sending keys: %s", keys) return await self._bridge.async_send_keys(keys) @@ -304,7 +304,7 @@ class SamsungTVDevice(SamsungTVEntity, MediaPlayerEntity): async def async_set_volume_level(self, volume: float) -> None: """Set volume level on the media player.""" if (dmr_device := self._dmr_device) is None: - LOGGER.info("Upnp services are not available on %s", self._host) + LOGGER.warning("Upnp services are not available on %s", self._host) return try: await dmr_device.async_set_volume_level(volume) diff --git a/homeassistant/components/samsungtv/remote.py b/homeassistant/components/samsungtv/remote.py index afbac341226..401a5d383f0 100644 --- a/homeassistant/components/samsungtv/remote.py +++ b/homeassistant/components/samsungtv/remote.py @@ -46,7 +46,7 @@ class SamsungTVRemote(SamsungTVEntity, RemoteEntity): See https://github.com/jaruba/ha-samsungtv-tizen/blob/master/Key_codes.md """ if self._bridge.power_off_in_progress: - LOGGER.info("TV is powering off, not sending keys: %s", command) + LOGGER.debug("TV is powering off, not sending keys: %s", command) return num_repeats = kwargs[ATTR_NUM_REPEATS] diff --git a/homeassistant/components/scsgate/__init__.py b/homeassistant/components/scsgate/__init__.py index db96ccb688a..9aabb315942 100644 --- a/homeassistant/components/scsgate/__init__.py +++ b/homeassistant/components/scsgate/__init__.py @@ -43,7 +43,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool: def stop_monitor(event): """Stop the SCSGate.""" - _LOGGER.info("Stopping SCSGate monitor thread") + _LOGGER.debug("Stopping SCSGate monitor thread") scsgate.stop() hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_monitor) diff --git a/homeassistant/components/serial/sensor.py b/homeassistant/components/serial/sensor.py index e7c39d97f6a..a09401473b2 100644 --- a/homeassistant/components/serial/sensor.py +++ b/homeassistant/components/serial/sensor.py @@ -196,7 +196,7 @@ class SerialSensor(SensorEntity): logged_error = True await self._handle_error() else: - _LOGGER.info("Serial device %s connected", device) + _LOGGER.debug("Serial device %s connected", device) while True: try: line = await reader.readline() diff --git a/homeassistant/components/sighthound/image_processing.py b/homeassistant/components/sighthound/image_processing.py index 706a8dd037a..acc8309af26 100644 --- a/homeassistant/components/sighthound/image_processing.py +++ b/homeassistant/components/sighthound/image_processing.py @@ -157,7 +157,7 @@ class SighthoundEntity(ImageProcessingEntity): if self._save_timestamped_file: timestamp_save_path = directory / f"{self._name}_{self._last_detection}.jpg" img.save(timestamp_save_path) - _LOGGER.info("Sighthound saved file %s", timestamp_save_path) + _LOGGER.debug("Sighthound saved file %s", timestamp_save_path) @property def camera_entity(self): diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index b23358c985f..58a3af83b5e 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -504,7 +504,7 @@ class SimpliSafe: except Exception as err: # noqa: BLE001 LOGGER.error("Unknown exception while connecting to websocket: %s", err) - LOGGER.info("Reconnecting to websocket") + LOGGER.warning("Reconnecting to websocket") await self._async_cancel_websocket_loop() self._websocket_reconnect_task = self._hass.async_create_task( self._async_start_websocket_loop() @@ -604,7 +604,7 @@ class SimpliSafe: @callback def async_save_refresh_token(token: str) -> None: """Save a refresh token to the config entry.""" - LOGGER.info("Saving new refresh token to HASS storage") + LOGGER.debug("Saving new refresh token to HASS storage") self._hass.config_entries.async_update_entry( self.entry, data={**self.entry.data, CONF_TOKEN: token}, @@ -647,7 +647,7 @@ class SimpliSafe: # In case the user attempts an action not allowed in their current plan, # we merely log that message at INFO level (so the user is aware, # but not spammed with ERROR messages that they cannot change): - LOGGER.info(result) + LOGGER.debug(result) if isinstance(result, SimplipyError): raise UpdateFailed(f"SimpliSafe error while updating: {result}") diff --git a/homeassistant/components/simplisafe/binary_sensor.py b/homeassistant/components/simplisafe/binary_sensor.py index 3f56149a9f8..a91b03b519a 100644 --- a/homeassistant/components/simplisafe/binary_sensor.py +++ b/homeassistant/components/simplisafe/binary_sensor.py @@ -63,7 +63,7 @@ async def async_setup_entry( for system in simplisafe.systems.values(): if system.version == 2: - LOGGER.info("Skipping sensor setup for V2 system: %s", system.system_id) + LOGGER.warning("Skipping sensor setup for V2 system: %s", system.system_id) continue for sensor in system.sensors.values(): diff --git a/homeassistant/components/simplisafe/lock.py b/homeassistant/components/simplisafe/lock.py index 680fc0f4c0f..a287947615b 100644 --- a/homeassistant/components/simplisafe/lock.py +++ b/homeassistant/components/simplisafe/lock.py @@ -38,7 +38,7 @@ async def async_setup_entry( for system in simplisafe.systems.values(): if system.version == 2: - LOGGER.info("Skipping lock setup for V2 system: %s", system.system_id) + LOGGER.warning("Skipping lock setup for V2 system: %s", system.system_id) continue locks.extend( diff --git a/homeassistant/components/simplisafe/sensor.py b/homeassistant/components/simplisafe/sensor.py index fbccfc4b2f9..c360ad5228c 100644 --- a/homeassistant/components/simplisafe/sensor.py +++ b/homeassistant/components/simplisafe/sensor.py @@ -29,7 +29,7 @@ async def async_setup_entry( for system in simplisafe.systems.values(): if system.version == 2: - LOGGER.info("Skipping sensor setup for V2 system: %s", system.system_id) + LOGGER.warning("Skipping sensor setup for V2 system: %s", system.system_id) continue sensors.extend( diff --git a/homeassistant/components/skybeacon/sensor.py b/homeassistant/components/skybeacon/sensor.py index a3a5eb48098..5fa62d06fc2 100644 --- a/homeassistant/components/skybeacon/sensor.py +++ b/homeassistant/components/skybeacon/sensor.py @@ -69,7 +69,7 @@ def setup_platform( def monitor_stop(_service_or_event): """Stop the monitor thread.""" - _LOGGER.info("Stopping monitor for %s", name) + _LOGGER.debug("Stopping monitor for %s", name) mon.terminate() hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, monitor_stop) @@ -163,7 +163,7 @@ class Monitor(threading.Thread, SensorEntity): # Magic: writing this makes device happy device.char_write_handle(0x1B, bytearray([255]), False) device.subscribe(BLE_TEMP_UUID, self._update) - _LOGGER.info("Subscribed to %s", self.name) + _LOGGER.debug("Subscribed to %s", self.name) while self.keep_going: # protect against stale connections, just read temperature device.char_read(BLE_TEMP_UUID, timeout=CONNECT_TIMEOUT) diff --git a/homeassistant/components/sms/gateway.py b/homeassistant/components/sms/gateway.py index 60962f198b2..a11996e3dfc 100644 --- a/homeassistant/components/sms/gateway.py +++ b/homeassistant/components/sms/gateway.py @@ -128,7 +128,7 @@ class Gateway: except gammu.ERR_EMPTY: # error is raised if memory is empty (this induces wrong reported # memory status) - _LOGGER.info("Failed to read messages!") + _LOGGER.warning("Failed to read messages!") # Link all SMS when there are concatenated messages return gammu.LinkSMS(entries) diff --git a/homeassistant/components/snapcast/server.py b/homeassistant/components/snapcast/server.py index 4714156c4c2..ab4091e30af 100644 --- a/homeassistant/components/snapcast/server.py +++ b/homeassistant/components/snapcast/server.py @@ -115,7 +115,7 @@ class HomeAssistantSnapcast: client.set_availability(True) for group in self.groups: group.set_availability(True) - _LOGGER.info("Server connected: %s", self.hpid) + _LOGGER.debug("Server connected: %s", self.hpid) self.on_update() def on_disconnect(self, ex: Exception | None) -> None: diff --git a/homeassistant/components/solaredge/coordinator.py b/homeassistant/components/solaredge/coordinator.py index 0c264c1c514..d37cf355fce 100644 --- a/homeassistant/components/solaredge/coordinator.py +++ b/homeassistant/components/solaredge/coordinator.py @@ -93,7 +93,7 @@ class SolarEdgeOverviewDataService(SolarEdgeDataService): for index, key in enumerate(energy_keys, start=1): # All coming values in list should be larger than the current value. if any(self.data[k] > self.data[key] for k in energy_keys[index:]): - LOGGER.info( + LOGGER.warning( "Ignoring invalid energy value %s for %s", self.data[key], key ) self.data.pop(key) diff --git a/homeassistant/components/soma/config_flow.py b/homeassistant/components/soma/config_flow.py index caf361d5c3c..346f499c6fa 100644 --- a/homeassistant/components/soma/config_flow.py +++ b/homeassistant/components/soma/config_flow.py @@ -50,7 +50,7 @@ class SomaFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_abort(reason="connection_error") try: result = await self.hass.async_add_executor_job(api.list_devices) - _LOGGER.info("Successfully set up Soma Connect") + _LOGGER.debug("Successfully set up Soma Connect") if result["result"] == "success": return self.async_create_entry( title="Soma Connect", diff --git a/homeassistant/components/somfy_mylink/cover.py b/homeassistant/components/somfy_mylink/cover.py index 577795d172b..791c46cd07a 100644 --- a/homeassistant/components/somfy_mylink/cover.py +++ b/homeassistant/components/somfy_mylink/cover.py @@ -52,7 +52,7 @@ async def async_setup_entry( cover_list.append(SomfyShade(somfy_mylink, **cover_config)) - _LOGGER.info( + _LOGGER.debug( "Adding Somfy Cover: %s with targetID %s", cover_config["name"], cover_config["target_id"], diff --git a/homeassistant/components/sonarr/__init__.py b/homeassistant/components/sonarr/__init__.py index 89c247ebbfb..7718ff799f5 100644 --- a/homeassistant/components/sonarr/__init__.py +++ b/homeassistant/components/sonarr/__init__.py @@ -107,7 +107,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: } hass.config_entries.async_update_entry(entry, data=data, version=2) - 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/songpal/media_player.py b/homeassistant/components/songpal/media_player.py index 9f828591a08..b4063b09691 100644 --- a/homeassistant/components/songpal/media_player.py +++ b/homeassistant/components/songpal/media_player.py @@ -167,7 +167,7 @@ class SongpalEntity(MediaPlayerEntity): async def async_activate_websocket(self): """Activate websocket for listening if wanted.""" - _LOGGER.info("Activating websocket connection") + _LOGGER.debug("Activating websocket connection") async def _volume_changed(volume: VolumeChange): _LOGGER.debug("Volume changed: %s", volume) diff --git a/homeassistant/components/sonos/__init__.py b/homeassistant/components/sonos/__init__.py index 912a8d04f4e..82e4a5ebfba 100644 --- a/homeassistant/components/sonos/__init__.py +++ b/homeassistant/components/sonos/__init__.py @@ -413,7 +413,7 @@ class SonosDiscoveryManager: continue if self.hosts_in_error.pop(ip_addr, None): - _LOGGER.info("Connection reestablished to Sonos device %s", ip_addr) + _LOGGER.warning("Connection reestablished to Sonos device %s", ip_addr) # Each speaker has the topology for other online speakers, so add them in here if they were not # configured. The metadata is already in Soco for these. if new_hosts := { diff --git a/homeassistant/components/soundtouch/media_player.py b/homeassistant/components/soundtouch/media_player.py index c09c4ed72c4..5edd42b931a 100644 --- a/homeassistant/components/soundtouch/media_player.py +++ b/homeassistant/components/soundtouch/media_player.py @@ -289,7 +289,7 @@ class SoundTouchMediaPlayer(MediaPlayerEntity): if not slaves: _LOGGER.warning("Unable to create zone without slaves") else: - _LOGGER.info("Creating zone with master %s", self._device.config.name) + _LOGGER.debug("Creating zone with master %s", self._device.config.name) self._device.create_zone([slave.device for slave in slaves]) def remove_zone_slave(self, slaves): @@ -305,7 +305,7 @@ class SoundTouchMediaPlayer(MediaPlayerEntity): if not slaves: _LOGGER.warning("Unable to find slaves to remove") else: - _LOGGER.info( + _LOGGER.debug( "Removing slaves from zone with master %s", self._device.config.name ) # SoundTouch API seems to have a bug and won't remove slaves if there are @@ -327,7 +327,7 @@ class SoundTouchMediaPlayer(MediaPlayerEntity): if not slaves: _LOGGER.warning("Unable to find slaves to add") else: - _LOGGER.info( + _LOGGER.debug( "Adding slaves to zone with master %s", self._device.config.name ) self._device.add_zone_slave([slave.device for slave in slaves]) diff --git a/homeassistant/components/swisscom/device_tracker.py b/homeassistant/components/swisscom/device_tracker.py index 94b6ddd4efd..66537a4311e 100644 --- a/homeassistant/components/swisscom/device_tracker.py +++ b/homeassistant/components/swisscom/device_tracker.py @@ -70,7 +70,7 @@ class SwisscomDeviceScanner(DeviceScanner): if not self.success_init: return False - _LOGGER.info("Loading data from Swisscom Internet Box") + _LOGGER.debug("Loading data from Swisscom Internet Box") if not (data := self.get_swisscom_data()): return False @@ -95,11 +95,11 @@ class SwisscomDeviceScanner(DeviceScanner): requests.exceptions.Timeout, requests.exceptions.ConnectTimeout, ): - _LOGGER.info("No response from Swisscom Internet Box") + _LOGGER.debug("No response from Swisscom Internet Box") return devices if "status" not in request.json(): - _LOGGER.info("No status in response from Swisscom Internet Box") + _LOGGER.debug("No status in response from Swisscom Internet Box") return devices for device in request.json()["status"]: diff --git a/homeassistant/components/switchbee/__init__.py b/homeassistant/components/switchbee/__init__.py index d5e182a31dc..758698a7d67 100644 --- a/homeassistant/components/switchbee/__init__.py +++ b/homeassistant/components/switchbee/__init__.py @@ -115,7 +115,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> rf"(?:{old_unique_id})-(?P\d+)", entity_entry.unique_id ): entity_new_unique_id = f'{new_unique_id}-{match.group("id")}' - _LOGGER.info( + _LOGGER.debug( "Migrating entity %s from %s to new id %s", entity_entry.entity_id, entity_entry.unique_id, @@ -141,7 +141,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> f"{match.group('id')}-{new_unique_id}", ) } - _LOGGER.info( + _LOGGER.debug( "Migrating device %s identifiers from %s to %s", device_entry.name, device_entry.identifiers, @@ -158,6 +158,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> hass.config_entries.async_update_entry(config_entry, version=2) - _LOGGER.info("Migration to version %s successful", config_entry.version) + _LOGGER.debug("Migration to version %s successful", config_entry.version) return True diff --git a/homeassistant/components/switchbee/entity.py b/homeassistant/components/switchbee/entity.py index 893f052c8a0..d2d58a3ace3 100644 --- a/homeassistant/components/switchbee/entity.py +++ b/homeassistant/components/switchbee/entity.py @@ -88,7 +88,7 @@ class SwitchBeeDeviceEntity[_DeviceTypeT: SwitchBeeBaseDevice]( def _check_if_became_online(self) -> None: """Check if the device was offline (now online) and bring it back.""" if not self._is_online: - _LOGGER.info( + _LOGGER.warning( "%s device is now responding", self.name, ) diff --git a/homeassistant/components/syncthing/__init__.py b/homeassistant/components/syncthing/__init__.py index 28ec14a1935..8ef63e76825 100644 --- a/homeassistant/components/syncthing/__init__.py +++ b/homeassistant/components/syncthing/__init__.py @@ -124,7 +124,7 @@ class SyncthingClient: while True: if await self._server_available(): if server_was_unavailable: - _LOGGER.info( + _LOGGER.warning( "The syncthing server '%s' is back online", self._client.url ) async_dispatcher_send( @@ -153,7 +153,7 @@ class SyncthingClient: event, ) except aiosyncthing.exceptions.SyncthingError: - _LOGGER.info( + _LOGGER.warning( ( "The syncthing server '%s' is not available. Sleeping %i" " seconds and retrying" diff --git a/homeassistant/components/syncthru/__init__.py b/homeassistant/components/syncthru/__init__.py index c6764de51a7..b3d1230fdfe 100644 --- a/homeassistant/components/syncthru/__init__.py +++ b/homeassistant/components/syncthru/__init__.py @@ -37,7 +37,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: await printer.update() except SyncThruAPINotSupported as api_error: # if an exception is thrown, printer does not support syncthru - _LOGGER.info( + _LOGGER.debug( "Configured printer at %s does not provide SyncThru JSON API", printer.url, exc_info=api_error, diff --git a/homeassistant/components/synology_dsm/common.py b/homeassistant/components/synology_dsm/common.py index e2023aa91a1..9a6284eff2b 100644 --- a/homeassistant/components/synology_dsm/common.py +++ b/homeassistant/components/synology_dsm/common.py @@ -138,7 +138,7 @@ class SynoApi: except SYNOLOGY_CONNECTION_EXCEPTIONS: self._with_surveillance_station = False self.dsm.reset(SynoSurveillanceStation.API_KEY) - LOGGER.info( + LOGGER.warning( "Surveillance Station found, but disabled due to missing user" " permissions" ) diff --git a/homeassistant/components/synology_dsm/config_flow.py b/homeassistant/components/synology_dsm/config_flow.py index d019361edad..29521ee537c 100644 --- a/homeassistant/components/synology_dsm/config_flow.py +++ b/homeassistant/components/synology_dsm/config_flow.py @@ -289,7 +289,7 @@ class SynologyDSMFlowHandler(ConfigFlow, domain=DOMAIN): and existing_entry.data[CONF_HOST] != host and ip(existing_entry.data[CONF_HOST]).version == ip(host).version ): - _LOGGER.info( + _LOGGER.debug( "Update host from '%s' to '%s' for NAS '%s' via discovery", existing_entry.data[CONF_HOST], host, diff --git a/homeassistant/components/synology_srm/device_tracker.py b/homeassistant/components/synology_srm/device_tracker.py index 962849df360..3e0e7add185 100644 --- a/homeassistant/components/synology_srm/device_tracker.py +++ b/homeassistant/components/synology_srm/device_tracker.py @@ -100,8 +100,6 @@ class SynologySrmDeviceScanner(DeviceScanner): self.devices = [] self.success_init = self._update_info() - _LOGGER.info("Synology SRM scanner initialized") - def scan_devices(self): """Scan for new devices and return a list with found device IDs.""" self._update_info() diff --git a/tests/components/sonos/test_init.py b/tests/components/sonos/test_init.py index 85ab8f4dd5a..36a6571f3b0 100644 --- a/tests/components/sonos/test_init.py +++ b/tests/components/sonos/test_init.py @@ -138,7 +138,7 @@ async def test_async_poll_manual_hosts_warnings( await manager.async_poll_manual_hosts() assert len(caplog.messages) == 1 record = caplog.records[0] - assert record.levelname == "INFO" + assert record.levelname == "WARNING" assert "Connection reestablished to Sonos device" in record.message assert mock_async_call_later.call_count == 3