Sorry to reawaken the thread but I landed here with a very similar question
I want to track how long my hot water is on each day
I’ve created the History Stats sensor
#Track Hot Water History
- platform: history_stats
name: Hot Water ON today
entity_id: sensor.hot_water
state: "On"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
Now, I may be misunderstanding this, but that reads to me that it will only give me the time today from midnight until now…
And having only just set it up it seems this is what it’s doing, since it has no data for past days:
This is fine, but what I really want to do is track the total for a 24hr period and have that stored day after day (in the standard history) so that I can see that today it was on for 3 hours, yesterday 2 hours etc
I’m guessing that if I used
start: "{{ 0 }}"
end: "{{ now() }}"
It would simply give me the sum total from all time, which isn’t what i want either
Can anyone advise how I can do this daily?