1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00

Use source list property instead of the attribute in Denon AVR integration (#59768)

This commit is contained in:
Maciej Bieniek 2021-11-16 12:40:54 +01:00 committed by GitHub
parent 41e341028e
commit f1d75f0dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,6 @@ class DenonDevice(MediaPlayerEntity):
name=config_entry.title,
)
self._attr_sound_mode_list = receiver.sound_mode_list
self._attr_source_list = receiver.input_func_list
self._receiver = receiver
self._update_audyssey = update_audyssey
@ -246,6 +245,11 @@ class DenonDevice(MediaPlayerEntity):
"""Return the state of the device."""
return self._receiver.state
@property
def source_list(self):
"""Return a list of available input sources."""
return self._receiver.input_func_list
@property
def is_volume_muted(self):
"""Return boolean if volume is currently muted."""