From 69117cb8e3cff03721473b96f66b9048e1184945 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 4 Sep 2023 09:23:33 +0200 Subject: [PATCH] Use shorthand attributes for DLNA dmr (#99236) --- homeassistant/components/dlna_dmr/media_player.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/dlna_dmr/media_player.py b/homeassistant/components/dlna_dmr/media_player.py index 50877756d521..3a57ba2c8ced 100644 --- a/homeassistant/components/dlna_dmr/media_player.py +++ b/homeassistant/components/dlna_dmr/media_player.py @@ -129,6 +129,9 @@ class DlnaDmrEntity(MediaPlayerEntity): # determine whether further device polling is required. _attr_should_poll = True + # Name of the current sound mode, not supported by DLNA + _attr_sound_mode = None + def __init__( self, udn: str, @@ -745,11 +748,6 @@ class DlnaDmrEntity(MediaPlayerEntity): "Couldn't find a suitable mode for shuffle=%s, repeat=%s", shuffle, repeat ) - @property - def sound_mode(self) -> str | None: - """Name of the current sound mode, not supported by DLNA.""" - return None - @property def sound_mode_list(self) -> list[str] | None: """List of available sound modes."""