mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Replace MediaPlayerState.STANDBY with MediaPlayerState.OFF in apple_tv (#148132)
This commit is contained in:
parent
a046530eaf
commit
04bd1967a7
@ -191,7 +191,7 @@ class AppleTvMediaPlayer(
|
|||||||
self._is_feature_available(FeatureName.PowerState)
|
self._is_feature_available(FeatureName.PowerState)
|
||||||
and self.atv.power.power_state == PowerState.Off
|
and self.atv.power.power_state == PowerState.Off
|
||||||
):
|
):
|
||||||
return MediaPlayerState.STANDBY
|
return MediaPlayerState.OFF
|
||||||
if self._playing:
|
if self._playing:
|
||||||
state = self._playing.device_state
|
state = self._playing.device_state
|
||||||
if state in (DeviceState.Idle, DeviceState.Loading):
|
if state in (DeviceState.Idle, DeviceState.Loading):
|
||||||
@ -200,7 +200,7 @@ class AppleTvMediaPlayer(
|
|||||||
return MediaPlayerState.PLAYING
|
return MediaPlayerState.PLAYING
|
||||||
if state in (DeviceState.Paused, DeviceState.Seeking, DeviceState.Stopped):
|
if state in (DeviceState.Paused, DeviceState.Seeking, DeviceState.Stopped):
|
||||||
return MediaPlayerState.PAUSED
|
return MediaPlayerState.PAUSED
|
||||||
return MediaPlayerState.STANDBY # Bad or unknown state?
|
return MediaPlayerState.IDLE # Bad or unknown state?
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user