ds1707
1
I wanted to count the running time of my heatpump.
Therefore i created 2 sensors:
sensor:
- platform: history_stats
name: Wärmepumpe Betriebsstunden Gesamt
entity_id: input_boolean.wp_status
state: "on"
type: time
start: "{{ 0 }}"
end: "{{ now() }}"
- platform: history_stats
name: Wärmepumpe Betriebsstunden Monat
entity_id: input_boolean.wp_status
state: "on"
type: time
start: '{{ now().replace(day=1).replace(hour=0).replace(minute=0).replace(second=0) }}'
end: "{{ now() }}"
This worked well in the beginning, but now after some weeks the sensor values are much too high.
After restarting HA it automatically added 60h.
And a few weeks ago 460.000h.
Hope someone already had same werid issue and can helpme.
thank you.
ds1707
2
The bug appears evrytime i update und restart home assistant.
Does no nobody face the same issue?
tom_l
3
This is not going to work. Your recorder history only goes back 10 days by default.
ds1707
4
Understood, can you help me to find a workaround, or is there any other possible solution?
petro
(Petro)
5
You have to store 31 days worth of data. There are no work arounds. Just configure recorder to store more data.
tom_l
6
That will work for the monthly sensor but their first sensor is an attempt at a total run hours (since the Unix epoch).
petro
(Petro)
7
ah, didn’t notice that. Yep, no way around that.
ds1707
8
Thank you, i configured the recorder to 31 days, i will wait and see if it works.