From 4efa147a2b79e5464d38e6ee5861c70fc65078c9 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Tue, 17 Sep 2024 19:44:38 +0200 Subject: [PATCH] Use debug/warning instead of info log level in components [p] (#126139) --- homeassistant/components/pandora/media_player.py | 8 ++++---- homeassistant/components/point/__init__.py | 2 +- homeassistant/components/point/config_flow.py | 2 +- homeassistant/components/ps4/__init__.py | 4 ++-- homeassistant/components/ps4/media_player.py | 4 ++-- homeassistant/components/pushbullet/notify.py | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/pandora/media_player.py b/homeassistant/components/pandora/media_player.py index eb6815959c2..f781f366173 100644 --- a/homeassistant/components/pandora/media_player.py +++ b/homeassistant/components/pandora/media_player.py @@ -98,7 +98,7 @@ class PandoraMediaPlayer(MediaPlayerEntity): if self.state != MediaPlayerState.OFF: return self._pianobar = pexpect.spawn("pianobar") - _LOGGER.info("Started pianobar subprocess") + _LOGGER.debug("Started pianobar subprocess") mode = self._pianobar.expect( ["Receiving new playlist", "Select station:", "Email:"] ) @@ -126,7 +126,7 @@ class PandoraMediaPlayer(MediaPlayerEntity): def turn_off(self) -> None: """Turn the media player off.""" if self._pianobar is None: - _LOGGER.info("Pianobar subprocess already stopped") + _LOGGER.warning("Pianobar subprocess already stopped") return self._pianobar.send("q") try: @@ -212,7 +212,7 @@ class PandoraMediaPlayer(MediaPlayerEntity): ] ) except pexpect.exceptions.EOF: - _LOGGER.info("Pianobar process already exited") + _LOGGER.warning("Pianobar process already exited") return None self._log_match() @@ -289,7 +289,7 @@ class PandoraMediaPlayer(MediaPlayerEntity): command = CMD_MAP.get(service_cmd) _LOGGER.debug("Sending pinaobar command %s for %s", command, service_cmd) if command is None: - _LOGGER.info("Command %s not supported yet", service_cmd) + _LOGGER.warning("Command %s not supported yet", service_cmd) self._clear_buffer() self._pianobar.sendline(command) diff --git a/homeassistant/components/point/__init__.py b/homeassistant/components/point/__init__.py index d5babef5b2a..acfa53ae215 100644 --- a/homeassistant/components/point/__init__.py +++ b/homeassistant/components/point/__init__.py @@ -125,7 +125,7 @@ async def async_setup_webhook(hass: HomeAssistant, entry: ConfigEntry, session): if CONF_WEBHOOK_ID not in entry.data: webhook_id = webhook.async_generate_id() webhook_url = webhook.async_generate_url(hass, webhook_id) - _LOGGER.info("Registering new webhook at: %s", webhook_url) + _LOGGER.debug("Registering new webhook at: %s", webhook_url) hass.config_entries.async_update_entry( entry, diff --git a/homeassistant/components/point/config_flow.py b/homeassistant/components/point/config_flow.py index 390a2691c80..6dbe8d5bb37 100644 --- a/homeassistant/components/point/config_flow.py +++ b/homeassistant/components/point/config_flow.py @@ -162,7 +162,7 @@ class PointFlowHandler(ConfigFlow, domain=DOMAIN): _LOGGER.error("Authentication Error") return self.async_abort(reason="auth_error") - _LOGGER.info("Successfully authenticated Point") + _LOGGER.debug("Successfully authenticated Point") user_email = (await point_session.user()).get("email") or "" return self.async_create_entry( diff --git a/homeassistant/components/ps4/__init__.py b/homeassistant/components/ps4/__init__.py index 3e92861b963..0ada2885fa7 100644 --- a/homeassistant/components/ps4/__init__.py +++ b/homeassistant/components/ps4/__init__.py @@ -111,7 +111,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: device[CONF_REGION] = country version = 2 config_entries.async_update_entry(entry, data=data, version=2) - _LOGGER.info( + _LOGGER.debug( "PlayStation 4 Config Updated: Region changed to: %s", country, ) @@ -143,7 +143,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: config_entry=entry, device_id=e_entry.device_id, ) - _LOGGER.info( + _LOGGER.debug( "PlayStation 4 identifier for entity: %s has changed", entity_id, ) diff --git a/homeassistant/components/ps4/media_player.py b/homeassistant/components/ps4/media_player.py index 77477ba7901..ecd20e2d71d 100644 --- a/homeassistant/components/ps4/media_player.py +++ b/homeassistant/components/ps4/media_player.py @@ -118,7 +118,7 @@ class PS4Device(MediaPlayerEntity): """Display logger msg if region is deprecated.""" # Non-Breaking although data returned may be inaccurate. if self._region in deprecated_regions: - _LOGGER.info( + _LOGGER.warning( """Region: %s has been deprecated. Please remove PS4 integration and Re-configure again to utilize @@ -340,7 +340,7 @@ class PS4Device(MediaPlayerEntity): """Set device info for registry.""" # If cannot get status on startup, assume info from registry. if status is None: - _LOGGER.info("Assuming status from registry") + _LOGGER.debug("Assuming status from registry") e_registry = er.async_get(self.hass) d_registry = dr.async_get(self.hass) diff --git a/homeassistant/components/pushbullet/notify.py b/homeassistant/components/pushbullet/notify.py index 96f78c4a35d..f2e70695b27 100644 --- a/homeassistant/components/pushbullet/notify.py +++ b/homeassistant/components/pushbullet/notify.py @@ -92,7 +92,7 @@ class PushBulletNotificationService(BaseNotificationService): # This also seems to work to send to all devices in own account. if ttype == "email": self._push_data(message, title, data, self.pushbullet, email=tname) - _LOGGER.info("Sent notification to email %s", tname) + _LOGGER.debug("Sent notification to email %s", tname) continue # Target is sms, send directly, don't use a target object. @@ -100,7 +100,7 @@ class PushBulletNotificationService(BaseNotificationService): self._push_data( message, title, data, self.pushbullet, phonenumber=tname ) - _LOGGER.info("Sent sms notification to %s", tname) + _LOGGER.debug("Sent sms notification to %s", tname) continue if ttype not in self.pbtargets: