Skip to content
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

Uptime badge showing date instead of relative time #8030

Closed
tyjtyj opened this issue Dec 22, 2020 · 6 comments
Closed

Uptime badge showing date instead of relative time #8030

tyjtyj opened this issue Dec 22, 2020 · 6 comments
Labels
Bug Current Bug in UI - Extra Attention stale

Comments

@tyjtyj
Copy link

tyjtyj commented Dec 22, 2020

Checklist

  • [x ] I have updated to the latest available Home Assistant version.
  • [x ] I have cleared the cache of my browser.
  • [x ] I have tried a different browser to see if it is related to my browser.

The problem

Uptime badge showing timestamp instead of relative time.

Expected behavior

Uptime badge show time relative like xxx ago.

Steps to reproduce

add uptime as badge

Environment

  • Home Assistant release with the issue:
  • Last working Home Assistant release (if known): 0.18.4
  • Browser and browser version: Chrome latest
  • Operating system: Win 10, android

State of relevant entities

- platform: uptime
  name: 'Hass Uptime'

Problem-relevant configuration

Javascript errors shown in your browser console/inspector

Additional information

@tyjtyj tyjtyj added the Bug Current Bug in UI - Extra Attention label Dec 22, 2020
@spacegaier
Copy link
Member

Did it previously show something other than the timestamp? Given that there is not much space in a badge, basically everything we put int here will get ellipsis during rendering. So I am not sure if an uptime sensor as badge makes really sense to begin with.

If the uptime sensor is used as an entity row, then we show the relative time instead.

@tyjtyj
Copy link
Author

tyjtyj commented Dec 22, 2020

It shows 0.1 days(unit measurements: day. But this setting has been removed.

@spacegaier
Copy link
Member

Was that setting on the sensor or on the frontend badge YAML? Could you also select other units? If you were to choose hours the values would get a lot longer.

@tyjtyj
Copy link
Author

tyjtyj commented Dec 23, 2020

On yaml 0.18.5

- platform: uptime
  name: 'Hass Uptime'
  unit_of_measurement: days

As part of breakfix in version 2020.12.1, unit of measurement has been removed. The sensor is now timestamp.

This is how it look like in version 2020.12.1
image

This is version 0.18.5
image

@coolguymatt
Copy link

coolguymatt commented Jan 6, 2021

The same thing happens with the entity card (but works fine with the entities card). It also happens for any sensor with device class timestamp.

@github-actions
Copy link

github-actions bot commented Apr 6, 2021

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Current Bug in UI - Extra Attention stale
Projects
None yet
Development

No branches or pull requests

3 participants