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
This commit is contained in:
Jan-Philipp Benecke 2024-09-18 21:33:52 +02:00 committed by GitHub
parent d90caf3e86
commit 1d425f3913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 49 additions and 51 deletions

View file

@ -208,7 +208,7 @@ async def _async_create_bridge_with_updated_data(
"Failed to determine connection method, make sure the device is on." "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_PORT] = port
updated_data[CONF_METHOD] = method updated_data[CONF_METHOD] = method
@ -235,21 +235,21 @@ async def _async_create_bridge_with_updated_data(
if mac and mac != "none": if mac and mac != "none":
# Samsung sometimes returns a value of "none" for the mac address # Samsung sometimes returns a value of "none" for the mac address
# this should be ignored # 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) updated_data[CONF_MAC] = dr.format_mac(mac)
else: else:
LOGGER.info("Failed to get mac for %s", host) LOGGER.warning("Failed to get mac for %s", host)
if not model: if not model:
LOGGER.debug("Attempting to get model for %s", host) LOGGER.debug("Attempting to get model for %s", host)
if info: if info:
model = info.get("device", {}).get("modelName") model = info.get("device", {}).get("modelName")
if model: 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 updated_data[CONF_MODEL] = model
if model_requires_encryption(model) and method != METHOD_ENCRYPTED_WEBSOCKET: 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 " "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" "an encrypted protocol but you are using %s which may not be supported"

View file

@ -536,7 +536,7 @@ class SamsungTVWSBridge(
LOGGER.debug("Working config: %s", config) LOGGER.debug("Working config: %s", config)
return RESULT_SUCCESS return RESULT_SUCCESS
except ConnectionClosedError as err: except ConnectionClosedError as err:
LOGGER.info( LOGGER.warning(
( (
"Working but unsupported config: %s, error: '%s'; this may be" "Working but unsupported config: %s, error: '%s'; this may be"
" an indication that access to the TV has been denied. Please" " an indication that access to the TV has been denied. Please"
@ -609,7 +609,7 @@ class SamsungTVWSBridge(
try: try:
await self._remote.start_listening(self._remote_event) await self._remote.start_listening(self._remote_event)
except UnauthorizedError as err: except UnauthorizedError as err:
LOGGER.info( LOGGER.warning(
"Failed to get remote for %s, re-authentication required: %s", "Failed to get remote for %s, re-authentication required: %s",
self.host, self.host,
repr(err), repr(err),
@ -618,7 +618,7 @@ class SamsungTVWSBridge(
self._notify_reauth_callback() self._notify_reauth_callback()
self._remote = None self._remote = None
except ConnectionClosedError as err: except ConnectionClosedError as err:
LOGGER.info( LOGGER.warning(
"Failed to get remote for %s: %s", "Failed to get remote for %s: %s",
self.host, self.host,
repr(err), repr(err),
@ -643,7 +643,7 @@ class SamsungTVWSBridge(
# Initialise device info on first connect # Initialise device info on first connect
await self.async_device_info() await self.async_device_info()
if self.token != self._remote.token: if self.token != self._remote.token:
LOGGER.info( LOGGER.warning(
"SamsungTVWSBridge has provided a new token %s", "SamsungTVWSBridge has provided a new token %s",
self._remote.token, self._remote.token,
) )

View file

@ -93,7 +93,7 @@ class SamsungTVEntity(CoordinatorEntity[SamsungTVDataUpdateCoordinator], Entity)
LOGGER.debug("Attempting to turn on %s via automation", self.entity_id) LOGGER.debug("Attempting to turn on %s via automation", self.entity_id)
await self._turn_on_action.async_run(self.hass, self._context) await self._turn_on_action.async_run(self.hass, self._context)
elif self._mac: elif self._mac:
LOGGER.info( LOGGER.warning(
"Attempting to turn on %s via Wake-On-Lan; if this does not work, " "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 " "please ensure that Wake-On-Lan is available for your device or use "
"a turn_on automation", "a turn_on automation",

View file

@ -284,7 +284,7 @@ class SamsungTVDevice(SamsungTVEntity, MediaPlayerEntity):
async def _async_launch_app(self, app_id: str) -> None: async def _async_launch_app(self, app_id: str) -> None:
"""Send launch_app to the tv.""" """Send launch_app to the tv."""
if self._bridge.power_off_in_progress: 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 return
assert isinstance(self._bridge, SamsungTVWSBridge) assert isinstance(self._bridge, SamsungTVWSBridge)
await self._bridge.async_launch_app(app_id) 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.""" """Send a key to the tv and handles exceptions."""
assert keys assert keys
if self._bridge.power_off_in_progress and keys[0] != "KEY_POWEROFF": 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 return
await self._bridge.async_send_keys(keys) 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: async def async_set_volume_level(self, volume: float) -> None:
"""Set volume level on the media player.""" """Set volume level on the media player."""
if (dmr_device := self._dmr_device) is None: 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 return
try: try:
await dmr_device.async_set_volume_level(volume) await dmr_device.async_set_volume_level(volume)

View file

@ -46,7 +46,7 @@ class SamsungTVRemote(SamsungTVEntity, RemoteEntity):
See https://github.com/jaruba/ha-samsungtv-tizen/blob/master/Key_codes.md See https://github.com/jaruba/ha-samsungtv-tizen/blob/master/Key_codes.md
""" """
if self._bridge.power_off_in_progress: 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 return
num_repeats = kwargs[ATTR_NUM_REPEATS] num_repeats = kwargs[ATTR_NUM_REPEATS]

View file

@ -43,7 +43,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
def stop_monitor(event): def stop_monitor(event):
"""Stop the SCSGate.""" """Stop the SCSGate."""
_LOGGER.info("Stopping SCSGate monitor thread") _LOGGER.debug("Stopping SCSGate monitor thread")
scsgate.stop() scsgate.stop()
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_monitor) hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_monitor)

View file

@ -196,7 +196,7 @@ class SerialSensor(SensorEntity):
logged_error = True logged_error = True
await self._handle_error() await self._handle_error()
else: else:
_LOGGER.info("Serial device %s connected", device) _LOGGER.debug("Serial device %s connected", device)
while True: while True:
try: try:
line = await reader.readline() line = await reader.readline()

View file

@ -157,7 +157,7 @@ class SighthoundEntity(ImageProcessingEntity):
if self._save_timestamped_file: if self._save_timestamped_file:
timestamp_save_path = directory / f"{self._name}_{self._last_detection}.jpg" timestamp_save_path = directory / f"{self._name}_{self._last_detection}.jpg"
img.save(timestamp_save_path) img.save(timestamp_save_path)
_LOGGER.info("Sighthound saved file %s", timestamp_save_path) _LOGGER.debug("Sighthound saved file %s", timestamp_save_path)
@property @property
def camera_entity(self): def camera_entity(self):

View file

@ -504,7 +504,7 @@ class SimpliSafe:
except Exception as err: # noqa: BLE001 except Exception as err: # noqa: BLE001
LOGGER.error("Unknown exception while connecting to websocket: %s", err) 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() await self._async_cancel_websocket_loop()
self._websocket_reconnect_task = self._hass.async_create_task( self._websocket_reconnect_task = self._hass.async_create_task(
self._async_start_websocket_loop() self._async_start_websocket_loop()
@ -604,7 +604,7 @@ class SimpliSafe:
@callback @callback
def async_save_refresh_token(token: str) -> None: def async_save_refresh_token(token: str) -> None:
"""Save a refresh token to the config entry.""" """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._hass.config_entries.async_update_entry(
self.entry, self.entry,
data={**self.entry.data, CONF_TOKEN: token}, 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, # 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, # we merely log that message at INFO level (so the user is aware,
# but not spammed with ERROR messages that they cannot change): # but not spammed with ERROR messages that they cannot change):
LOGGER.info(result) LOGGER.debug(result)
if isinstance(result, SimplipyError): if isinstance(result, SimplipyError):
raise UpdateFailed(f"SimpliSafe error while updating: {result}") raise UpdateFailed(f"SimpliSafe error while updating: {result}")

View file

@ -63,7 +63,7 @@ async def async_setup_entry(
for system in simplisafe.systems.values(): for system in simplisafe.systems.values():
if system.version == 2: 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 continue
for sensor in system.sensors.values(): for sensor in system.sensors.values():

View file

@ -38,7 +38,7 @@ async def async_setup_entry(
for system in simplisafe.systems.values(): for system in simplisafe.systems.values():
if system.version == 2: 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 continue
locks.extend( locks.extend(

View file

@ -29,7 +29,7 @@ async def async_setup_entry(
for system in simplisafe.systems.values(): for system in simplisafe.systems.values():
if system.version == 2: 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 continue
sensors.extend( sensors.extend(

View file

@ -69,7 +69,7 @@ def setup_platform(
def monitor_stop(_service_or_event): def monitor_stop(_service_or_event):
"""Stop the monitor thread.""" """Stop the monitor thread."""
_LOGGER.info("Stopping monitor for %s", name) _LOGGER.debug("Stopping monitor for %s", name)
mon.terminate() mon.terminate()
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, monitor_stop) hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, monitor_stop)
@ -163,7 +163,7 @@ class Monitor(threading.Thread, SensorEntity):
# Magic: writing this makes device happy # Magic: writing this makes device happy
device.char_write_handle(0x1B, bytearray([255]), False) device.char_write_handle(0x1B, bytearray([255]), False)
device.subscribe(BLE_TEMP_UUID, self._update) 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: while self.keep_going:
# protect against stale connections, just read temperature # protect against stale connections, just read temperature
device.char_read(BLE_TEMP_UUID, timeout=CONNECT_TIMEOUT) device.char_read(BLE_TEMP_UUID, timeout=CONNECT_TIMEOUT)

View file

@ -128,7 +128,7 @@ class Gateway:
except gammu.ERR_EMPTY: except gammu.ERR_EMPTY:
# error is raised if memory is empty (this induces wrong reported # error is raised if memory is empty (this induces wrong reported
# memory status) # memory status)
_LOGGER.info("Failed to read messages!") _LOGGER.warning("Failed to read messages!")
# Link all SMS when there are concatenated messages # Link all SMS when there are concatenated messages
return gammu.LinkSMS(entries) return gammu.LinkSMS(entries)

View file

@ -115,7 +115,7 @@ class HomeAssistantSnapcast:
client.set_availability(True) client.set_availability(True)
for group in self.groups: for group in self.groups:
group.set_availability(True) group.set_availability(True)
_LOGGER.info("Server connected: %s", self.hpid) _LOGGER.debug("Server connected: %s", self.hpid)
self.on_update() self.on_update()
def on_disconnect(self, ex: Exception | None) -> None: def on_disconnect(self, ex: Exception | None) -> None:

View file

@ -93,7 +93,7 @@ class SolarEdgeOverviewDataService(SolarEdgeDataService):
for index, key in enumerate(energy_keys, start=1): for index, key in enumerate(energy_keys, start=1):
# All coming values in list should be larger than the current value. # 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:]): 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 "Ignoring invalid energy value %s for %s", self.data[key], key
) )
self.data.pop(key) self.data.pop(key)

View file

@ -50,7 +50,7 @@ class SomaFlowHandler(ConfigFlow, domain=DOMAIN):
return self.async_abort(reason="connection_error") return self.async_abort(reason="connection_error")
try: try:
result = await self.hass.async_add_executor_job(api.list_devices) 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": if result["result"] == "success":
return self.async_create_entry( return self.async_create_entry(
title="Soma Connect", title="Soma Connect",

View file

@ -52,7 +52,7 @@ async def async_setup_entry(
cover_list.append(SomfyShade(somfy_mylink, **cover_config)) cover_list.append(SomfyShade(somfy_mylink, **cover_config))
_LOGGER.info( _LOGGER.debug(
"Adding Somfy Cover: %s with targetID %s", "Adding Somfy Cover: %s with targetID %s",
cover_config["name"], cover_config["name"],
cover_config["target_id"], cover_config["target_id"],

View file

@ -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) 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 return True

View file

@ -167,7 +167,7 @@ class SongpalEntity(MediaPlayerEntity):
async def async_activate_websocket(self): async def async_activate_websocket(self):
"""Activate websocket for listening if wanted.""" """Activate websocket for listening if wanted."""
_LOGGER.info("Activating websocket connection") _LOGGER.debug("Activating websocket connection")
async def _volume_changed(volume: VolumeChange): async def _volume_changed(volume: VolumeChange):
_LOGGER.debug("Volume changed: %s", volume) _LOGGER.debug("Volume changed: %s", volume)

View file

@ -413,7 +413,7 @@ class SonosDiscoveryManager:
continue continue
if self.hosts_in_error.pop(ip_addr, None): 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 # 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. # configured. The metadata is already in Soco for these.
if new_hosts := { if new_hosts := {

View file

@ -289,7 +289,7 @@ class SoundTouchMediaPlayer(MediaPlayerEntity):
if not slaves: if not slaves:
_LOGGER.warning("Unable to create zone without slaves") _LOGGER.warning("Unable to create zone without slaves")
else: 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]) self._device.create_zone([slave.device for slave in slaves])
def remove_zone_slave(self, slaves): def remove_zone_slave(self, slaves):
@ -305,7 +305,7 @@ class SoundTouchMediaPlayer(MediaPlayerEntity):
if not slaves: if not slaves:
_LOGGER.warning("Unable to find slaves to remove") _LOGGER.warning("Unable to find slaves to remove")
else: else:
_LOGGER.info( _LOGGER.debug(
"Removing slaves from zone with master %s", self._device.config.name "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 # 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: if not slaves:
_LOGGER.warning("Unable to find slaves to add") _LOGGER.warning("Unable to find slaves to add")
else: else:
_LOGGER.info( _LOGGER.debug(
"Adding slaves to zone with master %s", self._device.config.name "Adding slaves to zone with master %s", self._device.config.name
) )
self._device.add_zone_slave([slave.device for slave in slaves]) self._device.add_zone_slave([slave.device for slave in slaves])

View file

@ -70,7 +70,7 @@ class SwisscomDeviceScanner(DeviceScanner):
if not self.success_init: if not self.success_init:
return False 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()): if not (data := self.get_swisscom_data()):
return False return False
@ -95,11 +95,11 @@ class SwisscomDeviceScanner(DeviceScanner):
requests.exceptions.Timeout, requests.exceptions.Timeout,
requests.exceptions.ConnectTimeout, requests.exceptions.ConnectTimeout,
): ):
_LOGGER.info("No response from Swisscom Internet Box") _LOGGER.debug("No response from Swisscom Internet Box")
return devices return devices
if "status" not in request.json(): 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 return devices
for device in request.json()["status"]: for device in request.json()["status"]:

View file

@ -115,7 +115,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
rf"(?:{old_unique_id})-(?P<id>\d+)", entity_entry.unique_id rf"(?:{old_unique_id})-(?P<id>\d+)", entity_entry.unique_id
): ):
entity_new_unique_id = f'{new_unique_id}-{match.group("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", "Migrating entity %s from %s to new id %s",
entity_entry.entity_id, entity_entry.entity_id,
entity_entry.unique_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}", f"{match.group('id')}-{new_unique_id}",
) )
} }
_LOGGER.info( _LOGGER.debug(
"Migrating device %s identifiers from %s to %s", "Migrating device %s identifiers from %s to %s",
device_entry.name, device_entry.name,
device_entry.identifiers, 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) 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 return True

View file

@ -88,7 +88,7 @@ class SwitchBeeDeviceEntity[_DeviceTypeT: SwitchBeeBaseDevice](
def _check_if_became_online(self) -> None: def _check_if_became_online(self) -> None:
"""Check if the device was offline (now online) and bring it back.""" """Check if the device was offline (now online) and bring it back."""
if not self._is_online: if not self._is_online:
_LOGGER.info( _LOGGER.warning(
"%s device is now responding", "%s device is now responding",
self.name, self.name,
) )

View file

@ -124,7 +124,7 @@ class SyncthingClient:
while True: while True:
if await self._server_available(): if await self._server_available():
if server_was_unavailable: if server_was_unavailable:
_LOGGER.info( _LOGGER.warning(
"The syncthing server '%s' is back online", self._client.url "The syncthing server '%s' is back online", self._client.url
) )
async_dispatcher_send( async_dispatcher_send(
@ -153,7 +153,7 @@ class SyncthingClient:
event, event,
) )
except aiosyncthing.exceptions.SyncthingError: except aiosyncthing.exceptions.SyncthingError:
_LOGGER.info( _LOGGER.warning(
( (
"The syncthing server '%s' is not available. Sleeping %i" "The syncthing server '%s' is not available. Sleeping %i"
" seconds and retrying" " seconds and retrying"

View file

@ -37,7 +37,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await printer.update() await printer.update()
except SyncThruAPINotSupported as api_error: except SyncThruAPINotSupported as api_error:
# if an exception is thrown, printer does not support syncthru # if an exception is thrown, printer does not support syncthru
_LOGGER.info( _LOGGER.debug(
"Configured printer at %s does not provide SyncThru JSON API", "Configured printer at %s does not provide SyncThru JSON API",
printer.url, printer.url,
exc_info=api_error, exc_info=api_error,

View file

@ -138,7 +138,7 @@ class SynoApi:
except SYNOLOGY_CONNECTION_EXCEPTIONS: except SYNOLOGY_CONNECTION_EXCEPTIONS:
self._with_surveillance_station = False self._with_surveillance_station = False
self.dsm.reset(SynoSurveillanceStation.API_KEY) self.dsm.reset(SynoSurveillanceStation.API_KEY)
LOGGER.info( LOGGER.warning(
"Surveillance Station found, but disabled due to missing user" "Surveillance Station found, but disabled due to missing user"
" permissions" " permissions"
) )

View file

@ -289,7 +289,7 @@ class SynologyDSMFlowHandler(ConfigFlow, domain=DOMAIN):
and existing_entry.data[CONF_HOST] != host and existing_entry.data[CONF_HOST] != host
and ip(existing_entry.data[CONF_HOST]).version == ip(host).version 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", "Update host from '%s' to '%s' for NAS '%s' via discovery",
existing_entry.data[CONF_HOST], existing_entry.data[CONF_HOST],
host, host,

View file

@ -100,8 +100,6 @@ class SynologySrmDeviceScanner(DeviceScanner):
self.devices = [] self.devices = []
self.success_init = self._update_info() self.success_init = self._update_info()
_LOGGER.info("Synology SRM scanner initialized")
def scan_devices(self): def scan_devices(self):
"""Scan for new devices and return a list with found device IDs.""" """Scan for new devices and return a list with found device IDs."""
self._update_info() self._update_info()

View file

@ -138,7 +138,7 @@ async def test_async_poll_manual_hosts_warnings(
await manager.async_poll_manual_hosts() await manager.async_poll_manual_hosts()
assert len(caplog.messages) == 1 assert len(caplog.messages) == 1
record = caplog.records[0] record = caplog.records[0]
assert record.levelname == "INFO" assert record.levelname == "WARNING"
assert "Connection reestablished to Sonos device" in record.message assert "Connection reestablished to Sonos device" in record.message
assert mock_async_call_later.call_count == 3 assert mock_async_call_later.call_count == 3