Use debug/warning instead of info log level in components [t] (#126147)

This commit is contained in:
Jan-Philipp Benecke 2024-09-18 12:39:50 +02:00 committed by GitHub
parent adf25b427b
commit 39e720caed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 20 additions and 20 deletions

View file

@ -125,7 +125,7 @@ class TankUtilitySensor(SensorEntity):
requests.codes.unauthorized,
requests.codes.bad_request,
):
_LOGGER.info("Getting new token")
_LOGGER.debug("Getting new token")
self._token = auth.get_token(self._email, self._password, force=True)
data = tank_monitor.get_device_data(self._token, self.device)
else:

View file

@ -384,7 +384,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
platform = platforms[p_type]
_LOGGER.info("Setting up %s.%s", DOMAIN, p_type)
_LOGGER.debug("Setting up %s.%s", DOMAIN, p_type)
try:
receiver_service = await platform.async_setup_platform(hass, bot, p_config)
if receiver_service is False:

View file

@ -112,7 +112,7 @@ class PushBot(BaseTelegramBotEntity):
if current_status and current_status["url"] != self.webhook_url:
result = await self._try_to_set_webhook()
if result:
_LOGGER.info("Set new telegram webhook %s", self.webhook_url)
_LOGGER.debug("Set new telegram webhook %s", self.webhook_url)
else:
_LOGGER.error("Set telegram webhook failed %s", self.webhook_url)
return False

View file

@ -124,9 +124,9 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
"""Run when a Tellstick is discovered."""
await self._async_handle_discovery_without_unique_id()
_LOGGER.info("Discovered tellstick device: %s", discovery_info)
_LOGGER.debug("Discovered tellstick device: %s", discovery_info)
if supports_local_api(discovery_info[1]):
_LOGGER.info("%s support local API", discovery_info[1])
_LOGGER.debug("%s support local API", discovery_info[1])
self._hosts.append(discovery_info[0])
return await self.async_step_user()

View file

@ -67,7 +67,7 @@ class TelldusLiveLight(TelldusLiveEntity, LightEntity):
brightness = kwargs.get(ATTR_BRIGHTNESS, self._last_brightness)
if brightness == 0:
fallback_brightness = 100
_LOGGER.info(
_LOGGER.debug(
"Setting brightness to %d%%, because it was 0", fallback_brightness
)
brightness = int(fallback_brightness * 255 / 100)

View file

@ -51,7 +51,7 @@ def _discover(hass, config, component_name, found_tellcore_devices):
if not found_tellcore_devices:
return
_LOGGER.info(
_LOGGER.debug(
"Discovered %d new %s devices", len(found_tellcore_devices), component_name
)

View file

@ -330,7 +330,7 @@ class TensorFlowImageProcessor(ImageProcessingEntity):
)
for path in paths:
_LOGGER.info("Saving results image to %s", path)
_LOGGER.debug("Saving results image to %s", path)
os.makedirs(os.path.dirname(path), exist_ok=True)
img.save(path)

View file

@ -100,7 +100,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: TeslaFleetConfigEntry) -
raise ConfigEntryAuthFailed from e
except InvalidRegion:
try:
LOGGER.info("Region is invalid, trying to find the correct region")
LOGGER.warning("Region is invalid, trying to find the correct region")
await tesla.find_server()
try:
products = (await tesla.products())["response"]

View file

@ -82,7 +82,7 @@ class ThomsonDeviceScanner(DeviceScanner):
if not self.success_init:
return False
_LOGGER.info("Checking ARP")
_LOGGER.debug("Checking ARP")
if not (data := self.get_thomson_data()):
return False

View file

@ -89,7 +89,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
except InvalidAuthError as err:
raise ConfigEntryAuthFailed("Invalid credentials") from err
except SessionExpiredError:
LOGGER.info("Tile session expired; creating a new one")
LOGGER.debug("Tile session expired; creating a new one")
await client.async_init()
except TileError as err:
raise UpdateFailed(f"Error while retrieving data: {err}") from err

View file

@ -71,7 +71,7 @@ async def async_setup_scanner(
)
)
_LOGGER.info(
_LOGGER.debug(
"Your Tile configuration has been imported into the UI; "
"please remove it from configuration.yaml"
)

View file

@ -96,7 +96,7 @@ class TomatoDeviceScanner(DeviceScanner):
Return boolean if scanning successful.
"""
_LOGGER.info("Scanning")
_LOGGER.debug("Scanning")
try:
if self.ssl:

View file

@ -90,7 +90,7 @@ class ToonDataUpdateCoordinator(DataUpdateCoordinator[Status]):
await self.toon.subscribe_webhook(
application_id=self.entry.entry_id, url=webhook_url
)
_LOGGER.info("Registered Toon webhook: %s", webhook_url)
_LOGGER.debug("Registered Toon webhook: %s", webhook_url)
except ToonError as err:
_LOGGER.error("Error during webhook registration - %s", err)

View file

@ -319,7 +319,7 @@ class CoordinatedTPLinkFeatureEntity(CoordinatedTPLinkEntity, ABC):
and desc.entity_registry_enabled_default,
)
_LOGGER.info(
_LOGGER.debug(
"Device feature: %s (%s) needs an entity description defined in HA",
feature.name,
feature.id,

View file

@ -136,7 +136,7 @@ async def _generate_trackables(
return None
if "details" not in trackable:
_LOGGER.info(
_LOGGER.warning(
"Tracker %s has no details and will be skipped. This happens for shared trackers",
trackable["device_id"],
)

View file

@ -53,7 +53,7 @@ class TwilioCallNotificationService(BaseNotificationService):
def send_message(self, message="", **kwargs):
"""Call to specified target users."""
if not (targets := kwargs.get(ATTR_TARGET)):
_LOGGER.info("At least 1 target is required")
_LOGGER.warning("At least 1 target is required")
return
if message.startswith(("http://", "https://")):

View file

@ -66,7 +66,7 @@ class TwilioSMSNotificationService(BaseNotificationService):
twilio_args[ATTR_MEDIAURL] = data[ATTR_MEDIAURL]
if not targets:
_LOGGER.info("At least 1 target is required")
_LOGGER.warning("At least 1 target is required")
return
for target in targets:

View file

@ -280,7 +280,7 @@ class TwinklyLight(LightEntity):
await self.async_update_current_movie()
if not self._attr_available:
_LOGGER.info("Twinkly '%s' is now available", self._client.host)
_LOGGER.warning("Twinkly '%s' is now available", self._client.host)
# We don't use the echo API to track the availability since
# we already have to pull the device to get its state.
@ -289,7 +289,7 @@ class TwinklyLight(LightEntity):
# We log this as "info" as it's pretty common that the Christmas
# light are not reachable in July
if self._attr_available:
_LOGGER.info(
_LOGGER.warning(
"Twinkly '%s' is not reachable (client error)", self._client.host
)
self._attr_available = False