You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When displaying Last Changed of an entity, the relative time on the Bubble Card is sometimes displayed differently than how it's shown in HA. The value is sometimes off by 1 ("4 hours" on the card, "5 hours" in HA).
Specifically, I'm seeing this for a binary_sensor and a "State" Bubble Card. Tapping the card shows the "more info" view where HA's formatting can be seen.
Describe the bug
When displaying Last Changed of an entity, the relative time on the Bubble Card is sometimes displayed differently than how it's shown in HA. The value is sometimes off by 1 ("4 hours" on the card, "5 hours" in HA).
Specifically, I'm seeing this for a binary_sensor and a "State" Bubble Card. Tapping the card shows the "more info" view where HA's formatting can be seen.
Looking at the code, I think it's because Bubble Card uses
Math.floor()
whereas HA usesMath.round()
:https://github.com/home-assistant/frontend/blob/56ab29da81402ba469f47b4f55bba7f28c5bdf52/src/common/util/select-unit.ts#L20
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The formatting should ideally be consistent with HA.
Informations (please complete the following information):
The text was updated successfully, but these errors were encountered: