core: History Stats doesn't work

The problem

Since the update to 2022.5 the history stats integration doesn’t work properly. The first day it counted up time constantly regardless of the state of the entity_id. After midnight it stopped counting completely. When I restart HA it is updated the first minutes. Then it stops again.

What version of Home Assistant Core has the issue?

2022.5.3

What was the last working version of Home Assistant Core?

2022.4.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

History Stats

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

- platform: history_stats
    name: heatpump_compressor_today
    entity_id: binary_sensor.heatpump_compressor_state
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0, microsecond=0) }}"
    end: "{{ now().replace(microsecond=0) }}"

Anything in the logs that might be useful for us?

Nothing in the logs

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (10 by maintainers)

Commits related to this issue

Most upvoted comments