mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Replace MediaPlayerState.STANDBY with MediaPlayerState.IDLE in mediaroom (#148135)
This commit is contained in:
parent
631523dfaf
commit
a046530eaf
@ -134,7 +134,7 @@ class MediaroomDevice(MediaPlayerEntity):
|
||||
|
||||
state_map = {
|
||||
State.OFF: MediaPlayerState.OFF,
|
||||
State.STANDBY: MediaPlayerState.STANDBY,
|
||||
State.STANDBY: MediaPlayerState.IDLE,
|
||||
State.PLAYING_LIVE_TV: MediaPlayerState.PLAYING,
|
||||
State.PLAYING_RECORDED_TV: MediaPlayerState.PLAYING,
|
||||
State.PLAYING_TIMESHIFT_TV: MediaPlayerState.PLAYING,
|
||||
@ -155,7 +155,7 @@ class MediaroomDevice(MediaPlayerEntity):
|
||||
self._channel = None
|
||||
self._optimistic = optimistic
|
||||
self._attr_state = (
|
||||
MediaPlayerState.PLAYING if optimistic else MediaPlayerState.STANDBY
|
||||
MediaPlayerState.PLAYING if optimistic else MediaPlayerState.IDLE
|
||||
)
|
||||
self._name = f"Mediaroom {device_id if device_id else host}"
|
||||
self._available = True
|
||||
@ -254,7 +254,7 @@ class MediaroomDevice(MediaPlayerEntity):
|
||||
try:
|
||||
self.set_state(await self.stb.turn_off())
|
||||
if self._optimistic:
|
||||
self._attr_state = MediaPlayerState.STANDBY
|
||||
self._attr_state = MediaPlayerState.IDLE
|
||||
self._available = True
|
||||
except PyMediaroomError:
|
||||
self._available = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user