-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UI for restored entities #4414
Conversation
@@ -172,6 +184,10 @@ class MoreInfoControls extends LocalizeMixin(EventsMixin(PolymerElement)) { | |||
return !stateObj || !DOMAINS_NO_INFO.includes(computeStateDomain(stateObj)); | |||
} | |||
|
|||
_computeShowRestored(stateObj) { | |||
return !stateObj || stateObj.attributes.restored; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This screen won't show without State obj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but it is undefined at first render...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but then guard it, because now you're implying it's restored entity if state object is not available.
return !stateObj || stateObj.attributes.restored; | |
return stateObj && stateObj.attributes.restored; |
"It is not currently being provided." Feels a bit disconnected from the rest. Also, the "why this happened" is missing from the explanation, besides, it doesn't have to be the integration to blame (devices can change as well). Suggestion:
The above suggestion is also using an active voice. |
Oh, can we make the "Remove entity" red? Since it is a "destructive" action. |
Closes #4401