mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 15:45:08 +02:00
Replace MediaPlayerState.STANDBY with MediaPlayerState.OFF in cambridge_audio (#148133)
This commit is contained in:
@@ -107,7 +107,7 @@ class CambridgeAudioDevice(CambridgeAudioEntity, MediaPlayerEntity):
|
||||
"""Return the state of the device."""
|
||||
media_state = self.client.play_state.state
|
||||
if media_state == "NETWORK":
|
||||
return MediaPlayerState.STANDBY
|
||||
return MediaPlayerState.OFF
|
||||
if self.client.state.power:
|
||||
if media_state == "play":
|
||||
return MediaPlayerState.PLAYING
|
||||
|
@@ -45,7 +45,6 @@ from homeassistant.const import (
|
||||
STATE_ON,
|
||||
STATE_PAUSED,
|
||||
STATE_PLAYING,
|
||||
STATE_STANDBY,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError, ServiceValidationError
|
||||
@@ -156,8 +155,8 @@ async def test_entity_supported_features_with_control_bus(
|
||||
@pytest.mark.parametrize(
|
||||
("power_state", "play_state", "media_player_state"),
|
||||
[
|
||||
(True, "NETWORK", STATE_STANDBY),
|
||||
(False, "NETWORK", STATE_STANDBY),
|
||||
(True, "NETWORK", STATE_OFF),
|
||||
(False, "NETWORK", STATE_OFF),
|
||||
(False, "play", STATE_OFF),
|
||||
(True, "play", STATE_PLAYING),
|
||||
(True, "pause", STATE_PAUSED),
|
||||
|
Reference in New Issue
Block a user