From 94f636bc2d30421f36cade4cb22f58e80b408576 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 21 Jan 2026 21:22:26 +0100 Subject: [PATCH] Update pyatv to 0.17.0 (#161394) --- homeassistant/components/apple_tv/manifest.json | 2 +- homeassistant/components/apple_tv/media_player.py | 9 +++++++++ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- script/hassfest/requirements.py | 1 - tests/components/apple_tv/conftest.py | 14 ++++---------- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/apple_tv/manifest.json b/homeassistant/components/apple_tv/manifest.json index a7035d680dd..602d3a07f97 100644 --- a/homeassistant/components/apple_tv/manifest.json +++ b/homeassistant/components/apple_tv/manifest.json @@ -8,7 +8,7 @@ "integration_type": "device", "iot_class": "local_push", "loggers": ["pyatv", "srptools"], - "requirements": ["pyatv==0.16.1;python_version<'3.14'"], + "requirements": ["pyatv==0.17.0"], "zeroconf": [ "_mediaremotetv._tcp.local.", "_companion-link._tcp.local.", diff --git a/homeassistant/components/apple_tv/media_player.py b/homeassistant/components/apple_tv/media_player.py index 12a27fb195f..1fedf1f524c 100644 --- a/homeassistant/components/apple_tv/media_player.py +++ b/homeassistant/components/apple_tv/media_player.py @@ -239,6 +239,15 @@ class AppleTvMediaPlayer( """ self.async_write_ha_state() + @callback + def volume_device_update( + self, output_device: OutputDevice, old_level: float, new_level: float + ) -> None: + """Output device volume was updated. + + This is a callback function from pyatv.interface.AudioListener. + """ + @callback def outputdevices_update( self, old_devices: list[OutputDevice], new_devices: list[OutputDevice] diff --git a/requirements_all.txt b/requirements_all.txt index 2a02c221511..5db2802beba 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1909,7 +1909,7 @@ pyatag==0.3.5.3 pyatmo==9.2.3 # homeassistant.components.apple_tv -pyatv==0.16.1;python_version<'3.14' +pyatv==0.17.0 # homeassistant.components.aussie_broadband pyaussiebb==0.1.5 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index dd782a0e2a7..b9bed3b1d8c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1637,7 +1637,7 @@ pyatag==0.3.5.3 pyatmo==9.2.3 # homeassistant.components.apple_tv -pyatv==0.16.1;python_version<'3.14' +pyatv==0.17.0 # homeassistant.components.aussie_broadband pyaussiebb==0.1.5 diff --git a/script/hassfest/requirements.py b/script/hassfest/requirements.py index ee02896b6f0..aa421c327d0 100644 --- a/script/hassfest/requirements.py +++ b/script/hassfest/requirements.py @@ -117,7 +117,6 @@ FORBIDDEN_PACKAGE_EXCEPTIONS: dict[str, dict[str, set[str]]] = { "airthings": {"airthings-cloud": {"async-timeout"}}, "ampio": {"asmog": {"async-timeout"}}, "apache_kafka": {"aiokafka": {"async-timeout"}}, - "apple_tv": {"pyatv": {"async-timeout"}}, "blackbird": { # https://github.com/koolsb/pyblackbird/issues/12 # pyblackbird > pyserial-asyncio diff --git a/tests/components/apple_tv/conftest.py b/tests/components/apple_tv/conftest.py index 22311f91b77..78982a8d51c 100644 --- a/tests/components/apple_tv/conftest.py +++ b/tests/components/apple_tv/conftest.py @@ -1,20 +1,14 @@ """Fixtures for component.""" from collections.abc import Generator -import sys from unittest.mock import AsyncMock, MagicMock, patch +from pyatv import conf +from pyatv.const import PairingRequirement, Protocol +from pyatv.support import http import pytest -if sys.version_info < (3, 14): - from pyatv import conf - from pyatv.const import PairingRequirement, Protocol - from pyatv.support import http - - from .common import MockPairingHandler, airplay_service, create_conf, mrp_service - -if sys.version_info >= (3, 14): - collect_ignore_glob = ["test_*.py"] +from .common import MockPairingHandler, airplay_service, create_conf, mrp_service @pytest.fixture(autouse=True, name="mock_scan")