Use debug instead of info log level in components [a] (#125944)
* Use debug instead of info log level in components [a] * Process code review comments
This commit is contained in:
parent
e92d9317aa
commit
2fa6370dc0
12 changed files with 16 additions and 17 deletions
|
@ -51,7 +51,6 @@ class ActiontecDeviceScanner(DeviceScanner):
|
||||||
self.last_results: list[Device] = []
|
self.last_results: list[Device] = []
|
||||||
data = self.get_actiontec_data()
|
data = self.get_actiontec_data()
|
||||||
self.success_init = data is not None
|
self.success_init = data is not None
|
||||||
_LOGGER.info("Scanner initialized")
|
|
||||||
|
|
||||||
def scan_devices(self) -> list[str]:
|
def scan_devices(self) -> list[str]:
|
||||||
"""Scan for new devices and return a list with found device IDs."""
|
"""Scan for new devices and return a list with found device IDs."""
|
||||||
|
@ -70,7 +69,7 @@ class ActiontecDeviceScanner(DeviceScanner):
|
||||||
|
|
||||||
Return boolean if scanning successful.
|
Return boolean if scanning successful.
|
||||||
"""
|
"""
|
||||||
_LOGGER.info("Scanning")
|
_LOGGER.debug("Scanning")
|
||||||
if not self.success_init:
|
if not self.success_init:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -79,7 +78,7 @@ class ActiontecDeviceScanner(DeviceScanner):
|
||||||
self.last_results = [
|
self.last_results = [
|
||||||
device for device in actiontec_data if device.timevalid > -60
|
device for device in actiontec_data if device.timevalid > -60
|
||||||
]
|
]
|
||||||
_LOGGER.info("Scan successful")
|
_LOGGER.debug("Scan successful")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def get_actiontec_data(self) -> list[Device] | None:
|
def get_actiontec_data(self) -> list[Device] | None:
|
||||||
|
|
|
@ -130,7 +130,7 @@ class AdaxConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
async_get_clientsession(self.hass), account_id, password
|
async_get_clientsession(self.hass), account_id, password
|
||||||
)
|
)
|
||||||
if token is None:
|
if token is None:
|
||||||
_LOGGER.info("Adax: Failed to login to retrieve token")
|
_LOGGER.debug("Adax: Failed to login to retrieve token")
|
||||||
errors["base"] = "cannot_connect"
|
errors["base"] = "cannot_connect"
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="cloud",
|
step_id="cloud",
|
||||||
|
|
|
@ -131,7 +131,7 @@ class AndroidTVFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||||
return RESULT_CONN_ERROR, None
|
return RESULT_CONN_ERROR, None
|
||||||
|
|
||||||
dev_prop = aftv.device_properties
|
dev_prop = aftv.device_properties
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
"Android device at %s: %s = %r, %s = %r",
|
"Android device at %s: %s = %r, %s = %r",
|
||||||
user_input[CONF_HOST],
|
user_input[CONF_HOST],
|
||||||
PROP_ETHMAC,
|
PROP_ETHMAC,
|
||||||
|
|
|
@ -67,7 +67,7 @@ def adb_decorator[_ADBDeviceT: AndroidTVEntity, **_P, _R](
|
||||||
return await func(self, *args, **kwargs)
|
return await func(self, *args, **kwargs)
|
||||||
except LockNotAcquiredException:
|
except LockNotAcquiredException:
|
||||||
# If the ADB lock could not be acquired, skip this command
|
# If the ADB lock could not be acquired, skip this command
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
(
|
(
|
||||||
"ADB command %s not executed because the connection is"
|
"ADB command %s not executed because the connection is"
|
||||||
" currently in use"
|
" currently in use"
|
||||||
|
|
|
@ -306,7 +306,7 @@ class ADBDevice(AndroidTVEntity, MediaPlayerEntity):
|
||||||
msg,
|
msg,
|
||||||
title="Android Debug Bridge",
|
title="Android Debug Bridge",
|
||||||
)
|
)
|
||||||
_LOGGER.info("%s", msg)
|
_LOGGER.debug("%s", msg)
|
||||||
|
|
||||||
@adb_decorator()
|
@adb_decorator()
|
||||||
async def service_download(self, device_path: str, local_path: str) -> None:
|
async def service_download(self, device_path: str, local_path: str) -> None:
|
||||||
|
|
|
@ -375,7 +375,7 @@ class AppleTVManager(DeviceListener):
|
||||||
f"Protocol(s) {missing_protocols_str} not yet found for {name},"
|
f"Protocol(s) {missing_protocols_str} not yet found for {name},"
|
||||||
" waiting for discovery."
|
" waiting for discovery."
|
||||||
)
|
)
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
"Protocol(s) %s not yet found for %s, trying later",
|
"Protocol(s) %s not yet found for %s, trying later",
|
||||||
missing_protocols_str,
|
missing_protocols_str,
|
||||||
name,
|
name,
|
||||||
|
@ -394,7 +394,7 @@ class AppleTVManager(DeviceListener):
|
||||||
|
|
||||||
self._connection_attempts = 0
|
self._connection_attempts = 0
|
||||||
if self._connection_was_lost:
|
if self._connection_was_lost:
|
||||||
_LOGGER.info(
|
_LOGGER.warning(
|
||||||
'Connection was re-established to device "%s"',
|
'Connection was re-established to device "%s"',
|
||||||
self.config_entry.data[CONF_NAME],
|
self.config_entry.data[CONF_NAME],
|
||||||
)
|
)
|
||||||
|
|
|
@ -85,7 +85,7 @@ class AppleTVRemote(AppleTVEntity, RemoteEntity):
|
||||||
if not attr_value:
|
if not attr_value:
|
||||||
raise ValueError("Command not found. Exiting sequence")
|
raise ValueError("Command not found. Exiting sequence")
|
||||||
|
|
||||||
_LOGGER.info("Sending command %s", single_command)
|
_LOGGER.debug("Sending command %s", single_command)
|
||||||
|
|
||||||
if hold_secs >= 1:
|
if hold_secs >= 1:
|
||||||
await attr_value(action=InputAction.Hold)
|
await attr_value(action=InputAction.Hold)
|
||||||
|
|
|
@ -159,7 +159,7 @@ class AprsListenerThread(threading.Thread):
|
||||||
self.ais.set_filter(self.server_filter)
|
self.ais.set_filter(self.server_filter)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
"Opening connection to %s with callsign %s", self.host, self.callsign
|
"Opening connection to %s with callsign %s", self.host, self.callsign
|
||||||
)
|
)
|
||||||
self.ais.connect()
|
self.ais.connect()
|
||||||
|
@ -170,7 +170,7 @@ class AprsListenerThread(threading.Thread):
|
||||||
except (AprsConnectionError, LoginError) as err:
|
except (AprsConnectionError, LoginError) as err:
|
||||||
self.start_complete(False, str(err))
|
self.start_complete(False, str(err))
|
||||||
except OSError:
|
except OSError:
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
"Closing connection to %s with callsign %s", self.host, self.callsign
|
"Closing connection to %s with callsign %s", self.host, self.callsign
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ class AsusWrtRouter:
|
||||||
|
|
||||||
if self._connect_error:
|
if self._connect_error:
|
||||||
self._connect_error = False
|
self._connect_error = False
|
||||||
_LOGGER.info("Reconnected to ASUS router %s", self.host)
|
_LOGGER.warning("Reconnected to ASUS router %s", self.host)
|
||||||
|
|
||||||
self._connected_devices = len(wrt_devices)
|
self._connected_devices = len(wrt_devices)
|
||||||
consider_home: int = self._options.get(
|
consider_home: int = self._options.get(
|
||||||
|
|
|
@ -45,7 +45,7 @@ def validate_and_connect(
|
||||||
ret[ATTR_SERIAL_NUMBER] = client.serial_number()
|
ret[ATTR_SERIAL_NUMBER] = client.serial_number()
|
||||||
ret[ATTR_MODEL] = f"{client.version()} ({client.pn()})"
|
ret[ATTR_MODEL] = f"{client.version()} ({client.pn()})"
|
||||||
ret[ATTR_FIRMWARE] = client.firmware(1)
|
ret[ATTR_FIRMWARE] = client.firmware(1)
|
||||||
_LOGGER.info("Returning device info=%s", ret)
|
_LOGGER.debug("Returning device info=%s", ret)
|
||||||
except AuroraError:
|
except AuroraError:
|
||||||
_LOGGER.warning("Could not connect to device=%s", comport)
|
_LOGGER.warning("Could not connect to device=%s", comport)
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -78,9 +78,9 @@ class AuroraAbbDataUpdateCoordinator(DataUpdateCoordinator[dict[str, float]]):
|
||||||
finally:
|
finally:
|
||||||
if self.available != self.available_prev:
|
if self.available != self.available_prev:
|
||||||
if self.available:
|
if self.available:
|
||||||
_LOGGER.info("Communication with %s back online", self.name)
|
_LOGGER.warning("Communication with %s back online", self.name)
|
||||||
else:
|
else:
|
||||||
_LOGGER.info(
|
_LOGGER.warning(
|
||||||
"Communication with %s lost",
|
"Communication with %s lost",
|
||||||
self.name,
|
self.name,
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,6 +52,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
||||||
# Home Assistant 2023.2
|
# Home Assistant 2023.2
|
||||||
hass.config_entries.async_update_entry(config_entry, version=3)
|
hass.config_entries.async_update_entry(config_entry, version=3)
|
||||||
|
|
||||||
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
_LOGGER.debug("Migration to version %s successful", config_entry.version)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Reference in a new issue