Hi everyone,
since 2 years I’m monitoring how long different devices are switched on, but since ~3 months this is broken. Unfortunately, I didn’t realize this, but now it’s annoying. Anyways, I would like to fix it again.
My statistics look like this:
The sensors used have not been changed at all:
- platform: history_stats
name: Duration hall
entity_id: light.hall
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
Basically, I guess I’ve copied this from the sensor description page.
Can someone please tell me, what went wrong and why those measurements are now pretty pointless?
Thanks.
1 Like
andrea-daru
(Andrea Alessandro Darù)
November 2, 2023, 1:40pm
3
I’ve the same problem… did you resolved?
Unfortunately not - I’ve found a similar thread, but no solution. Seems like only a few are having this issue and there is no helping idea available.
It’s strange. I have another sensor working nicely:
- platform: history_stats
name: tv_switched_on
entity_id: media_player.tv
state: "on"
type: count
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
Until now, I haven’t found anything and the error is still present in the most current version.
mekaneck
(Rick Auch)
December 10, 2023, 12:01pm
6
Try the following:
start: "{{ today_at() }}"
duration:
hours: 24
Thanks a lot for your idea. I gave it a try, but nothing changed.