mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Support volume level push updates in apple_tv integration (#93496)
This commit is contained in:
parent
9dcd73b308
commit
d5e09bd4c3
@ -7,7 +7,7 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/apple_tv",
|
"documentation": "https://www.home-assistant.io/integrations/apple_tv",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["pyatv", "srptools"],
|
"loggers": ["pyatv", "srptools"],
|
||||||
"requirements": ["pyatv==0.11.0"],
|
"requirements": ["pyatv==0.12.0"],
|
||||||
"zeroconf": [
|
"zeroconf": [
|
||||||
"_mediaremotetv._tcp.local.",
|
"_mediaremotetv._tcp.local.",
|
||||||
"_companion-link._tcp.local.",
|
"_companion-link._tcp.local.",
|
||||||
|
@ -138,6 +138,9 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
|
|||||||
# Listen to power updates
|
# Listen to power updates
|
||||||
self.atv.power.listener = self
|
self.atv.power.listener = self
|
||||||
|
|
||||||
|
# Listen to volume updates
|
||||||
|
self.atv.audio.listener = self
|
||||||
|
|
||||||
if self.atv.features.in_state(FeatureState.Available, FeatureName.AppList):
|
if self.atv.features.in_state(FeatureState.Available, FeatureName.AppList):
|
||||||
self.hass.create_task(self._update_app_list())
|
self.hass.create_task(self._update_app_list())
|
||||||
|
|
||||||
@ -203,6 +206,11 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
|
|||||||
"""Update power state when it changes."""
|
"""Update power state when it changes."""
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def volume_update(self, old_level: float, new_level: float) -> None:
|
||||||
|
"""Update volume when it changes."""
|
||||||
|
self.async_write_ha_state()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def app_id(self) -> str | None:
|
def app_id(self) -> str | None:
|
||||||
"""ID of the current running app."""
|
"""ID of the current running app."""
|
||||||
|
@ -1518,7 +1518,7 @@ pyatmo==7.5.0
|
|||||||
pyatome==0.1.1
|
pyatome==0.1.1
|
||||||
|
|
||||||
# homeassistant.components.apple_tv
|
# homeassistant.components.apple_tv
|
||||||
pyatv==0.11.0
|
pyatv==0.12.0
|
||||||
|
|
||||||
# homeassistant.components.aussie_broadband
|
# homeassistant.components.aussie_broadband
|
||||||
pyaussiebb==0.0.15
|
pyaussiebb==0.0.15
|
||||||
|
@ -1130,7 +1130,7 @@ pyatag==0.3.5.3
|
|||||||
pyatmo==7.5.0
|
pyatmo==7.5.0
|
||||||
|
|
||||||
# homeassistant.components.apple_tv
|
# homeassistant.components.apple_tv
|
||||||
pyatv==0.11.0
|
pyatv==0.12.0
|
||||||
|
|
||||||
# homeassistant.components.aussie_broadband
|
# homeassistant.components.aussie_broadband
|
||||||
pyaussiebb==0.0.15
|
pyaussiebb==0.0.15
|
||||||
|
Loading…
x
Reference in New Issue
Block a user