diff --git a/homeassistant/components/soundtouch/media_player.py b/homeassistant/components/soundtouch/media_player.py index 63e5a551745..fa5c0dd7095 100644 --- a/homeassistant/components/soundtouch/media_player.py +++ b/homeassistant/components/soundtouch/media_player.py @@ -78,21 +78,25 @@ class SoundTouchMediaPlayer(MediaPlayerEntity): _attr_device_class = MediaPlayerDeviceClass.SPEAKER _attr_has_entity_name = True _attr_name = None + _attr_source_list = [ + Source.AUX.value, + Source.BLUETOOTH.value, + ] def __init__(self, device: SoundTouchDevice) -> None: """Create SoundTouch media player entity.""" self._device = device - self._attr_unique_id = self._device.config.device_id + self._attr_unique_id = device.config.device_id self._attr_device_info = DeviceInfo( - identifiers={(DOMAIN, self._device.config.device_id)}, + identifiers={(DOMAIN, device.config.device_id)}, connections={ - (CONNECTION_NETWORK_MAC, format_mac(self._device.config.mac_address)) + (CONNECTION_NETWORK_MAC, format_mac(device.config.mac_address)) }, manufacturer="Bose Corporation", - model=self._device.config.type, - name=self._device.config.name, + model=device.config.type, + name=device.config.name, ) self._status = None @@ -131,14 +135,6 @@ class SoundTouchMediaPlayer(MediaPlayerEntity): """Name of the current input source.""" return self._status.source - @property - def source_list(self): - """List of available input sources.""" - return [ - Source.AUX.value, - Source.BLUETOOTH.value, - ] - @property def is_volume_muted(self): """Boolean if volume is currently muted."""