Add last_updated tooltip to more info dialog#6926
Add last_updated tooltip to more info dialog#6926bramkragten merged 6 commits intohome-assistant:devfrom pszafer:person_last_updated
Conversation
ludeeus
left a comment
There was a problem hiding this comment.
We should not inject state properties in the state attributes.
|
@ludeeus I changed it. |
|
Look at the styles used in that element, copy+paste -> adjust. |
|
I copied them. I thought that maybe is more efficient way. |
| return html` | ||
| <ha-attributes | ||
| .stateObj=${this.stateObj} | ||
| extraFilters="id,user_id,editable" |
There was a problem hiding this comment.
| extraFilters="id,user_id,editable" | |
| extra-filters="id,user_id,editable" |
|
I think we should do this differently, lets add it as a tooltip to the last changed time. |
|
by tooltip do you mean tooltip to hover over last_changed? |
|
Yes |
|
but then it wouldn't be mobile accessible, would it? |
|
It would show on tap on mobile |
|
I don't think a tool tip is a good alternative here. It hides this information which I believe is important. We should just add it be a more user friend attribute.
Under the state card content. This gives the user looking at this information a good representation of how accurate the zone may be. |
|
This not just for person, adding it as a tooltip would make it available for every entity. |
|
ok, I will do it. |
src/components/entity/state-info.js
Outdated
| datetime="[[stateObj.last_changed]]" | ||
| ></ha-relative-time> | ||
| <paper-tooltip animation-delay="0"> | ||
| [[localize('ui.dialogs.more_info_control.last_updated')]]: |
There was a problem hiding this comment.
This string doesn't exist yet? You have to add it to src/translations/en.json
There was a problem hiding this comment.
added. one notice, even if string is added it doesn't show in my browser. Actually it doesn't show even if I use some other string like ui.dialogs.more_info_control.dismiss.
|
Oh, this is missing the LocalizeMixin... |
|
Fixed in dev. |
Proposed change
Currently entities shows only
last_changedof state.If person has state
awayfor a long time (during work or travel somewhere etc.) it's impossible to say from ui when location was last updated and if it is still "valid".It might be useful for all entities.
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: