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

Updating state for sensor.max_age_test_datetime took 0.573 seconds #116944

Open
garry0garry opened this issue May 6, 2024 · 4 comments
Open

Updating state for sensor.max_age_test_datetime took 0.573 seconds #116944

garry0garry opened this issue May 6, 2024 · 4 comments

Comments

@garry0garry
Copy link

The problem

Updating state for sensor.max_age_test_datetime (<class 'homeassistant.components.statistics.sensor.StatisticsSensor'>) took 0.573 seconds. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+statistics%22

What version of Home Assistant Core has the issue?

2024.5.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

statistics

Link to integration documentation on our website

https://www.home-assistant.io/integrations/statistics/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented May 6, 2024

Hey there @ThomDietrich, mind taking a look at this issue as it has been labeled with an integration (statistics) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of statistics can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign statistics Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


statistics documentation
statistics source
(message by IssueLinks)

@ThomDietrich
Copy link
Contributor

Hello @garry0garry, thanks for the report. Could you please also post your sensor config and it's current state (developer-tools)

CC @bdraco fyi

@garry0garry
Copy link
Author

  - platform: statistics
    name: "max_age_test_datetime"
    unique_id: max_age_test_datetime_id
    entity_id: input_number.age_test_num
    state_characteristic: datetime_value_max
    max_age:
      hours: 24
2024-05-05T20:59:00+00:00
input_number:
  age_test_num:
    name: age_test num
    min: 0
    max: 100000
    step: 1
#    initial: 0
    mode: box
- alias: max_age test
  id: '1'
  trigger:
    platform: time_pattern
    minutes: /1
  action:
  - service: input_number.set_value
    data_template:
      entity_id: input_number.age_test_num
      value: >
        {{ (now().strftime('%H') | int % 3) * 60 + now().strftime('%M') | int }}

@bdraco
Copy link
Member

bdraco commented May 15, 2024

Please follow the instructions in the Sluggish performance or increased CPU usage section of https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441 and post the callgrind file here

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

No branches or pull requests

3 participants