Get Views object from entity template
The &quot;Rendered entity&quot; row type comes from the Entity API module.
When using the node view row type the views module adds the view object to the node in views_plugin_row_node_view::render(), however the entity module doesn't do anything similar for its row type, so there is no easy way to get the view object when themeing the entity.
If your view is using a page display you can use views_get_page_view() but this doesn't work with other display types, like block views for example.
Note that there is a feature request for the entity module to add the view object to the entity but it is still in development and the module maintainer wants to use a different approach.
So you could use that patch and then when a newer patch comes along you will likely need to make some minor tweaks to your custom themeing code, or you could make a new version of that patch as per the maintainers comments and then use that and possibly avoid having to change your custom code in future.
If you are comfortable updating the patch I would recommend that approach, otherwise I would recommend using the current patch and updating your custom code in future.