Improve Sonos activity debug logging (#61122)

This commit is contained in:
jjlawren 2021-12-06 17:21:28 -06:00 committed by GitHub
parent 0adf86d647
commit da4349d133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ def soco_error(
return None
except (OSError, SoCoException, SoCoUPnPException) as err:
error_code = getattr(err, "error_code", None)
function = funct.__name__
function = funct.__qualname__
if errorcodes and error_code in errorcodes:
_LOGGER.debug(
"Error code %s ignored in call to %s", error_code, function
@ -59,7 +59,9 @@ def soco_error(
return None
dispatcher_send(
self.hass, f"{SONOS_SPEAKER_ACTIVITY}-{self.soco.uid}", funct.__name__
self.hass,
f"{SONOS_SPEAKER_ACTIVITY}-{self.soco.uid}",
funct.__qualname__,
)
return result