Skip to content

Add "last_changed" and "last_updated" to dev tools state view#7375

Merged
bramkragten merged 5 commits intohome-assistant:devfrom
spacegaier:dev-tools-state-datetime
Nov 5, 2020
Merged

Add "last_changed" and "last_updated" to dev tools state view#7375
bramkragten merged 5 commits intohome-assistant:devfrom
spacegaier:dev-tools-state-datetime

Conversation

@spacegaier
Copy link
Member

@spacegaier spacegaier commented Oct 17, 2020

Breaking change

Proposed change

Currently there is no easy way to see those timestamps. Now there is. I decided against formatting the values and instead just added the default ISO format since we are talking about dev tools.

The filter for the state column still only looks at the actual state value, so no negative impact here.

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten
Copy link
Member

Not to sure about this, it makes it a lot harder to scan for states

@spacegaier
Copy link
Member Author

Initially I had though about adding another column for those timestamps, but since most entities anyway have multiple lines of attributes, there was always unused space in the state column which felt better.

Reg. scanning of states: If you are looking for something specific you would anyway use the column filters, wouldn't you?

@bramkragten
Copy link
Member

What if I don't know what I'm looking for, and want to see the differences

@spacegaier
Copy link
Member Author

spacegaier commented Oct 17, 2020

Even then I think it is not "too bad" since the timestamps in term of visual outline are always the same size, so I feel scanning through still works reasonably well. But I get your overall point...

So options are:

  1. New column in table (something like "State Updates")
  2. Line break after state before the timestamp to have the state stand out a bit more
  3. Have the timestamp not use the main text color, but something grayer (although that might also look weird)
  4. ???

@bramkragten
Copy link
Member

Try using secondary-text-color and see how that looks.

@spacegaier
Copy link
Member Author

spacegaier commented Oct 17, 2020

I like it esp. combined with an extra line break. Plus I made the table header use the same font size as the filters.

image

@bramkragten bramkragten merged commit 1c9d020 into home-assistant:dev Nov 5, 2020
@bramkragten bramkragten mentioned this pull request Nov 11, 2020
@spacegaier spacegaier deleted the dev-tools-state-datetime branch November 21, 2020 21:07
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants