Consider default_view as view by default.#6
Conversation
|
@andrey-git, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob to be a potential reviewer. |
| // Entity is a view if it has the 'view' attribute set. | ||
| // Consider default_view as view by default. | ||
| if (entity.attributes.view || | ||
| (entity.entity_id === DEFAULT_VIEW_ENTITY_ID && entity.attributes.view !== false)) { |
There was a problem hiding this comment.
You test entity.attributes.view !== false, which is equivalent to testing entity.attributes.view which is what we do in the first part of this logical expression.
There was a problem hiding this comment.
Hm, actually it either true or undefined, no way for it to be false (it just won't be set in group.py)
I removed the extra check. Now default_view is always considered a view.
|
As far as I know, the default view is specified via the groups command and thus will always have view: true |
|
If people don't set |
|
The current UI works fine without This function will consider it non-view, but Should I add a voluptuous check instead that I think it is extra-verbose :) |
|
Yes, a voluptuous check is the right place. We should never fight symptoms but instead solve things at the source. |
|
Created home-assistant/core#6758 instead. |
Consider default_view as view by default.
Will allow to use home-assistant/frontend#244 without manually specifying
view: trueunderdefault_view