mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Treat default_view as special only with view:true (#251)
This commit is contained in:
parent
9aa188079e
commit
e4fe4ec812
@ -175,7 +175,7 @@ Polymer({
|
|||||||
|
|
||||||
viewStates: {
|
viewStates: {
|
||||||
type: Object,
|
type: Object,
|
||||||
computed: 'computeViewStates(currentView, hass)',
|
computed: 'computeViewStates(currentView, hass, defaultView)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ Polymer({
|
|||||||
|
|
||||||
Will make sure we always show entities from ALWAYS_SHOW_DOMAINS domains.
|
Will make sure we always show entities from ALWAYS_SHOW_DOMAINS domains.
|
||||||
*/
|
*/
|
||||||
computeViewStates: function (currentView, hass) {
|
computeViewStates: function (currentView, hass, defaultView) {
|
||||||
var i;
|
var i;
|
||||||
var entityId;
|
var entityId;
|
||||||
var state;
|
var state;
|
||||||
@ -301,7 +301,7 @@ Polymer({
|
|||||||
var entityIds = Object.keys(hass.states);
|
var entityIds = Object.keys(hass.states);
|
||||||
|
|
||||||
// If we base off all entities, only have to filter out hidden
|
// If we base off all entities, only have to filter out hidden
|
||||||
if (!currentView && !(this.DEFAULT_VIEW_ENTITY_ID in hass.states)) {
|
if (!currentView && !defaultView) {
|
||||||
states = {};
|
states = {};
|
||||||
for (i = 0; i < entityIds.length; i++) {
|
for (i = 0; i < entityIds.length; i++) {
|
||||||
entityId = entityIds[i];
|
entityId = entityIds[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user