Replace MediaPlayerState.STANDBY with MediaPlayerState.IDLE in androidtv (#148130)

This commit is contained in:
Erik Montnemery 2025-07-04 16:27:01 +02:00 committed by GitHub
parent fd86a43b28
commit 811f085556
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ SERVICE_UPLOAD = "upload"
ANDROIDTV_STATES = { ANDROIDTV_STATES = {
"off": MediaPlayerState.OFF, "off": MediaPlayerState.OFF,
"idle": MediaPlayerState.IDLE, "idle": MediaPlayerState.IDLE,
"standby": MediaPlayerState.STANDBY, "standby": MediaPlayerState.IDLE,
"playing": MediaPlayerState.PLAYING, "playing": MediaPlayerState.PLAYING,
"paused": MediaPlayerState.PAUSED, "paused": MediaPlayerState.PAUSED,
} }

View File

@ -54,9 +54,9 @@ from homeassistant.const import (
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_STOP,
SERVICE_TURN_OFF, SERVICE_TURN_OFF,
SERVICE_TURN_ON, SERVICE_TURN_ON,
STATE_IDLE,
STATE_OFF, STATE_OFF,
STATE_PLAYING, STATE_PLAYING,
STATE_STANDBY,
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
) )
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
@ -163,7 +163,7 @@ async def test_reconnect(
state = hass.states.get(entity_id) state = hass.states.get(entity_id)
assert state is not None assert state is not None
assert state.state == STATE_STANDBY assert state.state == STATE_IDLE
assert MSG_RECONNECT[patch_key] in caplog.record_tuples[2] assert MSG_RECONNECT[patch_key] in caplog.record_tuples[2]
@ -672,7 +672,7 @@ async def test_update_lock_not_acquired(hass: HomeAssistant) -> None:
await async_update_entity(hass, entity_id) await async_update_entity(hass, entity_id)
state = hass.states.get(entity_id) state = hass.states.get(entity_id)
assert state is not None assert state is not None
assert state.state == STATE_STANDBY assert state.state == STATE_IDLE
async def test_download(hass: HomeAssistant) -> None: async def test_download(hass: HomeAssistant) -> None: