Remove unreachable code in ESPHome media_players (#143203)

This commit is contained in:
J. Nick Koston 2025-04-17 21:51:03 -10:00 committed by GitHub
parent 60293648dc
commit b487c12ab1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View File

@ -194,6 +194,7 @@ class EsphomeEntity(Entity, Generic[_InfoT, _StateT]):
_static_info: _InfoT
_state: _StateT
_has_state: bool
device_entry: dr.DeviceEntry
def __init__(
self,

View File

@ -148,10 +148,6 @@ class EsphomeMediaPlayer(
announcement: bool,
) -> str | None:
"""Get URL for ffmpeg proxy."""
if self.device_entry is None:
# Device id is required
return None
# Choose the first default or announcement supported format
format_to_use: MediaPlayerSupportedFormat | None = None
for supported_format in supported_formats: