Skip to content

Commit 585d230

Browse files
authored
build: update ucapi 0.5.1 (#88)
Refactor entity command handler for ucapi 0.5.x: additional websocket argument.
1 parent badc6cb commit 585d230

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

intg-appletv/driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async def on_unsubscribe_entities(entity_ids: list[str]) -> None:
166166

167167
# pylint: disable=too-many-statements,too-many-branches
168168
async def media_player_cmd_handler(
169-
entity: MediaPlayer, cmd_id: str, params: dict[str, Any] | None
169+
entity: MediaPlayer, cmd_id: str, params: dict[str, Any] | None, **_kwargs: Any
170170
) -> ucapi.StatusCodes:
171171
"""
172172
Media-player entity command handler.
@@ -176,6 +176,7 @@ async def media_player_cmd_handler(
176176
:param entity: media-player entity
177177
:param cmd_id: command
178178
:param params: optional command parameters
179+
:param _kwargs: additional arguments like websocket (not used)
179180
:return: status code of the command. StatusCodes.OK if the command succeeded.
180181
"""
181182
_LOG.info("Got %s command request: %s %s", entity.id, cmd_id, params if params else "")

intg-appletv/tv.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ async def _connect_once(self) -> None:
472472
except Exception as err: # pylint: disable=broad-exception-caught
473473
_LOG.warning("[%s] Could not connect: %s", self.log_id, err)
474474
# OSError(101, 'Network is unreachable') or 10065 for Windows
475+
# pylint: disable=E1101
475476
if err.__cause__ and isinstance(err.__cause__, OSError) and err.__cause__.errno in [101, 10065]:
476477
_LOG.warning("[%s] Network may not be ready yet %s : retry", self.log_id, err)
477478
await asyncio.sleep(ERROR_OS_WAIT)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pyatv==0.16.1
22
pyee~=13.0.0
3-
ucapi==0.4.0
3+
ucapi==0.5.1

0 commit comments

Comments
 (0)