Skip to content

Commit

Permalink
fix: fix unknown entity in refresh log (#2699)
Browse files Browse the repository at this point in the history
* Update media_player.py

Fixes:
DEBUG (MainThread) [custom_components.alexa_media.media_player] d****l@b******a: Refreshing <entity unknown.unknown=unknown>

* style: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
danielbrunt57 and pre-commit-ci[bot] authored Nov 28, 2024
1 parent 01b9699 commit 22806c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/alexa_media/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,11 @@ async def refresh(self, device=None, skip_api: bool = False):
self._set_authentication_details(device["auth_info"])
session = None
if self.available:
_LOGGER.debug("%s: Refreshing %s", self.account, self)
_LOGGER.debug(
"%s: Refreshing %s",
self.account,
self if device is None else self._device_name,
)
self._assumed_state = False
if "PAIR_BT_SOURCE" in self._capabilities:
self._source = self._get_source()
Expand Down

0 comments on commit 22806c3

Please sign in to comment.