diff --git a/src/layouts/partial-cards.html b/src/layouts/partial-cards.html index c2f81eb8e8..010f8a065f 100644 --- a/src/layouts/partial-cards.html +++ b/src/layouts/partial-cards.html @@ -49,7 +49,7 @@ - [[computeTitle(views, locationName)]] + [[computeTitle(views, defaultView, locationName)]] @@ -65,7 +65,7 @@ on-tap='scrollToTop' > - [[locationName]] + Home 0 ? 'Home Assistant' : locationName; + computeTitle(views, defaultView, locationName) { + return (views && views.length > 0 && !defaultView && locationName === 'Home') || !locationName ? 'Home Assistant' : locationName; } computeStateName(stateObj) { - if (stateObj.entity_id === DEFAULT_VIEW_ENTITY_ID) { - if (stateObj.attributes.friendly_name && - stateObj.attributes.friendly_name !== 'default_view') { - return stateObj.attributes.friendly_name; - } - return this.computeLocationName(this.hass); - } return window.hassUtil.computeStateName(stateObj); }