Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate DenonAVR to has entity name #98155

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions homeassistant/components/denonavr/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ async def wrapper(
class DenonDevice(MediaPlayerEntity):
"""Representation of a Denon Media Player Device."""

_attr_has_entity_name = True
_attr_name = None

def __init__(
self,
receiver: DenonAVR,
Expand All @@ -225,7 +228,6 @@ def __init__(
update_audyssey: bool,
) -> None:
"""Initialize the device."""
self._attr_name = receiver.name
self._attr_unique_id = unique_id
assert config_entry.unique_id
self._attr_device_info = DeviceInfo(
Expand All @@ -234,7 +236,7 @@ def __init__(
identifiers={(DOMAIN, config_entry.unique_id)},
manufacturer=config_entry.data[CONF_MANUFACTURER],
model=config_entry.data[CONF_MODEL],
name=config_entry.title,
name=receiver.name,
)
self._attr_sound_mode_list = receiver.sound_mode_list

Expand Down