Hi,
I previously followed the History Stats man page instructions and was able to get the “on” time (for each day) of my receiver working well. Over the past 6 or so months though, the automation stopped working and I’m unable to figure out the problem.
Here’s what I have in my configuration:
- platform: history_stats
name: Projector On Time
entity_id: media_player.tsr_7850_074e93
state: 'on'
type: count
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
# start: '{{ 0 }}'
end: '{{ now() }}'
I’ve tried different versions of start as above, and changed the type value from ‘time’ to ‘count’ as I saw in this post: https://community.home-assistant.io/t/count-on-time-of-a-binary-sensor/375233
Still doesn’t work.
Here’s my card on my Dashboard that used to work:
type: vertical-stack
cards:
- type: entity
name: TV / Projector
state_color: true
entity: media_player.tsr_7850_074e93
- type: gauge
entity: sensor.projector_on_time
min: 0
max: 3
severity:
green: 0
yellow: 1
red: 2
But the card never budges from 0 time, and reviewing the history likewise never budges past 0. See the screenshot of the receiver being on but still no history stats accruing:
Open to ideas, and thanks in advance for any help!