Use debug/warning/error instead of info log level in components [n] (#126137)

This commit is contained in:
Jan-Philipp Benecke 2024-09-17 18:39:11 +02:00 committed by GitHub
parent 2588435c5c
commit 622e9aa3dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 11 deletions

View File

@ -215,7 +215,7 @@ class NanoleafConfigFlow(ConfigFlow, domain=DOMAIN):
self.discovery_conf.pop(self.nanoleaf.host) self.discovery_conf.pop(self.nanoleaf.host)
if self.device_id in self.discovery_conf: if self.device_id in self.discovery_conf:
self.discovery_conf.pop(self.device_id) self.discovery_conf.pop(self.device_id)
_LOGGER.info( _LOGGER.debug(
"Successfully imported Nanoleaf %s from the discovery integration", "Successfully imported Nanoleaf %s from the discovery integration",
name, name,
) )

View File

@ -376,7 +376,9 @@ class NeatoConnectedVacuum(NeatoEntity, StateVacuumEntity):
"Zone '%s' was not found for the robot '%s'", zone, self.entity_id "Zone '%s' was not found for the robot '%s'", zone, self.entity_id
) )
return return
_LOGGER.info("Start cleaning zone '%s' with robot %s", zone, self.entity_id) _LOGGER.debug(
"Start cleaning zone '%s' with robot %s", zone, self.entity_id
)
self._attr_state = STATE_CLEANING self._attr_state = STATE_CLEANING
try: try:

View File

@ -164,7 +164,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
try: try:
await hass.data[DOMAIN][entry.entry_id][AUTH].async_addwebhook(webhook_url) await hass.data[DOMAIN][entry.entry_id][AUTH].async_addwebhook(webhook_url)
_LOGGER.info("Register Netatmo webhook: %s", webhook_url) _LOGGER.debug("Register Netatmo webhook: %s", webhook_url)
except pyatmo.ApiError as err: except pyatmo.ApiError as err:
_LOGGER.error("Error during webhook registration - %s", err) _LOGGER.error("Error during webhook registration - %s", err)
else: else:
@ -224,7 +224,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await data[entry.entry_id][AUTH].async_dropwebhook() await data[entry.entry_id][AUTH].async_dropwebhook()
except pyatmo.ApiError: except pyatmo.ApiError:
_LOGGER.debug("No webhook to be dropped") _LOGGER.debug("No webhook to be dropped")
_LOGGER.info("Unregister Netatmo webhook") _LOGGER.debug("Unregister Netatmo webhook")
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS) unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)

View File

@ -215,11 +215,11 @@ class NetatmoDataHandler:
async def handle_event(self, event: dict) -> None: async def handle_event(self, event: dict) -> None:
"""Handle webhook events.""" """Handle webhook events."""
if event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_ACTIVATION: if event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_ACTIVATION:
_LOGGER.info("%s webhook successfully registered", MANUFACTURER) _LOGGER.debug("%s webhook successfully registered", MANUFACTURER)
self._webhook = True self._webhook = True
elif event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_DEACTIVATION: elif event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_DEACTIVATION:
_LOGGER.info("%s webhook unregistered", MANUFACTURER) _LOGGER.debug("%s webhook unregistered", MANUFACTURER)
self._webhook = False self._webhook = False
elif event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_NACAMERA_CONNECTION: elif event["data"][WEBHOOK_PUSH_TYPE] == WEBHOOK_NACAMERA_CONNECTION:

View File

@ -48,7 +48,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if port != router.port or ssl != router.ssl: if port != router.port or ssl != router.ssl:
data = {**entry.data, CONF_PORT: router.port, CONF_SSL: router.ssl} data = {**entry.data, CONF_PORT: router.port, CONF_SSL: router.ssl}
hass.config_entries.async_update_entry(entry, data=data) hass.config_entries.async_update_entry(entry, data=data)
_LOGGER.info( _LOGGER.warning(
( (
"Netgear port-SSL combination updated from (%i, %r) to (%i, %r), " "Netgear port-SSL combination updated from (%i, %r) to (%i, %r), "
"this should only occur after a firmware update" "this should only occur after a firmware update"

View File

@ -380,7 +380,7 @@ class NmapDeviceScanner:
) )
if mac is None: if mac is None:
self._async_device_offline(ipv4, "No MAC address found", now) self._async_device_offline(ipv4, "No MAC address found", now)
_LOGGER.info("No MAC address found for %s", ipv4) _LOGGER.warning("No MAC address found for %s", ipv4)
continue continue
formatted_mac = format_mac(mac) formatted_mac = format_mac(mac)

View File

@ -139,11 +139,11 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
try: try:
gpio.discover(config[DOMAIN][CONF_DISCOVER]) gpio.discover(config[DOMAIN][CONF_DISCOVER])
except gpio.NumatoGpioError as err: except gpio.NumatoGpioError as err:
_LOGGER.info("Error discovering Numato devices: %s", err) _LOGGER.error("Error discovering Numato devices: %s", err)
gpio.cleanup() gpio.cleanup()
return False return False
_LOGGER.info( _LOGGER.debug(
"Initializing Numato 32 port USB GPIO expanders with IDs: %s", "Initializing Numato 32 port USB GPIO expanders with IDs: %s",
", ".join(str(d) for d in gpio.devices), ", ".join(str(d) for d in gpio.devices),
) )

View File

@ -71,7 +71,7 @@ def setup_platform(
api.edge_detect(device_id, port, partial(read_gpio, device_id)) api.edge_detect(device_id, port, partial(read_gpio, device_id))
except NumatoGpioError as err: except NumatoGpioError as err:
_LOGGER.info( _LOGGER.error(
"Notification setup failed on device %s, " "Notification setup failed on device %s, "
"updates on binary sensor %s only in polling mode: %s", "updates on binary sensor %s only in polling mode: %s",
device_id, device_id,