mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +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",
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["pyatv", "srptools"],
|
||||
"requirements": ["pyatv==0.11.0"],
|
||||
"requirements": ["pyatv==0.12.0"],
|
||||
"zeroconf": [
|
||||
"_mediaremotetv._tcp.local.",
|
||||
"_companion-link._tcp.local.",
|
||||
|
@ -138,6 +138,9 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
|
||||
# Listen to power updates
|
||||
self.atv.power.listener = self
|
||||
|
||||
# Listen to volume updates
|
||||
self.atv.audio.listener = self
|
||||
|
||||
if self.atv.features.in_state(FeatureState.Available, FeatureName.AppList):
|
||||
self.hass.create_task(self._update_app_list())
|
||||
|
||||
@ -203,6 +206,11 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
|
||||
"""Update power state when it changes."""
|
||||
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
|
||||
def app_id(self) -> str | None:
|
||||
"""ID of the current running app."""
|
||||
|
@ -1518,7 +1518,7 @@ pyatmo==7.5.0
|
||||
pyatome==0.1.1
|
||||
|
||||
# homeassistant.components.apple_tv
|
||||
pyatv==0.11.0
|
||||
pyatv==0.12.0
|
||||
|
||||
# homeassistant.components.aussie_broadband
|
||||
pyaussiebb==0.0.15
|
||||
|
@ -1130,7 +1130,7 @@ pyatag==0.3.5.3
|
||||
pyatmo==7.5.0
|
||||
|
||||
# homeassistant.components.apple_tv
|
||||
pyatv==0.11.0
|
||||
pyatv==0.12.0
|
||||
|
||||
# homeassistant.components.aussie_broadband
|
||||
pyaussiebb==0.0.15
|
||||
|
Loading…
x
Reference in New Issue
Block a user