Skip to content

History : Selecting "Last 7 days " and "Last 30 days" on click end 24 hours ago instead of Now #24951

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

Closed
4 tasks done
mkgin opened this issue Apr 7, 2025 · 3 comments · Fixed by #24989
Closed
4 tasks done

Comments

@mkgin
Copy link

mkgin commented Apr 7, 2025

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

When clicking "Last 7 days " or "Last 30 days" in the date range dropdown

Mar 31, 12:44 - Apr 6, 12:44
Mar 8, 12:44 - Apr 6, 12:44

Current Date and time is April 7, about 12:44

Last hour, 12 hours and 24 hours work as I expect.
Apr 7, 11:44 - Apr 7, 12:44
Apr 7, 00:44 - Apr 7, 12:44
Apr 6, 12:44 - Apr 7, 12:44

Describe the behavior you expected

I would expect the date range to end with the current time and date when clicking "Last 7 days " or "Last 30 days" in the date range dropdown.

Steps to reproduce the issue

  1. Click "history" in sidebar
  2. Click "Start-Date End-Date" drop down
  3. Click "Last 7 Days" or "Last 30 Days".
    ...

What version of Home Assistant Core has the issue?

2025.4.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue?

Chromium135.0.7049.52 (Official Build) built on Debian GNU/Linux 12 (bookworm) (64-bit)

Which operating system are you using to run this browser?

Debian 12.10

State of relevant entities

Problem-relevant frontend configuration

In my profile / user info:

* tried changing the Day of week start to sunday ( I use monday)
* tried changing the timezone used (System or Local)
* various date formats

Javascript errors shown in your browser console/inspector

No Errors, but this warning

3049.db239ba72894d219.js:1 The Material theme is deprecated and will be removed in Vaadin 25.
30080 @ version.js:22
...

Additional information

First noticed Sunday evening.

@mkgin
Copy link
Author

mkgin commented Apr 7, 2025

Seems that there is a similar bug for me on the Demo page when I click the Calendar and select last 7 days.

https://demo.home-assistant.io/#/energy

The last day is April 6 not April 7.

This may be related.
#22781

@meaniegreenie

This comment has been minimized.

@mkgin

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants